16b02ca969f339dae69d70e34b409955d654842b
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-21 Yao Qi <yao.qi@linaro.org>
2
3 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4
5 2015-09-21 Yao Qi <yao.qi@linaro.org>
6
7 * tracepoint.c (max_jump_pad_size): Remove.
8
9 2015-09-18 Yao Qi <yao.qi@linaro.org>
10
11 * linux-aarch64-low.c: Don't include sys/uio.h.
12 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
13
14 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
15
16 * tracepoint.c (eval_result_type): Change prototype.
17 (condition_true_at_tracepoint): Fix argument to compiled_cond.
18
19 2015-09-15 Pedro Alves <palves@redhat.com>
20
21 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
22 Check whether to report exec events instead of checking whether
23 multiprocess is enabled.
24
25 2015-09-15 Pedro Alves <palves@redhat.com>
26
27 PR remote/18965
28 * remote-utils.c (prepare_resume_reply): Merge
29 TARGET_WAITKIND_VFORK_DONE switch case with the
30 TARGET_WAITKIND_FORKED case.
31
32 2015-09-15 Yao Qi <yao.qi@linaro.org>
33
34 * server.c (handle_query): Check string comparison using
35 "else if" instead of "if".
36
37 2015-09-15 Yao Qi <yao.qi@linaro.org>
38
39 * server.c (vCont_supported): New global variable.
40 (handle_query): Set vCont_supported to 1 if "vContSupported+"
41 matches. Append ";vContSupported+" to own_buf.
42 (handle_v_requests): Append ";s;S" to own_buf if target supports
43 hardware single step or vCont_supported is false.
44 (capture_main): Set vCont_supported to zero.
45
46 2015-09-15 Yao Qi <yao.qi@linaro.org>
47
48 * linux-low.c (linux_supports_conditional_breakpoints): Rename
49 it to ...
50 (linux_supports_hardware_single_step): ... New function.
51 (linux_target_ops): Update.
52 * lynx-low.c (lynx_target_ops): Set field
53 supports_hardware_single_step to target_can_do_hardware_single_step.
54 * nto-low.c (nto_target_ops): Likewise.
55 * spu-low.c (spu_target_ops): Likewise.
56 * win32-low.c (win32_target_ops): Likewise.
57 * target.c (target_can_do_hardware_single_step): New function.
58 * target.h (struct target_ops) <supports_conditional_breakpoints>:
59 Remove. <supports_hardware_single_step>: New field.
60 (target_supports_conditional_breakpoints): Remove.
61 (target_supports_hardware_single_step): New macro.
62 (target_can_do_hardware_single_step): Declare.
63 * server.c (handle_query): Use target_supports_hardware_single_step
64 instead of target_supports_conditional_breakpoints.
65
66 2015-09-15 Yao Qi <yao.qi@linaro.org>
67
68 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
69 function.
70 (struct linux_target_ops the_low_target): Install
71 aarch64_linux_siginfo_fixup.
72
73 2015-09-11 Don Breazeal <donb@codesourcery.com>
74 Luis Machado <lgustavo@codesourcery.com>
75
76 * linux-low.c (linux_mourn): Static declaration.
77 (linux_arch_setup): Move in front of
78 handle_extended_wait.
79 (linux_arch_setup_thread): New function.
80 (handle_extended_wait): Handle exec events. Call
81 linux_arch_setup_thread. Make event_lwp argument a
82 pointer-to-a-pointer.
83 (check_zombie_leaders): Do not check stopped threads.
84 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
85 (linux_low_filter_event): Add lwp and thread for exec'ing
86 non-leader thread if leader thread has been deleted.
87 Refactor code into linux_arch_setup_thread and call it.
88 Pass child lwp pointer by reference to handle_extended_wait.
89 (linux_wait_for_event_filtered): Update comment.
90 (linux_wait_1): Prevent clobbering exec event status.
91 (linux_supports_exec_events): New function.
92 (linux_target_ops) <supports_exec_events>: Initialize new member.
93 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
94 new member.
95 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
96 * server.c (report_exec_events): New global variable.
97 (handle_query): Handle qSupported query for exec-events feature.
98 (captured_main): Initialize report_exec_events.
99 * server.h (report_exec_events): Declare new global variable.
100 * target.h (struct target_ops) <supports_exec_events>: New
101 member.
102 (target_supports_exec_events): New macro.
103 * win32-low.c (win32_target_ops) <supports_exec_events>:
104 Initialize new member.
105
106 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
107
108 * linux-low.c (linux_low_enable_btrace): Remove.
109 (linux_target_ops): Replace linux_low_enable_btrace with
110 linux_enable_btrace.
111
112 2015-09-03 Yao Qi <yao.qi@linaro.org>
113
114 * linux-aarch64-low.c (aarch64_insert_point): Call
115 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
116 returns true.
117
118 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
119
120 * linux-low.c (check_stopped_by_breakpoint): Use
121 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
122
123 2015-08-27 Pedro Alves <palves@redhat.com>
124
125 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
126
127 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
128
129 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
130 the XNEW-family equivalent.
131 (compile_bytecodes): Likewise.
132 * dll.c (loaded_dll): Likewise.
133 * event-loop.c (append_callback_event): Likewise.
134 (create_file_handler): Likewise.
135 (create_file_event): Likewise.
136 * hostio.c (handle_open): Likewise.
137 * inferiors.c (add_thread): Likewise.
138 (add_process): Likewise.
139 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
140 * linux-arm-low.c (arm_new_process): Likewise.
141 (arm_new_thread): Likewise.
142 * linux-low.c (add_to_pid_list): Likewise.
143 (linux_add_process): Likewise.
144 (handle_extended_wait): Likewise.
145 (add_lwp): Likewise.
146 (enqueue_one_deferred_signal): Likewise.
147 (enqueue_pending_signal): Likewise.
148 (linux_resume_one_lwp_throw): Likewise.
149 (linux_resume_one_thread): Likewise.
150 (linux_read_memory): Likewise.
151 (linux_write_memory): Likewise.
152 * linux-mips-low.c (mips_linux_new_process): Likewise.
153 (mips_linux_new_thread): Likewise.
154 (mips_add_watchpoint): Likewise.
155 * linux-x86-low.c (initialize_low_arch): Likewise.
156 * lynx-low.c (lynx_add_process): Likewise.
157 * mem-break.c (set_raw_breakpoint_at): Likewise.
158 (set_breakpoint): Likewise.
159 (add_condition_to_breakpoint): Likewise.
160 (add_commands_to_breakpoint): Likewise.
161 (clone_agent_expr): Likewise.
162 (clone_one_breakpoint): Likewise.
163 * regcache.c (new_register_cache): Likewise.
164 * remote-utils.c (look_up_one_symbol): Likewise.
165 * server.c (queue_stop_reply): Likewise.
166 (start_inferior): Likewise.
167 (queue_stop_reply_callback): Likewise.
168 (handle_target_event): Likewise.
169 * spu-low.c (fetch_ppc_memory): Likewise.
170 (store_ppc_memory): Likewise.
171 * target.c (set_target_ops): Likewise.
172 * thread-db.c (thread_db_load_search): Likewise.
173 (try_thread_db_load_1): Likewise.
174 * tracepoint.c (add_tracepoint): Likewise.
175 (add_tracepoint_action): Likewise.
176 (create_trace_state_variable): Likewise.
177 (cmd_qtdpsrc): Likewise.
178 (cmd_qtro): Likewise.
179 (add_while_stepping_state): Likewise.
180 * win32-low.c (child_add_thread): Likewise.
181 (get_image_name): Likewise.
182
183 2015-08-25 Yao Qi <yao.qi@linaro.org>
184
185 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
186
187 2015-08-25 Yao Qi <yao.qi@linaro.org>
188
189 * Makefile.in (aarch64-linux.o): New rule.
190 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
191 srv_tgtobj.
192 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
193 (aarch64_init_debug_reg_state): Make it extern.
194 (aarch64_linux_prepare_to_resume): Remove.
195
196 2015-08-25 Yao Qi <yao.qi@linaro.org>
197
198 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
199 lwp_arch_private_info and ptid_of_lwp.
200
201 2015-08-25 Yao Qi <yao.qi@linaro.org>
202
203 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
204 Find proc_info by find_process_pid. All callers updated.
205
206 2015-08-25 Yao Qi <yao.qi@linaro.org>
207
208 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
209 Remove.
210 (debug_reg_change_callback): Remove.
211 (aarch64_notify_debug_reg_change): Remove.
212
213 2015-08-25 Yao Qi <yao.qi@linaro.org>
214
215 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
216 Call current_lwp_ptid.
217
218 2015-08-25 Yao Qi <yao.qi@linaro.org>
219
220 * linux-aarch64-low.c (debug_reg_change_callback): Use
221 debug_printf.
222
223 2015-08-25 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
226
227 2015-08-25 Yao Qi <yao.qi@linaro.org>
228
229 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
230
231 2015-08-25 Yao Qi <yao.qi@linaro.org>
232
233 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
234 the code.
235
236 2015-08-25 Yao Qi <yao.qi@linaro.org>
237
238 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
239 Remove.
240 (debug_reg_change_callback): Remove argument entry and add argument
241 lwp. Remove local variable thread. Don't print thread id in the
242 debugging output. Don't check whether pid of thread equals to pid.
243 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
244 iterate_over_lwps instead find_inferior.
245
246 2015-08-24 Pedro Alves <palves@redhat.com>
247
248 * inferiors.c (get_first_process): New function.
249 * inferiors.h (get_first_process): New declaration.
250 * remote-utils.c (read_ptid): Default to the first process in the
251 list, instead of to the current thread's process.
252
253 2015-08-24 Pedro Alves <palves@redhat.com>
254
255 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
256 * event-loop.c: Likewise.
257 * remote-utils.c: Likewise.
258 * tracepoint.c: Likewise.
259
260 2015-08-24 Pedro Alves <palves@redhat.com>
261
262 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
263 ptid_get_lwp.
264
265 2015-08-21 Pedro Alves <palves@redhat.com>
266
267 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
268 instead of literal 1.
269
270 2015-08-21 Pedro Alves <palves@redhat.com>
271
272 * tdesc.c (default_description): Explicitly zero-initialize.
273
274 2015-08-21 Pedro Alves <palves@redhat.com>
275
276 PR gdb/18749
277 * inferiors.c (remove_thread): Discard any pending stop reply for
278 this thread.
279 * server.c (remove_all_on_match_pid): Rename to ...
280 (remove_all_on_match_ptid): ... this. Work with a filter ptid
281 instead of a pid.
282 (discard_queued_stop_replies): Change parameter to a ptid. Now
283 extern.
284 (handle_v_kill, kill_inferior_callback, captured_main)
285 (process_serial_event): Adjust.
286 * server.h (discard_queued_stop_replies): Declare.
287
288 2015-08-21 Pedro Alves <palves@redhat.com>
289
290 * linux-low.c (wait_for_sigstop): Always switch to no thread
291 selected if the previously current thread dies.
292 * lynx-low.c (lynx_request_interrupt): Use the first thread's
293 process instead of the current thread's.
294 * remote-utils.c (input_interrupt): Don't check if there's no
295 current thread.
296 * server.c (gdb_read_memory, gdb_write_memory): If setting the
297 current thread to the general thread fails, error out.
298 (handle_qxfer_auxv, handle_qxfer_libraries)
299 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
300 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
301 (handle_query): Check if there's a thread selected instead of
302 checking whether there's any thread in the thread list.
303 (handle_qxfer_threads, handle_qxfer_btrace)
304 (handle_qxfer_btrace_conf): Don't error out early if there's no
305 thread in the thread list.
306 (handle_v_cont, myresume): Don't set the current thread to the
307 continue thread.
308 (process_serial_event) <Hg handling>: Also set thread_id if the
309 previous general thread is still alive.
310 (process_serial_event) <g/G handling>: If setting the current
311 thread to the general thread fails, error out.
312 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
313 thread's lwp instead of the current thread's.
314 * target.c (set_desired_thread): If the desired thread was not
315 found, leave the current thread pointing to NULL. Return an int
316 (boolean) indicating success.
317 * target.h (set_desired_thread): Change return type to int.
318
319 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
320
321 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
322 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
323 #includes.
324 (ps_get_thread_area): New function.
325
326 2015-08-19 Gary Benson <gbenson@redhat.com>
327
328 * hostio.c (handle_pread): Do not attempt to read more data
329 than hostio_reply_with_data can fit in a packet.
330
331 2015-08-18 Joel Brobecker <brobecker@adacore.com>
332
333 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
334
335 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
336
337 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
338
339 2015-08-06 Pedro Alves <palves@redhat.com>
340
341 * tracepoint.c (expr_eval_result): Now an int.
342
343 2015-08-06 Pedro Alves <palves@redhat.com>
344
345 * gdbthread.h (struct regcache): Forward declare.
346 (struct thread_info) <regcache_data>: Now a struct regcache
347 pointer.
348 * inferiors.c (inferior_regcache_data)
349 (set_inferior_regcache_data): Now work with struct regcache
350 pointers.
351 * inferiors.h (struct regcache): Forward declare.
352 (inferior_regcache_data, set_inferior_regcache_data): Now work
353 with struct regcache pointers.
354 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
355 (free_register_cache_thread): Remove struct regcache pointer
356 casts.
357
358 2015-08-06 Pedro Alves <palves@redhat.com>
359
360 * server.c (captured_main): On error, print the exception message
361 to stderr, and if run_once is set, throw a quit.
362
363 2015-08-06 Pedro Alves <palves@redhat.com>
364
365 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
366 the current thread.
367
368 2015-08-06 Pedro Alves <palves@redhat.com>
369
370 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
371 reading beyond the passed in buffer length.
372
373 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
374
375 * tracepoint.c (symbol_list) <required>: Remove.
376
377 2015-08-06 Pedro Alves <palves@redhat.com>
378
379 * linux-low.c (handle_extended_wait): Set the fork child's suspend
380 count if stopping and suspending threads.
381 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
382 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
383 (linux_detach): Complete an ongoing step-over.
384 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
385 throughout.
386 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
387 (linux_wait_1): If passing a signal to the inferior after
388 finishing a step-over, unsuspend and re-resume all lwps. If we
389 see a single-step event but the thread should be continuing, don't
390 pass the trap to gdb.
391 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
392 internal_error instead of gdb_assert.
393 (enqueue_pending_signal): New function.
394 (check_ptrace_stopped_lwp_gone): Add debug output.
395 (start_step_over): Use internal_error instead of gdb_assert.
396 (complete_ongoing_step_over): New function.
397 (linux_resume_one_thread): Don't resume a suspended thread.
398 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
399 it stepping.
400
401 2015-08-06 Pedro Alves <palves@redhat.com>
402
403 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
404 (linux_thread_alive): Use lwp_is_marked_dead.
405 (extended_event_reported): Delete.
406 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
407 instead of extended_event_reported.
408 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
409 as well.
410 (lwp_is_marked_dead): New function.
411 (lwp_running): Use lwp_is_marked_dead.
412 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
413 comment.
414
415 2015-08-06 Pedro Alves <palves@redhat.com>
416
417 * linux-low.c (linux_wait_1): Move fork event output out of the
418 !report_to_gdb check. Pass event_child->waitstatus to
419 target_waitstatus_to_string instead of ourstatus.
420
421 2015-08-04 Yao Qi <yao.qi@linaro.org>
422
423 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
424 if current_thread is 32 bit.
425
426 2015-08-04 Yao Qi <yao.qi@linaro.org>
427
428 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
429 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
430 * server.c (extended_protocol): Remove "static".
431 * server.h (extended_protocol): Declare it.
432
433 2015-08-04 Yao Qi <yao.qi@linaro.org>
434
435 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
436 both aarch64 and aarch32.
437 (aarch64_set_pc): Likewise.
438
439 2015-08-04 Yao Qi <yao.qi@linaro.org>
440
441 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
442 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
443 arm-with-neon.xml to srv_xmlfiles.
444 * linux-aarch64-low.c: Include linux-aarch32-low.h.
445 (is_64bit_tdesc): New function.
446 (aarch64_linux_read_description): New function.
447 (aarch64_arch_setup): Call aarch64_linux_read_description.
448 (regs_info): Rename to regs_info_aarch64.
449 (aarch64_regs_info): Return right regs_info.
450 (initialize_low_arch): Call initialize_low_arch_aarch32.
451
452 2015-08-04 Yao Qi <yao.qi@linaro.org>
453
454 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
455 * linux-aarch32-low.c: New file.
456 * linux-aarch32-low.h: New file.
457 * linux-arm-low.c (arm_fill_gregset): Move it to
458 linux-aarch32-low.c.
459 (arm_store_gregset): Likewise.
460 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
461 (arm_store_vfpregset): Call arm_store_vfpregset_num.
462 (arm_arch_setup): Check if PTRACE_GETREGSET works.
463 (regs_info): Rename to regs_info_arm.
464 (arm_regs_info): Return regs_info_aarch32 if
465 have_ptrace_getregset is 1 and target description is
466 arm_with_neon or arm_with_vfpv3.
467 (initialize_low_arch): Don't call init_registers_arm_with_neon.
468 Call initialize_low_arch_aarch32 instead.
469
470 2015-08-04 Yao Qi <yao.qi@linaro.org>
471
472 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
473 * linux-low.c: ... here.
474 * linux-low.h (have_ptrace_getregset): Declare it.
475
476 2015-08-04 Pedro Alves <palves@redhat.com>
477
478 * thread-db.c (struct thread_db): Use new typedefs.
479 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
480 CHK calls.
481 (disable_thread_event_reporting): Cast result of dlsym to
482 destination function pointer type.
483 (thread_db_mourn): Use td_ta_delete_ftype.
484
485 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
486
487 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
488 arch variant.
489 (CDX_BREAKPOINT): Define for R2.
490 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
491 (the_low_target): Add comments.
492
493 2015-07-30 Yao Qi <yao.qi@linaro.org>
494
495 * linux-arm-low.c (arm_hwcap): Remove it.
496 (arm_read_description): New local variable arm_hwcap. Don't
497 set arm_hwcap to zero.
498
499 2015-07-30 Yao Qi <yao.qi@linaro.org>
500
501 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
502 Use regcache->tdesc instead.
503 (arm_store_wmmxregset): Likewise.
504 (arm_fill_vfpregset): Likewise.
505 (arm_store_vfpregset): Likewise.
506
507 2015-07-30 Yao Qi <yao.qi@linaro.org>
508
509 * linux-arm-low.c: Include arch/arm.h.
510 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
511 (arm_store_gregset): Likewise.
512
513 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
514
515 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
516 ptrace's 4th parameter.
517
518 2015-07-27 Yao Qi <yao.qi@linaro.org>
519
520 * configure.srv (case aarch64*-*-linux*): Don't set
521 srv_linux_usrregs.
522
523 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
524
525 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
526 sys/ptrace.h.
527 * linux-arm-low.c: Likewise.
528 * linux-cris-low.c: Likewise.
529 * linux-crisv32-low.c: Likewise.
530 * linux-low.c: Likewise.
531 * linux-m68k-low.c: Likewise.
532 * linux-mips-low.c: Likewise.
533 * linux-nios2-low.c: Likewise.
534 * linux-s390-low.c: Likewise.
535 * linux-sparc-low.c: Likewise.
536 * linux-tic6x-low.c: Likewise.
537 * linux-tile-low.c: Likewise.
538 * linux-x86-low.c: Likewise.
539
540 2015-07-24 Pedro Alves <palves@redhat.com>
541
542 * config.in: Regenerate.
543 * configure: Regenerate.
544
545 2015-07-24 Pedro Alves <palves@redhat.com>
546
547 * acinclude.m4: Include ../ptrace.m4.
548 * configure.ac: Call GDB_AC_PTRACE.
549 * config.in, configure: Regenerate.
550
551 2015-07-24 Yao Qi <yao.qi@linaro.org>
552
553 * linux-low.c (linux_create_inferior): Remove setting to
554 proc->priv->new_inferior.
555 (linux_attach): Likewise.
556 (linux_low_filter_event): Likewise.
557 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
558
559 2015-07-24 Yao Qi <yao.qi@linaro.org>
560
561 * linux-low.c (linux_arch_setup): New function.
562 (linux_low_filter_event): If proc->tdesc is NULL and
563 proc->attached is true, call the_low_target.arch_setup.
564 Otherwise, keep status pending, and return.
565 (linux_resume_one_lwp_throw): Don't call get_pc if
566 thread->while_stepping isn't NULL. Don't call
567 get_thread_regcache if proc->tdesc is NULL.
568 (need_step_over_p): Return 0 if proc->tdesc is NULL.
569 (linux_target_ops): Install arch_setup.
570 * server.c (start_inferior): Call the_target->arch_setup.
571 * target.h (struct target_ops) <arch_setup>: New field.
572 (target_arch_setup): New marco.
573 * lynx-low.c (lynx_target_ops): Update.
574 * nto-low.c (nto_target_ops): Update.
575 * spu-low.c (spu_target_ops): Update.
576 * win32-low.c (win32_target_ops): Update.
577
578 2015-07-24 Yao Qi <yao.qi@linaro.org>
579
580 * linux-low.c (linux_add_process): Don't set
581 proc->priv->new_inferior.
582 (linux_create_inferior): Set proc->priv->new_inferior to 1.
583 (linux_attach): Likewise.
584
585 2015-07-24 Yao Qi <yao.qi@linaro.org>
586
587 * server.c (start_inferior): Code refactor.
588
589 2015-07-24 Yao Qi <yao.qi@linaro.org>
590
591 * server.c (process_serial_event): Set general_thread.
592
593 2015-07-21 Yao Qi <yao.qi@linaro.org>
594
595 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
596 aarch64_linux_get_debug_reg_capacity.
597
598 2015-07-17 Yao Qi <yao.qi@linaro.org>
599
600 * Makefile.in (aarch64-linux-hw-point.o): New rule.
601 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
602 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
603 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
604 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
605 (AARCH64_HWP_ALIGNMENT): Likewise.
606 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
607 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
608 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
609 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
610 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
611 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
612 (struct aarch64_debug_reg_state): Likewise.
613 (struct arch_lwp_info): Likewise.
614 (aarch64_align_watchpoint): Likewise.
615 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
616 (aarch64_watchpoint_length): Likewise.
617 (aarch64_point_encode_ctrl_reg): Likewise
618 (aarch64_point_is_aligned): Likewise.
619 (aarch64_align_watchpoint): Likewise.
620 (aarch64_linux_set_debug_regs):
621 (aarch64_dr_state_insert_one_point): Likewise.
622 (aarch64_dr_state_remove_one_point): Likewise.
623 (aarch64_handle_breakpoint): Likewise.
624 (aarch64_handle_aligned_watchpoint): Likewise.
625 (aarch64_handle_unaligned_watchpoint): Likewise.
626 (aarch64_handle_watchpoint): Likewise.
627
628 2015-07-17 Yao Qi <yao.qi@linaro.org>
629
630 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
631 and don't aarch64_get_debug_reg_state. All callers update.
632 (aarch64_handle_aligned_watchpoint): Likewise.
633 (aarch64_handle_unaligned_watchpoint): Likewise.
634 (aarch64_handle_watchpoint): Likewise.
635 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
636 (aarch64_remove_point): Likewise.
637
638 2015-07-17 Yao Qi <yao.qi@linaro.org>
639
640 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
641 debug_printf.
642 (aarch64_handle_unaligned_watchpoint): Likewise.
643
644 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
645
646 Revert the previous 3 commits:
647 Move gdb_regex* to common/
648 Move linux_find_memory_regions_full & co.
649 gdbserver build-id attribute generator
650
651 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
652 Jan Kratochvil <jan.kratochvil@redhat.com>
653
654 gdbserver build-id attribute generator.
655 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
656 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
657 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
658 (find_phdr): New.
659 (get_dynamic): Use find_pdhr to traverse program headers.
660 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
661 (compare_mapping_entry_range, struct find_memory_region_callback_data)
662 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
663 (get_hex_build_id): New.
664 (linux_qxfer_libraries_svr4): Add optional build-id attribute
665 to reply XML document.
666
667 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
668 Jan Kratochvil <jan.kratochvil@redhat.com>
669
670 * target.c: Include target/target-utils.h and fcntl.h.
671 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
672 (target_fileio_read_stralloc): New functions.
673
674 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
675
676 * Makefile.in (OBS): Add gdb_regex.o.
677 (gdb_regex.o): New.
678 * config.in: Rebuilt.
679 * configure: Rebuilt.
680
681 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
682 Jan Kratochvil <jan.kratochvil@redhat.com>
683
684 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
685 * Makefile.in (OBS): Add target-utils.o.
686 (linux-maps.o, target-utils.o): New.
687 * configure.srv (srv_linux_obj): Add linux-maps.o.
688
689 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
690
691 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
692 function, return 1.
693 (the_low_target): Install it.
694
695 2015-07-14 Pedro Alves <palves@redhat.com>
696
697 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
698 Instead, ignore ECHILD, and throw an error for other errnos.
699
700 2015-07-10 Pedro Alves <palves@redhat.com>
701
702 * event-loop.c (struct callback_event) <data>: Change type to
703 gdb_client_data instance instead of gdb_client_data pointer.
704 (append_callback_event): Adjust.
705
706 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
707
708 * linux-aarch64-low.c: Add comments for each linux_target_ops
709 method. Remove comments already covered in target_ops and
710 linux_target_ops definitions.
711 (the_low_target): Add comments for each unimplemented method.
712
713 2015-07-09 Yao Qi <yao.qi@linaro.org>
714
715 * linux-aarch64-low.c (aarch64_regmap): Remove.
716 (aarch64_usrregs_info): Remove.
717 (regs_info): Set field usrregs to NULL.
718
719 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
720
721 * linux-low.c: Include "rsp-low.h"
722 (linux_low_encode_pt_config, linux_low_encode_raw): New.
723 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
724 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
725 (handle_btrace_enable_pt): New.
726 (handle_btrace_general_set): Support "pt".
727 (handle_btrace_conf_general_set): Support "pt:size".
728
729 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
730
731 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
732 Z_PACKET_SW_BP.
733
734 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
735
736 * linux-aarch64-low.c: Remove comment about endianness.
737 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
738 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
739 memcmp.
740
741 2015-06-24 Gary Benson <gbenson@redhat.com>
742
743 * linux-i386-ipa.c (stdint.h): Do not include.
744 * lynx-i386-low.c (stdint.h): Likewise.
745 * lynx-ppc-low.c (stdint.h): Likewise.
746 * mem-break.c (stdint.h): Likewise.
747 * thread-db.c (stdint.h): Likewise.
748 * tracepoint.c (stdint.h): Likewise.
749 * win32-low.c (stdint.h): Likewise.
750
751 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
752
753 * server.c (write_qxfer_response): Update call to
754 remote_escape_output.
755
756 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
757 Jan Kratochvil <jan.kratochvil@redhat.com>
758
759 Merge multiple hex conversions.
760 * gdbreplay.c (tohex): Rename to 'fromhex'.
761 (logchar): Use fromhex.
762
763 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
764
765 * server.c (handle_qxfer_libraries): Set `version' attribute for
766 <library-list>.
767
768 2015-06-10 Gary Benson <gbenson@redhat.com>
769
770 * target.h (struct target_ops) <multifs_open>: New field.
771 <multifs_unlink>: Likewise.
772 <multifs_readlink>: Likewise.
773 * linux-low.c (nat/linux-namespaces.h): New include.
774 (linux_target_ops): Initialize the_target->multifs_open,
775 the_target->multifs_unlink and the_target->multifs_readlink.
776 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
777 * hostio.c (hostio_fs_pid): New static variable.
778 (hostio_handle_new_gdb_connection): New function.
779 (handle_setfs): Likewise.
780 (handle_open): Use the_target->multifs_open as appropriate.
781 (handle_unlink): Use the_target->multifs_unlink as appropriate.
782 (handle_readlink): Use the_target->multifs_readlink as
783 appropriate.
784 (handle_vFile): Handle vFile:setfs packets.
785 * server.c (handle_query): Call hostio_handle_new_gdb_connection
786 after target_handle_new_gdb_connection.
787
788 2015-06-10 Gary Benson <gbenson@redhat.com>
789
790 * configure.ac (AC_CHECK_FUNCS): Add setns.
791 * config.in: Regenerate.
792 * configure: Likewise.
793 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
794 (linux-namespaces.o): New rule.
795 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
796
797 2015-06-09 Gary Benson <gbenson@redhat.com>
798
799 * hostio.c (handle_open): Process mode argument with
800 fileio_to_host_mode.
801
802 2015-06-01 Yao Qi <yao.qi@linaro.org>
803
804 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
805 * linux-x86-low.c: Likewise.
806
807 2015-05-28 Don Breazeal <donb@codesourcery.com>
808
809 * linux-low.c (handle_extended_wait): Initialize
810 thread_info.last_resume_kind for new fork children.
811
812 2015-05-15 Pedro Alves <palves@redhat.com>
813
814 * target.h (target_handle_new_gdb_connection): Rewrite using if
815 wrapped in do/while.
816
817 2015-05-14 Joel Brobecker <brobecker@adacore.com>
818
819 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
820 * configure, config.in: Regenerate.
821 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
822 Declare typedef.
823
824 2015-05-12 Don Breazeal <donb@codesourcery.com>
825
826 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
827 PTRACE_EVENT_VFORK_DONE.
828 (linux_low_ptrace_options, extended_event_reported): Add vfork
829 events.
830 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
831 and "vforkdone" for RSP 'T' Stop Reply Packet.
832 * server.h (report_vfork_events): Declare
833 global variable.
834
835 2015-05-12 Don Breazeal <donb@codesourcery.com>
836
837 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
838 (the_low_target) <new_fork>: Initialize new member.
839 * linux-arm-low.c (arm_new_fork): New function.
840 (the_low_target) <new_fork>: Initialize new member.
841 * linux-low.c (handle_extended_wait): Call new target function
842 new_fork.
843 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
844 * linux-mips-low.c (mips_add_watchpoint): New function
845 extracted from mips_insert_point.
846 (the_low_target) <new_fork>: Initialize new member.
847 (mips_linux_new_fork): New function.
848 (mips_insert_point): Call mips_add_watchpoint.
849 * linux-x86-low.c (x86_linux_new_fork): New function.
850 (the_low_target) <new_fork>: Initialize new member.
851
852 2015-05-12 Don Breazeal <donb@codesourcery.com>
853
854 * linux-low.c (handle_extended_wait): Implement return value,
855 rename argument 'event_child' to 'event_lwp', handle
856 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
857 (linux_low_ptrace_options): New function.
858 (linux_low_filter_event): Call linux_low_ptrace_options,
859 use different argument fo linux_enable_event_reporting,
860 use return value from handle_extended_wait.
861 (extended_event_reported): New function.
862 (linux_wait_1): Call extended_event_reported and set
863 status to report fork events.
864 (linux_write_memory): Add pid to debug message.
865 (reset_lwp_ptrace_options_callback): New function.
866 (linux_handle_new_gdb_connection): New function.
867 (linux_target_ops): Initialize new structure member.
868 * linux-low.h (struct lwp_info) <waitstatus>: New member.
869 * lynx-low.c: Initialize new structure member.
870 * remote-utils.c (prepare_resume_reply): Implement stop reason
871 "fork" for "T" stop message.
872 * server.c (handle_query): Call handle_new_gdb_connection.
873 * server.h (report_fork_events): Declare global flag.
874 * target.h (struct target_ops) <handle_new_gdb_connection>:
875 New member.
876 (target_handle_new_gdb_connection): New macro.
877 * win32-low.c: Initialize new structure member.
878
879 2015-05-12 Don Breazeal <donb@codesourcery.com>
880
881 * mem-break.c (APPEND_TO_LIST): Define macro.
882 (clone_agent_expr): New function.
883 (clone_one_breakpoint): New function.
884 (clone_all_breakpoints): New function.
885 * mem-break.h: Declare new functions.
886
887 2015-05-12 Don Breazeal <donb@codesourcery.com>
888
889 * linux-low.c (linux_supports_fork_events): New function.
890 (linux_supports_vfork_events): New function.
891 (linux_target_ops): Initialize new structure members.
892 (initialize_low): Call linux_check_ptrace_features.
893 * lynx-low.c (lynx_target_ops): Initialize new structure
894 members.
895 * server.c (report_fork_events, report_vfork_events):
896 New global flags.
897 (handle_query): Add new features to qSupported packet and
898 response.
899 (captured_main): Initialize new global variables.
900 * target.h (struct target_ops) <supports_fork_events>:
901 New member.
902 <supports_vfork_events>: New member.
903 (target_supports_fork_events): New macro.
904 (target_supports_vfork_events): New macro.
905 * win32-low.c (win32_target_ops): Initialize new structure
906 members.
907
908 2015-05-12 Gary Benson <gbenson@redhat.com>
909
910 * server.c (handle_qxfer_exec_file): Use current process
911 if annex is empty.
912
913 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
914
915 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
916 Remove HAVE_PTRACE_GETREGS conditionals.
917 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
918 instead of PTRACE_GETREGS and PTRACE_SETREGS.
919
920 2015-05-08 Yao Qi <yao.qi@linaro.org>
921
922 * linux-low.c (linux_supports_conditional_breakpoints): New
923 function.
924 (linux_target_ops): Install new target method.
925 * lynx-low.c (lynx_target_ops): Install NULL hook for
926 supports_conditional_breakpoints.
927 * nto-low.c (nto_target_ops): Likewise.
928 * spu-low.c (spu_target_ops): Likewise.
929 * win32-low.c (win32_target_ops): Likewise.
930 * server.c (handle_query): Check
931 target_supports_conditional_breakpoints.
932 * target.h (struct target_ops) <supports_conditional_breakpoints>:
933 New field.
934 (target_supports_conditional_breakpoints): New macro.
935
936 2015-05-06 Pedro Alves <palves@redhat.com>
937
938 PR server/18081
939 * server.c (start_inferior): If the process exits, mourn it.
940
941 2015-04-21 Gary Benson <gbenson@redhat.com>
942
943 * hostio.c (fileio_open_flags_to_host): Factored out to
944 fileio_to_host_openflags in common/fileio.c. Single use
945 updated.
946
947 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
948
949 * linux-xtensa-low.c (xtensa_fill_gregset)
950 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
951 XCHAL_HAVE_LOOP.
952
953 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
954
955 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
956 (regs_info): Replace usrregs pointer with NULL.
957
958 2015-04-17 Gary Benson <gbenson@redhat.com>
959
960 * target.h (struct target_ops) <pid_to_exec_file>: New field.
961 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
962 * server.c (handle_qxfer_exec_file): New function.
963 (qxfer_packets): Add exec-file entry.
964 (handle_query): Report qXfer:exec-file:read as supported packet.
965
966 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
967
968 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
969
970 2015-04-09 Gary Benson <gbenson@redhat.com>
971
972 * hostio-errno.c (errno_to_fileio_error): Remove function.
973 Update caller to use remote_fileio_to_fio_error.
974
975 2015-04-09 Yao Qi <yao.qi@linaro.org>
976
977 * linux-low.c (linux_insert_point): Call
978 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
979 (linux_remove_point): Call remove_memory_breakpoint if type is
980 raw_bkpt_type_sw.
981 * linux-x86-low.c (x86_insert_point): Don't call
982 insert_memory_breakpoint.
983 (x86_remove_point): Don't call remove_memory_breakpoint.
984
985 2015-04-01 Pedro Alves <palves@redhat.com>
986 Cleber Rosa <crosa@redhat.com>
987
988 * server.c (gdbserver_usage): Reorganize and extend the usage
989 message.
990
991 2015-03-24 Pedro Alves <palves@redhat.com>
992
993 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
994 output. Also dump TRAP_TRACE.
995 (linux_low_filter_event): In debug output, distinguish a
996 resume_stop SIGSTOP from a delayed SIGSTOP.
997
998 2015-03-24 Gary Benson <gbenson@redhat.com>
999
1000 * linux-x86-low.c (x86_linux_new_thread): Moved to
1001 nat/x86-linux.c.
1002 (x86_linux_prepare_to_resume): Likewise.
1003
1004 2015-03-24 Gary Benson <gbenson@redhat.com>
1005
1006 * Makefile.in (x86-linux-dregs.o): New rule.
1007 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1008 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1009 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1010 (x86_linux_dr_get): Likewise.
1011 (x86_linux_dr_set): Likewise.
1012 (update_debug_registers_callback): Likewise.
1013 (x86_linux_dr_set_addr): Likewise.
1014 (x86_linux_dr_get_addr): Likewise.
1015 (x86_linux_dr_set_control): Likewise.
1016 (x86_linux_dr_get_control): Likewise.
1017 (x86_linux_dr_get_status): Likewise.
1018 (x86_linux_update_debug_registers): Likewise.
1019
1020 2015-03-24 Gary Benson <gbenson@redhat.com>
1021
1022 * linux-x86-low.c (x86_linux_update_debug_registers):
1023 New function, factored out from...
1024 (x86_linux_prepare_to_resume): ...this.
1025
1026 2015-03-24 Gary Benson <gbenson@redhat.com>
1027
1028 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1029 (x86_linux_dr_set): Likewise.
1030 (update_debug_registers_callback): Likewise.
1031 (x86_linux_dr_set_addr): Likewise.
1032 (x86_linux_dr_get_addr): Likewise.
1033 (x86_linux_dr_set_control): Likewise.
1034 (x86_linux_dr_get_control): Likewise.
1035 (x86_linux_dr_get_status): Likewise.
1036 (x86_linux_prepare_to_resume): Likewise.
1037
1038 2015-03-24 Gary Benson <gbenson@redhat.com>
1039
1040 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1041 Use perror_with_name. Pass string through gettext.
1042 (x86_linux_dr_set): Likewise.
1043
1044 2015-03-24 Gary Benson <gbenson@redhat.com>
1045
1046 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1047 (x86_linux_dr_set_addr): ...this.
1048 (x86_dr_low_get_addr): Rename to...
1049 (x86_linux_dr_get_addr): ...this.
1050 (x86_dr_low_set_control): Rename to...
1051 (x86_linux_dr_set_control): ...this.
1052 (x86_dr_low_get_control): Rename to...
1053 (x86_linux_dr_get_control): ...this.
1054 (x86_dr_low_get_status): Rename to...
1055 (x86_linux_dr_get_status): ...this.
1056 (x86_dr_low): Update with new function names.
1057
1058 2015-03-24 Gary Benson <gbenson@redhat.com>
1059
1060 * Makefile.in (x86-linux.o): New rule.
1061 * configure.srv: Add x86-linux.o to relevant targets.
1062 * linux-low.c (lwp_set_arch_private_info): New function.
1063 (lwp_arch_private_info): Likewise.
1064 * linux-x86-low.c: Include nat/x86-linux.h.
1065 (arch_lwp_info): Removed structure.
1066 (update_debug_registers_callback):
1067 Use lwp_set_debug_registers_changed.
1068 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1069 and lwp_set_debug_registers_changed.
1070 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1071
1072 2015-03-24 Gary Benson <gbenson@redhat.com>
1073
1074 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1075 * linux-arm-low.c (arm_new_thread): Likewise.
1076 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1077 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1078 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1079 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1080
1081 2015-03-24 Gary Benson <gbenson@redhat.com>
1082
1083 * linux-low.c (ptid_of_lwp): New function.
1084 (lwp_is_stopped): Likewise.
1085 (lwp_stop_reason): Likewise.
1086 * linux-x86-low.c (update_debug_registers_callback):
1087 Use lwp_is_stopped.
1088 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1089 lwp_stop_reason.
1090
1091 2015-03-24 Gary Benson <gbenson@redhat.com>
1092
1093 * linux-low.h (linux_stop_lwp): Remove declaration.
1094
1095 2015-03-24 Gary Benson <gbenson@redhat.com>
1096
1097 * linux-low.h: Include nat/linux-nat.h.
1098 * linux-low.c (iterate_over_lwps_args): New structure.
1099 (iterate_over_lwps_filter): New function.
1100 (iterate_over_lwps): Likewise.
1101 * linux-x86-low.c (update_debug_registers_callback):
1102 Update signature to what iterate_over_lwps expects.
1103 Remove PID check that iterate_over_lwps now performs.
1104 (x86_dr_low_set_addr): Use iterate_over_lwps.
1105 (x86_dr_low_set_control): Likewise.
1106
1107 2015-03-24 Gary Benson <gbenson@redhat.com>
1108
1109 * linux-x86-low.c (x86_debug_reg_state): New function.
1110 (x86_linux_prepare_to_resume): Use the above.
1111
1112 2015-03-24 Gary Benson <gbenson@redhat.com>
1113
1114 * linux-low.c (current_lwp_ptid): New function.
1115 * linux-x86-low.c: Include nat/linux-nat.h.
1116 (x86_dr_low_get_addr): Use current_lwp_ptid.
1117 (x86_dr_low_get_control): Likewise.
1118 (x86_dr_low_get_status): Likewise.
1119
1120 2015-03-20 Pedro Alves <palves@redhat.com>
1121
1122 * tracepoint.c (cmd_qtstatus): Make "str" const.
1123
1124 2015-03-20 Pedro Alves <palves@redhat.com>
1125
1126 * server.c (handle_general_set): Make "req_str" const.
1127
1128 2015-03-19 Pedro Alves <palves@redhat.com>
1129
1130 * linux-low.c (linux_resume_one_lwp): Rename to ...
1131 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1132 instead call perror_with_name.
1133 (check_ptrace_stopped_lwp_gone): New function.
1134 (linux_resume_one_lwp): Reimplement as wrapper around
1135 linux_resume_one_lwp_throw that swallows errors if the LWP is
1136 gone.
1137
1138 2015-03-19 Pedro Alves <palves@redhat.com>
1139
1140 * linux-low.c (count_events_callback, select_event_lwp_callback):
1141 No longer check whether the thread has resume_stop as last resume
1142 kind.
1143
1144 2015-03-19 Pedro Alves <palves@redhat.com>
1145
1146 * linux-low.c (count_events_callback, select_event_lwp_callback):
1147 Use the lwp's status_pending_p field, not the thread's.
1148
1149 2015-03-19 Pedro Alves <palves@redhat.com>
1150
1151 * linux-low.c (select_event_lwp_callback): Update comments to
1152 no longer mention SIGTRAP.
1153
1154 2015-03-18 Gary Benson <gbenson@redhat.com>
1155
1156 * server.c (handle_query): Do not report vFile:fstat as supported.
1157
1158 2015-03-11 Gary Benson <gbenson@redhat.com>
1159
1160 * hostio.c (sys/types.h): New include.
1161 (sys/stat.h): Likewise.
1162 (common-remote-fileio.h): Likewise.
1163 (handle_fstat): New function.
1164 (handle_vFile): Handle vFile:fstat packets.
1165
1166 2015-03-11 Gary Benson <gbenson@redhat.com>
1167
1168 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1169 struct stat.st_blocks and struct stat.st_blksize.
1170 * configure: Regenerate.
1171 * config.in: Likewise.
1172 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1173 (OBS): Add common-remote-fileio.o.
1174 (common-remote-fileio.o): New rule.
1175
1176 2015-03-09 Pedro Alves <palves@redhat.com>
1177
1178 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1179 'struct sockaddr' pointer in 'accept' call.
1180
1181 2015-03-09 Pedro Alves <palves@redhat.com>
1182
1183 Revert:
1184 2015-03-07 Pedro Alves <palves@redhat.com>
1185 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1186 or <winsock2.h> here. Instead include "gdb_socket.h".
1187 (remote_open): Use union gdb_sockaddr_u.
1188 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1189 or <winsock2.h> here. Instead include "gdb_socket.h".
1190 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1191 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1192 or <sys/un.h>.
1193 (init_named_socket, gdb_agent_helper_thread): Use union
1194 gdb_sockaddr_u.
1195
1196 2015-03-07 Pedro Alves <palves@redhat.com>
1197
1198 * configure.ac (build_warnings): Move
1199 -Wdeclaration-after-statement to the C-specific set.
1200 * configure: Regenerate.
1201
1202 2015-03-07 Pedro Alves <palves@redhat.com>
1203
1204 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1205 or <winsock2.h> here. Instead include "gdb_socket.h".
1206 (remote_open): Use union gdb_sockaddr_u.
1207 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1208 or <winsock2.h> here. Instead include "gdb_socket.h".
1209 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1210 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1211 or <sys/un.h>.
1212 (init_named_socket, gdb_agent_helper_thread): Use union
1213 gdb_sockaddr_u.
1214
1215 2015-03-07 Pedro Alves <palves@redhat.com>
1216
1217 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1218 instead.
1219
1220 2015-03-06 Yao Qi <yao.qi@linaro.org>
1221
1222 * linux-aarch64-low.c (aarch64_insert_point): Use
1223 show_debug_regs as a boolean.
1224 (aarch64_remove_point): Likewise.
1225
1226 2015-03-05 Pedro Alves <palves@redhat.com>
1227
1228 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1229 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1230 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1231 * nto-low.c (nto_target_ops): Likewise.
1232 * spu-low.c (spu_target_ops): Likewise.
1233 * win32-low.c (win32_target_ops): Likewise.
1234
1235 2015-03-04 Pedro Alves <palves@redhat.com>
1236
1237 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1238 Decide whether a breakpoint triggered based on the SIGTRAP's
1239 siginfo.si_code.
1240 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1241 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1242 (linux_low_filter_event): Check for breakpoints before checking
1243 watchpoints.
1244 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1245 siginfo.si_code.
1246 (linux_stopped_by_sw_breakpoint)
1247 (linux_supports_stopped_by_sw_breakpoint)
1248 (linux_stopped_by_hw_breakpoint)
1249 (linux_supports_stopped_by_hw_breakpoint): New functions.
1250 (linux_target_ops): Install new target methods.
1251
1252 2015-03-04 Pedro Alves <palves@redhat.com>
1253
1254 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1255 * server.c (swbreak_feature, hwbreak_feature): New globals.
1256 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1257 (captured_main): Clear swbreak_feature and hwbreak_feature.
1258 * server.h (swbreak_feature, hwbreak_feature): Declare.
1259 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1260 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1261 supports_stopped_by_hw_breakpoint>: New fields.
1262 (target_supports_stopped_by_sw_breakpoint)
1263 (target_stopped_by_sw_breakpoint)
1264 (target_supports_stopped_by_hw_breakpoint)
1265 (target_stopped_by_hw_breakpoint): Declare.
1266
1267 2015-03-04 Pedro Alves <palves@redhat.com>
1268
1269 enum lwp_stop_reason -> enum target_stop_reason
1270 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1271 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1272 (linux_wait_1, stuck_in_jump_pad_callback)
1273 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1274 (linux_stopped_by_watchpoint):
1275 * linux-low.h (enum lwp_stop_reason): Delete.
1276 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1277 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1278
1279 2015-03-04 Yao Qi <yao.qi@linaro.org>
1280
1281 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1282
1283 2015-03-03 Gary Benson <gbenson@redhat.com>
1284
1285 * hostio.c (handle_vFile): Fix prefix lengths.
1286
1287 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1288
1289 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1290 ptr_bits.
1291
1292 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1293
1294 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1295 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1296 (clean): Add "rm -f" for above C files.
1297 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1298 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1299 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1300 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1301 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1302 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1303 (init_registers_s390x_vx_linux64)
1304 (init_registers_s390x_tevx_linux64)
1305 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1306 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1307 declarations.
1308 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1309 (s390_store_vxrs_high): New functions.
1310 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1311 NT_S390_VXRS_HIGH.
1312 (s390_arch_setup): Add logic for selecting one of the new target
1313 descriptions. Activate the new vector regsets if applicable.
1314 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1315 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1316 and init_registers_s390x_tevx_linux64.
1317
1318 2015-03-01 Pedro Alves <palves@redhat.com>
1319
1320 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1321 parameter.
1322
1323 2015-02-27 Pedro Alves <palves@redhat.com>
1324
1325 * linux-x86-low.c (u_debugreg_offset): New function.
1326 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1327
1328 2015-02-27 Pedro Alves <palves@redhat.com>
1329
1330 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1331 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1332 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1333 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1334 (ps_lsetfpregs, ps_getpid)
1335 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1336 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1337 (ps_lsetxregs, ps_plog): Declare.
1338
1339 2015-02-27 Pedro Alves <palves@redhat.com>
1340
1341 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1342 IP_AGENT_EXPORT_FUNC.
1343 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1344 IP_AGENT_EXPORT_FUNC.
1345 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1346 (IP_AGENT_EXPORT): Delete.
1347 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1348 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1349 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1350 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1351 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1352 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1353 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1354 (traceframe_read_count, traceframe_write_count)
1355 (traceframes_created, trace_state_variables, get_raw_reg)
1356 (get_trace_state_variable_value, set_trace_state_variable_value)
1357 (ust_loaded, helper_thread_id, cmd_buf): Use
1358 IPA_SYM_EXPORTED_NAME.
1359 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1360 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1361 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1362 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1363 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1364 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1365 EXTERN_C_PUSH/EXTERN_C_POP.
1366 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1367 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1368 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1369 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1370 (traceframe_write_count, traceframe_read_count)
1371 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1372 (about_to_request_buffer_space, get_trace_state_variable_value)
1373 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1374 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1375 EXTERN_C_PUSH/EXTERN_C_POP.
1376 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1377 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1378 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1379 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1380 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1381 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1382 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1383 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1384 Define.
1385 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1386 (IP_AGENT_EXPORT_VAR_DECL): Define.
1387 (tracing): Declare.
1388 (gdb_agent_get_raw_reg): Declare.
1389
1390 2015-02-27 Tom Tromey <tromey@redhat.com>
1391 Pedro Alves <palves@redhat.com>
1392
1393 Rename symbols whose names are reserved C++ keywords throughout.
1394
1395 2015-02-27 Pedro Alves <palves@redhat.com>
1396
1397 * Makefile.in (COMPILER): New, get it from autoconf.
1398 (CXX): Get from autoconf instead.
1399 (COMPILE.pre): Use COMPILER.
1400 (CC-LD): Rename to ...
1401 (CC_LD): ... this. Use COMPILER.
1402 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1403 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1404 * acinclude.m4: Include build-with-cxx.m4.
1405 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1406 Disable -Werror by default if building in C++ mode.
1407 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1408 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1409 the C++ compiler. Save/restore CXXFLAGS too.
1410 * configure: Regenerate.
1411
1412 2015-02-27 Pedro Alves <palves@redhat.com>
1413
1414 * acinclude.m4: Include libiberty.m4.
1415 * configure.ac: Call libiberty_INIT.
1416 * config.in, configure: Regenerate.
1417
1418 2015-02-26 Pedro Alves <palves@redhat.com>
1419
1420 * linux-low.c (linux_wait_1): When incrementing the PC past a
1421 program breakpoint always use the_low_target.breakpoint_len as
1422 increment, rather than the maximum between that and
1423 the_low_target.decr_pc_after_break.
1424
1425 2015-02-23 Pedro Alves <palves@redhat.com>
1426
1427 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1428 thread was doing a step-over; always adjust the PC if
1429 we stepped over a permanent breakpoint.
1430 (linux_wait_1): If we stepped over breakpoint that was on top of a
1431 permanent breakpoint, manually advance the PC past it.
1432
1433 2015-02-23 Pedro Alves <palves@redhat.com>
1434
1435 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1436 modes.
1437 (x86_fill_gregset, x86_store_gregset): Use it when handling
1438 $orig_eax.
1439
1440 2015-02-20 Pedro Alves <palves@redhat.com>
1441
1442 * thread-db.c: Include "nat/linux-procfs.h".
1443 (thread_db_init): Skip listing new threads if the kernel supports
1444 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1445
1446 2015-02-20 Pedro Alves <palves@redhat.com>
1447
1448 * linux-low.c (status_pending_p_callback): Use ptid_match.
1449
1450 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1451
1452 PR breakpoints/16812
1453 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1454 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1455 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1456
1457 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1458
1459 PR breakpoints/15956
1460 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1461
1462 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1463
1464 * linux-low.c (linux_low_btrace_conf): Print size.
1465 * server.c (handle_btrace_conf_general_set): New.
1466 (hanle_general_set): Call handle_btrace_conf_general_set.
1467 (handle_query): Report Qbtrace-conf:bts:size as supported.
1468
1469 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1470
1471 * linux-low.c (linux_low_enable_btrace): Update parameters.
1472 (linux_low_btrace_conf): New.
1473 (linux_target_ops)<to_btrace_conf>: Initialize.
1474 * server.c (current_btrace_conf): New.
1475 (handle_btrace_enable): Rename to ...
1476 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1477 to target_enable_btrace. Update comment. Update users.
1478 (handle_qxfer_btrace_conf): New.
1479 (qxfer_packets): Add btrace-conf entry.
1480 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1481 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1482 (target_ops)<read_btrace_conf>: New.
1483 (target_enable_btrace): Update parameters.
1484 (target_read_btrace_conf): New.
1485
1486 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1487
1488 * server.c (handle_btrace_general_set): Remove call to
1489 target_supports_btrace.
1490 (supported_btrace_packets): New.
1491 (handle_query): Call supported_btrace_packets.
1492 * target.h: include btrace-common.h.
1493 (btrace_target_info): Removed.
1494 (supports_btrace, target_supports_btrace): Update parameters.
1495
1496 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1497
1498 * Makefile.in (SFILES): Add common/btrace-common.c.
1499 (OBS): Add common/btrace-common.o.
1500 (btrace-common.o): Add build rules.
1501 * linux-low: Include btrace-common.h.
1502 (linux_low_read_btrace): Use struct btrace_data. Call
1503 btrace_data_init and btrace_data_fini.
1504
1505 2015-02-06 Pedro Alves <palves@redhat.com>
1506
1507 * thread-db.c (find_new_threads_callback): Add debug output.
1508
1509 2015-02-04 Pedro Alves <palves@redhat.com>
1510
1511 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1512 (resume_stopped_resumed_lwps): New function.
1513 (linux_wait_for_event_filtered): Use it.
1514
1515 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1516
1517 * Makefile.in (SFILES): Add linux-personality.c.
1518 (linux-personality.o): New rule.
1519 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1520 list of objects to be built.
1521 * linux-low.c: Include nat/linux-personality.h.
1522 (linux_create_inferior): Remove code to disable address space
1523 randomization (moved to ../nat/linux-personality.c). Create
1524 cleanup to disable address space randomization.
1525
1526 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1527
1528 * Makefile.in (posix-strerror.o): New rule.
1529 (mingw-strerror.o): Likewise.
1530 * configure: Regenerated.
1531 * configure.ac: Source file ../common/common.host. Initialize new
1532 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1533
1534 2015-01-14 Yao Qi <yao@codesourcery.com>
1535
1536 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1537 (ppc-linux.o): New rule.
1538 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1539 * configure.ac: AC_CHECK_FUNCS(getauxval).
1540 * config.in: Re-generated.
1541 * configure: Re-generated.
1542 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1543 ppc64_64bit_inferior_p
1544
1545 2015-01-14 Yao Qi <yao@codesourcery.com>
1546
1547 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1548 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1549 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1550 (PT_ORIG_R3, PT_TRAP): Likewise.
1551 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1552 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1553 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1554
1555 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1556
1557 * i387-fp.c (i387_cache_to_xsave): In look over
1558 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1559 zmmh_low_space field by use of zmmh_high_space.
1560
1561 2015-01-09 Pedro Alves <palves@redhat.com>
1562
1563 * linux-low.c (step_over_bkpt): Move higher up in the file.
1564 (handle_extended_wait): Don't store the stop_pc here.
1565 (get_stop_pc): Adjust comments and rename to ...
1566 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1567 stopped for a software breakpoint or hardware breakpoint.
1568 (thread_still_has_status_pending_p): New function.
1569 (status_pending_p_callback): Use
1570 thread_still_has_status_pending_p. If the event is no longer
1571 interesting, resume the LWP.
1572 (handle_tracepoints): Add assert.
1573 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1574 (wstatus_maybe_breakpoint): New function.
1575 (cancel_breakpoint): Delete function.
1576 (check_stopped_by_watchpoint): New function, factored out from
1577 linux_low_filter_event.
1578 (lp_status_maybe_breakpoint): Delete function.
1579 (linux_low_filter_event): Remove filter_ptid argument.
1580 Leave thread group exits pending here. Store the LWP's stop PC.
1581 Always leave events pending.
1582 (linux_wait_for_event_filtered): Pull all events out of the
1583 kernel, and leave them all pending.
1584 (count_events_callback, select_event_lwp_callback): Consider all
1585 events.
1586 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1587 (select_event_lwp): Only give preference to the stepping LWP in
1588 all-stop mode. Adjust comments.
1589 (ignore_event): New function.
1590 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1591 references to cancel_breakpoints. Adjust to renames. Also give
1592 equal priority to all LWPs that have had events in non-stop mode.
1593 If reporting a software breakpoint event, unadjust the LWP's PC.
1594 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1595 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1596 Adjust.
1597 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1598 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1599 (linux_stopped_by_watchpoint): Adjust.
1600 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1601 * linux-low.h (enum lwp_stop_reason): New.
1602 (struct lwp_info) <stop_pc>: Adjust comment.
1603 <stopped_by_watchpoint>: Delete field.
1604 <stop_reason>: New field.
1605 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1606 * mem-break.c (software_breakpoint_inserted_here)
1607 (hardware_breakpoint_inserted_here): New function.
1608 * mem-break.h (software_breakpoint_inserted_here)
1609 (hardware_breakpoint_inserted_here): Declare.
1610 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1611 (cancel_breakpoints): Delete.
1612 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1613 (upload_fast_traceframes): Remove references to
1614 cancel_breakpoints.
1615
1616 2015-01-09 Pedro Alves <palves@redhat.com>
1617
1618 * thread-db.c (find_new_threads_callback): Ignore thread if the
1619 kernel thread ID is -1.
1620
1621 2015-01-09 Pedro Alves <palves@redhat.com>
1622
1623 * linux-low.c (linux_attach_fail_reason_string): Move to
1624 nat/linux-ptrace.c, and rename.
1625 (linux_attach_lwp): Update comment.
1626 (attach_proc_task_lwp_callback): New function.
1627 (linux_attach): Adjust to rename and use
1628 linux_proc_attach_tgid_threads.
1629 (linux_attach_fail_reason_string): Delete declaration.
1630
1631 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1632
1633 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1634 * server.c (gdbserver_version): Likewise.
1635
1636 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1637
1638 * remote-utils.c: Include ctype.h.
1639 (input_interrupt): Explicitly handle the case when the char
1640 received is the NUL byte. Improve the printing of non-ASCII
1641 characters.
1642
1643 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1644
1645 * linux-low.c (linux_low_filter_event): Update call to
1646 linux_enable_event_reporting following the addition of
1647 a new parameter to that function.
1648
1649 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1650
1651 PR server/17457
1652 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1653 (AARCH64_FPCR_REGNO): Likewise.
1654 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1655 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1656 (aarch64_store_fpregset): Likewise.
1657
1658 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1659
1660 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1661 Remove FIXME comment about assumption about N.
1662
1663 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1664
1665 * configure.ac: If large-file support is disabled in GDBserver,
1666 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1667 * configure: Regenerate.
1668
1669 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1670
1671 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1672 warning upon ENODATA from ptrace.
1673 * linux-s390-low.c (s390_store_tdb): New.
1674 (s390_regsets): Add regset for NT_S390_TDB.
1675
1676 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1677
1678 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1679 without a fill_function.
1680 * linux-s390-low.c (s390_fill_last_break): Remove.
1681 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1682 (s390_arch_setup): Use regset's size instead of fill_function for
1683 loop end condition.
1684
1685 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1686
1687 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1688 the regset's store function when ptrace returned an error.
1689 * regcache.c (get_thread_regcache): Invalidate register cache
1690 before fetching inferior's registers.
1691
1692 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1693
1694 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1695 while-loop as for-loop.
1696 (regsets_store_inferior_registers): Likewise.
1697
1698 2014-11-28 Yao Qi <yao@codesourcery.com>
1699
1700 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1701 * config.in, configure: Re-generate.
1702 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1703 is defined.
1704
1705 2014-11-21 Yao Qi <yao@codesourcery.com>
1706
1707 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1708 (AC_CHECK_HEADERS): Remove malloc.h.
1709 * configure: Re-generated.
1710 * config.in: Re-generated.
1711 * server.h: Don't include alloca.h and malloc.h.
1712 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1713 Don't include malloc.h.
1714
1715 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1716
1717 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1718 corresponding ERRNO check in same block.
1719
1720 2014-11-12 Pedro Alves <palves@redhat.com>
1721
1722 * server.c (cont_thread): Update comment.
1723 (start_inferior, attach_inferior): No longer clear cont_thread.
1724 (handle_v_cont): No longer set cont_thread.
1725 (captured_main): Clear cont_thread each time a GDB connects.
1726
1727 2014-11-12 Pedro Alves <palves@redhat.com>
1728
1729 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1730 thread, and don't resume all threads if the Hc thread has exited.
1731
1732 2014-11-12 Pedro Alves <palves@redhat.com>
1733
1734 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1735 the process group instead of to a specific LWP.
1736
1737 2014-10-15 Pedro Alves <palves@redhat.com>
1738
1739 PR server/17487
1740 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1741 parameter.
1742 (arm_set_thread_context): Delete.
1743 (the_low_target): Adjust.
1744 * win32-i386-low.c (debug_registers_changed)
1745 (debug_registers_used): Delete.
1746 (update_debug_registers_callback): New function.
1747 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1748 needing to update their debug registers.
1749 (win32_get_current_dr): New function.
1750 (x86_dr_low_get_addr, x86_dr_low_get_control)
1751 (x86_dr_low_get_status): Fetch the debug register from the thread
1752 record's context.
1753 (i386_initial_stuff): Adjust.
1754 (i386_get_thread_context): Remove current_event parameter. Don't
1755 clear debug_registers_changed nor copy DR values to
1756 debug_reg_state.
1757 (i386_set_thread_context): Delete.
1758 (i386_prepare_to_resume): New function.
1759 (i386_thread_added): Mark the thread as needing to update irs
1760 debug registers.
1761 (the_low_target): Remove i386_set_thread_context and install
1762 i386_prepare_to_resume.
1763 * win32-low.c (win32_get_thread_context): Adjust.
1764 (win32_set_thread_context): Use SetThreadContext
1765 directly.
1766 (win32_prepare_to_resume): New function.
1767 (win32_require_context): New function, factored out from ...
1768 (thread_rec): ... this.
1769 (continue_one_thread): Call win32_prepare_to_resume on each thread
1770 we're about to continue.
1771 (win32_resume): Call win32_prepare_to_resume on the event thread.
1772 * win32-low.h (struct win32_thread_info)
1773 <debug_registers_changed>: New field.
1774 (struct win32_target_ops): Change prototype of set_thread_context,
1775 delete set_thread_context and add prepare_to_resume.
1776 (win32_require_context): New declaration.
1777
1778 2014-10-08 Gary Benson <gbenson@redhat.com>
1779
1780 * server.h: Do not include common-exceptions.h.
1781
1782 2014-10-08 Gary Benson <gbenson@redhat.com>
1783
1784 * server.h: Do not include cleanups.h.
1785
1786 2014-09-30 James Hogan <james.hogan@imgtec.com>
1787
1788 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1789 mips64-dsp-linux.c.
1790
1791 2014-09-23 Yao Qi <yao@codesourcery.com>
1792
1793 * linux-low.c (lp_status_maybe_breakpoint): New function.
1794 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1795 (count_events_callback): Likewise.
1796 (select_event_lwp_callback): Likewise.
1797 (cancel_breakpoints_callback): Likewise.
1798
1799 2014-09-19 Don Breazeal <donb@codesourcery.com>
1800
1801 * linux-low.c (handle_extended_wait): Call
1802 linux_ptrace_get_extended_event.
1803 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1804 linux_is_extended_waitstatus.
1805
1806 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1807
1808 * Makefile.in (CPPFLAGS): Define.
1809 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1810 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1811
1812 2014-09-16 Gary Benson <gbenson@redhat.com>
1813
1814 * inferiors.h (current_inferior): Renamed as...
1815 (current_thread): New variable. All uses updated.
1816 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1817 (maybe_move_out_of_jump_pad): Likewise.
1818 (cancel_breakpoint): Likewise.
1819 (linux_low_filter_event): Likewise.
1820 (wait_for_sigstop): Likewise.
1821 (linux_resume_one_lwp): Likewise.
1822 (need_step_over_p): Likewise.
1823 (start_step_over): Likewise.
1824 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1825 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1826 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1827 and save_inferior as saved_thread.
1828 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1829 saved_thread.
1830 (regcache_invalidate_thread): Likewise.
1831 * remote-utils.c (prepare_resume_reply): Likewise.
1832 * thread-db.c (thread_db_get_tls_address): Likewise.
1833 (disable_thread_event_reporting): Likewise.
1834 (remove_thread_event_breakpoints): Likewise.
1835 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1836 as saved_thread.
1837 * target.h (set_desired_inferior): Renamed as...
1838 (set_desired_thread): New declaration. All uses updated.
1839 * server.c (myresume): Updated comment to reference thread instead
1840 of inferior.
1841 (handle_serial_event): Likewise.
1842 (handle_target_event): Likewise.
1843
1844 2014-09-12 Tom Tromey <tromey@redhat.com>
1845 Gary Benson <gbenson@redhat.com>
1846
1847 * regcache.h: Include common-regcache.h.
1848 (regcache_read_pc): Don't declare.
1849 * regcache.c (get_thread_regcache_for_ptid): New function.
1850
1851 2014-09-11 Tom Tromey <tromey@redhat.com>
1852 Gary Benson <gbenson@redhat.com>
1853
1854 * symbol.c: New file.
1855 * Makefile.in (SFILES): Add symbol.c.
1856 (OBS): Add symbol.o.
1857
1858 2014-09-11 Gary Benson <gbenson@redhat.com>
1859
1860 * target.c (target_stop_ptid, target_continue_ptid): New
1861 functions.
1862
1863 2014-09-11 Tom Tromey <tromey@redhat.com>
1864 Gary Benson <gbenson@redhat.com>
1865
1866 * target.h: Include target/target.h.
1867 * target.c (target_read_memory, target_read_uint32)
1868 (target_write_memory): New functions.
1869
1870 2014-09-11 Gary Benson <gbenson@redhat.com>
1871
1872 * server.h (debug_hw_points): Don't declare.
1873 * server.c (debug_hw_points): Don't define. Replace all uses
1874 with show_debug_regs.
1875 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1876 all uses with show_debug_regs.
1877
1878 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1879
1880 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1881 endianness into account.
1882 (ppc_supply_ptrace_register): Likewise.
1883
1884 2014-09-03 James Hogan <james.hogan@imgtec.com>
1885
1886 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1887 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1888
1889 2014-09-03 Gary Benson <gbenson@redhat.com>
1890
1891 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1892 ALL_DEBUG_ADDRESS_REGISTERS.
1893
1894 2014-09-02 Gary Benson <gbenson@redhat.com>
1895
1896 * i386-low.h: Renamed as...
1897 * x86-low.h: New file. All type, function and variable name
1898 prefixes changed from "i386_" to "x86_". All references updated.
1899 * i386-low.c: Renamed as...
1900 * x86-low.c: New file. All type, function and variable name
1901 prefixes changed from "i386_" to "x86_". All references updated.
1902
1903 2014-09-02 Gary Benson <gbenson@redhat.com>
1904
1905 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1906 (x86_linux_new_thread): Likewise.
1907
1908 2014-08-29 Gary Benson <gbenson@redhat.com>
1909
1910 * server.h (setjmp.h): Do not include.
1911 (toplevel): Do not declare.
1912 (common-exceptions.h): Include.
1913 (cleanups.h): Likewise.
1914 * server.c (toplevel): Do not define.
1915 (exit_code): New static global.
1916 (detach_or_kill_for_exit_cleanup): New function.
1917 (main): New function. Original main renamed to...
1918 (captured_main): New function.
1919 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1920
1921 2014-08-29 Gary Benson <gbenson@redhat.com>
1922
1923 * Makefile.in (SFILES): Add common/common-exceptions.c.
1924 (OBS): Add common-exceptions.o.
1925 (common-exceptions.o): New rule.
1926 * utils.c (prepare_to_throw_exception): New function.
1927
1928 2014-08-29 Gary Benson <gbenson@redhat.com>
1929
1930 * config.in: Regenerate.
1931 * configure: Likewise.
1932
1933 2014-08-29 Gary Benson <gbenson@redhat.com>
1934
1935 * Makefile.in (SFILES): Add common/cleanups.c.
1936 (OBS): cleanups.o.
1937 (cleanups.o): New rule.
1938
1939 2014-08-29 Gary Benson <gbenson@redhat.com>
1940
1941 * utils.c (internal_vwarning): New function.
1942
1943 2014-08-28 Gary Benson <gbenson@redhat.com>
1944
1945 * utils.h (fatal): Remove declaration.
1946 * utils.c (fatal): Remove function.
1947
1948 2014-08-28 Gary Benson <gbenson@redhat.com>
1949
1950 * tracepoint.c (gdb_agent_init): Replace fatal with
1951 perror_with_name.
1952 (initialize_tracepoint): Likewise.
1953
1954 2014-08-28 Gary Benson <gbenson@redhat.com>
1955
1956 * remote-utils.c (remote_prepare): Replace fatal with error.
1957
1958 2014-08-28 Gary Benson <gbenson@redhat.com>
1959
1960 * linux-low.c (linux_async): Replace fatal with warning.
1961 Tidy up and return.
1962 (linux_start_non_stop): Return -1 if linux_async failed.
1963
1964 2014-08-28 Gary Benson <gbenson@redhat.com>
1965
1966 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1967 gdb_assert.
1968 (i386_dr_low_get_addr): Remove vague comment.
1969 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1970 gdb_assert.
1971
1972 2014-08-28 Gary Benson <gbenson@redhat.com>
1973
1974 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1975 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1976 internal_error.
1977 (linux_resume_one_lwp): Likewise.
1978 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1979 gdb_assert.
1980 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1981 with internal_error.
1982 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1983 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1984 (find_register_by_name): Replace fatal with internal_error.
1985 (find_regno): Likewise.
1986 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1987 * thread-db.c (thread_db_create_event): Likewise.
1988 (thread_db_load_search): Likewise.
1989 (try_thread_db_load_1): Likewise.
1990 * tracepoint.c (get_jump_space_head): Replace fatal with
1991 internal_error.
1992 (claim_trampoline_space): Likewise.
1993 (have_fast_tracepoint_trampoline_buffer): Likewise.
1994 (cmd_qtstart): Likewise.
1995 (stop_tracing): Likewise.
1996 (fast_tracepoint_collecting): Likewise.
1997 (target_malloc): Likewise.
1998 (download_tracepoint): Likewise.
1999 (download_trace_state_variables): Replace check with gdb_assert.
2000 (upload_fast_traceframes): Replace fatal with internal_error.
2001
2002 2014-08-19 Tom Tromey <tromey@redhat.com>
2003 Gary Benson <gbenson@redhat.com>
2004
2005 * Makefile.in (SFILES): Add common/common-debug.c.
2006 (OBS): Add common-debug.o.
2007 (common-debug.o): New rule.
2008 * debug.h (debug_printf): Don't declare.
2009 * debug.c (debug_printf): Renamed and rewritten as...
2010 (debug_vprintf): New function.
2011
2012 2014-08-19 Gary Benson <gbenson@redhat.com>
2013
2014 * utils.h: Do not include print-utils.h.
2015
2016 2014-08-19 Tom Tromey <tromey@redhat.com>
2017 Gary Benson <gbenson@redhat.com>
2018
2019 * server.h: Add static assertion.
2020 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2021
2022 2014-08-19 Tom Tromey <tromey@redhat.com>
2023 Gary Benson <gbenson@redhat.com>
2024
2025 * Makefile.in (SFILES): Add common/errors.c.
2026 (OBS): Add errors.o.
2027 (IPA_OBS): Add errors-ipa.o.
2028 (errors.o): New rule.
2029 (errors-ipa.o): Likewise.
2030 * utils.h (perror_with_name, error, warning): Don't declare.
2031 * utils.c (warning): Renamed and rewritten as...
2032 (vwarning): New function.
2033 (error): Renamed and rewritten as...
2034 (verror): New function.
2035 (internal_error): Renamed and rewritten as...
2036 (internal_verror): New function.
2037
2038 2014-08-07 Gary Benson <gbenson@redhat.com>
2039
2040 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2041 * configure: Regenerate.
2042 * config.in: Likewise.
2043 * server.h: Do not include errno.h.
2044 * event-loop.c: Likewise.
2045 * hostio-errno.c: Likewise.
2046 * linux-low.c: Likewise.
2047 * remote-utils.c: Likewise.
2048 * spu-low.c: Likewise.
2049 * utils.c: Likewise.
2050 * gdbreplay.c: Unconditionally include errno.h.
2051
2052 2014-08-07 Gary Benson <gbenson@redhat.com>
2053
2054 * server.h: Do not include string.h.
2055 * event-loop.c: Likewise.
2056 * linux-low.c: Likewise.
2057 * regcache.c: Likewise.
2058 * remote-utils.c: Likewise.
2059 * spu-low.c: Likewise.
2060 * utils.c: Likewise.
2061
2062 2014-08-07 Gary Benson <gbenson@redhat.com>
2063
2064 * server.h: Do not include gdb_assert.h.
2065
2066 2014-08-07 Gary Benson <gbenson@redhat.com>
2067
2068 * server.h: Do not include common-utils.h.
2069
2070 2014-08-07 Gary Benson <gbenson@redhat.com>
2071
2072 * server.h: Do not include ptid.h.
2073 * notif.h: Likewise.
2074
2075 2014-08-07 Gary Benson <gbenson@redhat.com>
2076
2077 * server.h: Do not include gdb_locale.h.
2078
2079 2014-08-07 Gary Benson <gbenson@redhat.com>
2080
2081 * server.h: Do not include gdb/signals.h.
2082 * win32-low.c: Likewise.
2083
2084 2014-08-07 Gary Benson <gbenson@redhat.com>
2085
2086 * server.h: Do not include pathmax.h.
2087
2088 2014-08-07 Gary Benson <gbenson@redhat.com>
2089
2090 * server.h: Do not include libiberty.h.
2091 * linux-bfin-low.c: Likewise.
2092
2093 2014-08-07 Gary Benson <gbenson@redhat.com>
2094
2095 * server.h: Do not include ansidecl.h.
2096
2097 2014-08-07 Gary Benson <gbenson@redhat.com>
2098
2099 * linux-x86-low.c: Do not include stddef.h.
2100 * lynx-ppc-low.c: Likewise.
2101 * tracepoint.c: Likewise.
2102
2103 2014-08-07 Gary Benson <gbenson@redhat.com>
2104
2105 * server.h: Do not include stdarg.h.
2106 * nto-low.c: Likewise.
2107
2108 2014-08-07 Gary Benson <gbenson@redhat.com>
2109
2110 * server.h: Do not include stdlib.h.
2111 * inferiors.c: Likewise.
2112 * linux-low.c: Likewise.
2113 * regcache.c: Likewise.
2114 * spu-low.c: Likewise.
2115 * tracepoint.c: Likewise.
2116 * utils.c: Likewise.
2117
2118 2014-08-07 Gary Benson <gbenson@redhat.com>
2119
2120 * server.h: Do not include stdio.h.
2121 * linux-low.c: Likewise.
2122 * remote-utils.c: Likewise.
2123 * spu-low.c: Likewise.
2124 * utils.c: Likewise.
2125 * wincecompat.c: Likewise.
2126
2127 2014-08-06 Gary Benson <gbenson@redhat.com>
2128
2129 * regcache.c (init_register_cache): Move conditionals inside if.
2130
2131 2014-08-06 Gary Benson <gbenson@redhat.com>
2132
2133 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2134
2135 2014-07-31 Gary Benson <gbenson@redhat.com>
2136
2137 * ax.h: Do not include server.h.
2138 * gdbthread.h: Likewise.
2139 * lynx-low.h: Likewise.
2140 * notif.h: Likewise.
2141
2142 2014-07-30 Gary Benson <gbenson@redhat.com>
2143
2144 * server.h: Include common-defs.h.
2145 Do not include config.h or build-gnulib-gdbserver/config.h.
2146
2147 2014-07-30 Gary Benson <gbenson@redhat.com>
2148
2149 * hostio-errno.c: Move server.h to top of includes list.
2150 * inferiors.c: Likewise.
2151 * linux-x86-low.c: Likewise.
2152 * notif.c: Include server.h.
2153
2154 2014-07-24 Tom Tromey <tromey@redhat.com>
2155 Gary Benson <gbenson@redhat.com>
2156
2157 * server.h (CORE_ADDR): Now unsigned.
2158
2159 2014-07-16 Pedro Alves <palves@redhat.com>
2160
2161 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2162
2163 2014-07-15 Pedro Alves <palves@redhat.com>
2164
2165 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2166 copy.
2167
2168 2014-07-11 Pedro Alves <palves@redhat.com>
2169
2170 * linux-low.c (kill_wait_lwp): New function, based on
2171 kill_one_lwp_callback, but use my_waitpid directly.
2172 (kill_one_lwp_callback, linux_kill): Use it.
2173
2174 2014-06-23 Pedro Alves <palves@redhat.com>
2175
2176 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2177 before setting DR0..DR3.
2178
2179 2014-06-20 Gary Benson <gbenson@redhat.com>
2180
2181 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2182 * configure: Regenerated.
2183 * config.in: Likewise.
2184
2185 2014-06-20 Gary Benson <gbenson@redhat.com>
2186
2187 * Makefile.in (SFILES): Update locations for files moved
2188 from common to nat.
2189 (object file files): Reordered.
2190
2191 2014-06-20 Gary Benson <gbenson@redhat.com>
2192
2193 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2194 (i386_dr_low_set_addr): Likewise.
2195 (i386_dr_low_get_addr): Likewise.
2196 (i386_dr_low_can_set_control): Likewise.
2197 (i386_dr_low_set_control): Likewise.
2198 (i386_dr_low_get_control): Likewise.
2199 (i386_dr_low_get_status): Likewise.
2200 (i386_get_debug_register_length): Likewise.
2201 * linux-x86-low.c (i386_dr_low_set_addr):
2202 Changed signature. Made static.
2203 (i386_dr_low_get_addr): Likewise.
2204 (i386_dr_low_set_control): Likewise.
2205 (i386_dr_low_get_control): Likewise.
2206 (i386_dr_low_get_status): Likewise.
2207 (i386_dr_low): New global variable.
2208 * win32-i386-low.c (i386_dr_low_set_addr):
2209 Changed signature. Made static.
2210 (i386_dr_low_get_addr): Likewise.
2211 (i386_dr_low_set_control): Likewise.
2212 (i386_dr_low_get_control): Likewise.
2213 (i386_dr_low_get_status): Likewise.
2214 (i386_dr_low): New global variable.
2215
2216 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2217
2218 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2219 * Makefile.in (AR, AR_FLAGS): Define.
2220 * configure: Regenerate.
2221
2222 2014-06-19 Gary Benson <gbenson@redhat.com>
2223
2224 * Makefile.in (i386-dregs.o): New rule.
2225 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2226 * i386-low.c (target.h): Remove include.
2227 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2228 (DR_CONTROL_SHIFT): Likewise.
2229 (DR_CONTROL_SIZE): Likewise.
2230 (DR_RW_EXECUTE): Likewise.
2231 (DR_RW_WRITE): Likewise.
2232 (DR_RW_READ): Likewise.
2233 (DR_RW_IORW): Likewise.
2234 (DR_LEN_1): Likewise.
2235 (DR_LEN_2): Likewise.
2236 (DR_LEN_4): Likewise.
2237 (DR_LEN_8): Likewise.
2238 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2239 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2240 (DR_ENABLE_SIZE): Likewise.
2241 (DR_LOCAL_SLOWDOWN): Likewise.
2242 (DR_GLOBAL_SLOWDOWN): Likewise.
2243 (DR_CONTROL_RESERVED): Likewise.
2244 (I386_DR_CONTROL_MASK): Likewise.
2245 (I386_DR_VACANT): Likewise.
2246 (I386_DR_LOCAL_ENABLE): Likewise.
2247 (I386_DR_GLOBAL_ENABLE): Likewise.
2248 (I386_DR_DISABLE): Likewise.
2249 (I386_DR_SET_RW_LEN): Likewise.
2250 (I386_DR_GET_RW_LEN): Likewise.
2251 (I386_DR_WATCH_HIT): Likewise.
2252 (i386_wp_op_t): Likewise.
2253 (i386_show_dr): Likewise.
2254 (i386_length_and_rw_bits): Likewise.
2255 (i386_insert_aligned_watchpoint): Likewise.
2256 (i386_remove_aligned_watchpoint): Likewise.
2257 (i386_handle_nonaligned_watchpoint): Likewise.
2258 i386_update_inferior_debug_regs(): Likewise.
2259 (i386_dr_insert_watchpoint): Likewise.
2260 (i386_dr_remove_watchpoint): Likewise.
2261 (i386_dr_region_ok_for_watchpoint): Likewise.
2262 (i386_dr_stopped_data_address): Likewise.
2263 (i386_dr_stopped_by_watchpoint): Likewise.
2264
2265 2014-06-19 Gary Benson <gbenson@redhat.com>
2266
2267 * i386-low.c (i386_dr_show): Renamed to
2268 i386_show_dr and made static. All uses updated.
2269 (i386_dr_length_and_rw_bits): Renamed to
2270 i386_length_and_rw_bits and made static.
2271 All uses updated.
2272 (i386_dr_insert_aligned_watchpoint): Renamed to
2273 i386_insert_aligned_watchpoint and made static.
2274 All uses updated.
2275 (i386_dr_remove_aligned_watchpoint): Renamed to
2276 i386_remove_aligned_watchpoint and made static.
2277 All uses updated.
2278 (i386_dr_update_inferior_debug_regs): Renamed to
2279 i386_update_inferior_debug_regs and made static.
2280 All uses updated.
2281
2282 2014-06-18 Gary Benson <gbenson@redhat.com>
2283
2284 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2285 (i386_dr_low_can_set_control): Likewise.
2286 (i386_get_debug_register_length): Likewise.
2287 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2288 (i386_dr_low_can_set_control): Likewise.
2289 (i386_get_debug_register_length): Likewise.
2290
2291 2014-06-17 Gary Benson <gbenson@redhat.com>
2292
2293 * i386-low.h (i386-dregs.h): New include.
2294 (DR_FIRSTADDR): Now in i386-dregs.h.
2295 (DR_LASTADDR): Likewise.
2296 (DR_NADDR): Likewise.
2297 (DR_STATUS): Likewise.
2298 (DR_CONTROL): Likewise.
2299 (i386_debug_reg_state): Likewise.
2300 (i386_dr_insert_watchpoint): Likewise.
2301 (i386_dr_remove_watchpoint): Likewise.
2302 (i386_dr_region_ok_for_watchpoint): Likewise.
2303 (i386_dr_stopped_data_address): Likewise.
2304 (i386_dr_stopped_by_watchpoint): Likewise.
2305 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2306
2307 2014-06-18 Gary Benson <gbenson@redhat.com>
2308
2309 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2310 i386_dr_insert_watchpoint.
2311 (i386_low_remove_watchpoint): Renamed to
2312 i386_dr_remove_watchpoint.
2313 (i386_low_region_ok_for_watchpoint): Renamed to
2314 i386_dr_region_ok_for_watchpoint.
2315 (i386_low_stopped_data_address): Renamed to
2316 i386_dr_stopped_data_address.
2317 (i386_low_stopped_by_watchpoint): Renamed to
2318 i386_dr_stopped_by_watchpoint.
2319 * i386-low.c (i386_show_dr): Renamed to
2320 i386_dr_show and made nonstatic. All uses updated.
2321 (i386_length_and_rw_bits): Renamed to
2322 i386_dr_length_and_rw_bits and made nonstatic.
2323 All uses updated.
2324 (i386_insert_aligned_watchpoint): Renamed to
2325 i386_dr_insert_aligned_watchpoint and made nonstatic.
2326 All uses updated.
2327 (i386_remove_aligned_watchpoint): Renamed to
2328 i386_dr_remove_aligned_watchpoint and made nonstatic.
2329 All uses updated.
2330 (i386_update_inferior_debug_regs): Renamed to
2331 i386_dr_update_inferior_debug_regs and made nonstatic.
2332 All uses updated.
2333 (i386_low_insert_watchpoint): Renamed to
2334 i386_dr_insert_watchpoint. All uses updated.
2335 (i386_low_remove_watchpoint): Renamed to
2336 i386_dr_remove_watchpoint. All uses updated.
2337 (i386_low_region_ok_for_watchpoint): Renamed to
2338 i386_dr_region_ok_for_watchpoint. All uses updated.
2339 (i386_low_stopped_data_address): Renamed to
2340 i386_dr_stopped_data_address. All uses updated.
2341 (i386_low_stopped_by_watchpoint): Renamed to
2342 i386_dr_stopped_by_watchpoint. All uses updated.
2343
2344 2014-06-18 Gary Benson <gbenson@redhat.com>
2345
2346 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2347 (i386_dr_low_can_set_control): Likewise.
2348 (i386_insert_aligned_watchpoint): New check.
2349
2350 2014-06-18 Gary Benson <gbenson@redhat.com>
2351
2352 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2353 Renamed to state.
2354
2355 2014-06-18 Gary Benson <gbenson@redhat.com>
2356
2357 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2358 instead of fatal and error.
2359 (i386_handle_nonaligned_watchpoint): Likewise.
2360
2361 2014-06-18 Gary Benson <gbenson@redhat.com>
2362
2363 * i386-low.c (i386_get_debug_register_length): New macro.
2364 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2365 (i386_show_dr): Use debug_printf instead of fprintf. Use
2366 phex to format values.
2367
2368 2014-06-18 Gary Benson <gbenson@redhat.com>
2369
2370 * i386-low.h: Comment changes.
2371 * i386-low.c: Likewise.
2372
2373 2014-06-18 Gary Benson <gbenson@redhat.com>
2374
2375 * i386-low.c: Whitespace changes.
2376
2377 2014-06-12 Tom Tromey <tromey@redhat.com>
2378
2379 * utils.c (freeargv): Remove.
2380
2381 2014-06-12 Tom Tromey <tromey@redhat.com>
2382
2383 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2384 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2385 (parse_debug_format_options): Likewise.
2386 (gdbserver_usage): Likewise.
2387 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2388 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2389 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2390 against libiberty.
2391 ($(LIBGNU)): Depend on libiberty.
2392 (all-lib): Recurse into all subdirs.
2393 (install-only): Invoke "install" target in subdirs.
2394 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2395 targets.
2396 * configure: Rebuild.
2397 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2398 for vasprintf, vsnprintf, or gettimeofday.
2399 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2400 srv_tgtobj.
2401
2402 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2403
2404 * development.sh: Delete.
2405 * Makefile.in (config.status): Adjust dependency on development.sh.
2406 * configure.ac: Adjust development.sh source call.
2407 * configure: Regenerate.
2408
2409 2014-06-02 Pedro Alves <palves@redhat.com>
2410
2411 * ax.c (gdb_free_agent_expr): New function.
2412 * ax.h (gdb_free_agent_expr): New declaration.
2413 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2414 list.
2415 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2416 static.
2417 (clear_breakpoint_conditions_and_commands): New function.
2418 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2419 (clear_breakpoint_conditions_and_commands): New declaration.
2420
2421 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2422
2423 * linux-aarch64-low.c (asm/ptrace.h): Include.
2424
2425 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2426
2427 Fix TLS access for -static -pthread.
2428 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2429 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2430 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2431
2432 2014-05-20 Pedro Alves <palves@redhat.com>
2433
2434 * linux-aarch64-low.c (aarch64_insert_point)
2435 (aarch64_remove_point): No longer check whether the type is
2436 supported here. Adjust to new interface.
2437 (the_low_target): Install aarch64_supports_z_point_type as
2438 supports_z_point_type method.
2439 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2440 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2441 instead of a Z packet char. Adjust.
2442 (arm_supports_z_point_type): New function.
2443 (arm_insert_point, arm_remove_point): Adjust to new interface.
2444 (the_low_target): Install arm_supports_z_point_type.
2445 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2446 (cris_insert_point, cris_remove_point): Adjust to new interface.
2447 Don't check whether the type is supported here.
2448 (the_low_target): Install cris_supports_z_point_type.
2449 * linux-low.c (linux_supports_z_point_type): New function.
2450 (linux_insert_point, linux_remove_point): Adjust to new interface.
2451 * linux-low.h (struct linux_target_ops) <insert_point,
2452 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2453 raw_breakpoint pointer parameter.
2454 <supports_z_point_type>: New method.
2455 * linux-mips-low.c (mips_supports_z_point_type): New function.
2456 (mips_insert_point, mips_remove_point): Adjust to new interface.
2457 Use mips_supports_z_point_type.
2458 (the_low_target): Install mips_supports_z_point_type.
2459 * linux-ppc-low.c (the_low_target): Install NULL as
2460 supports_z_point_type method.
2461 * linux-s390-low.c (the_low_target): Install NULL as
2462 supports_z_point_type method.
2463 * linux-sparc-low.c (the_low_target): Install NULL as
2464 supports_z_point_type method.
2465 * linux-x86-low.c (x86_supports_z_point_type): New function.
2466 (x86_insert_point): Adjust to new insert_point interface. Use
2467 insert_memory_breakpoint. Adjust to new
2468 i386_low_insert_watchpoint interface.
2469 (x86_remove_point): Adjust to remove_point interface. Use
2470 remove_memory_breakpoint. Adjust to new
2471 i386_low_remove_watchpoint interface.
2472 (the_low_target): Install x86_supports_z_point_type.
2473 * lynx-low.c (lynx_target_ops): Install NULL as
2474 supports_z_point_type callback.
2475 * nto-low.c (nto_supports_z_point_type): New.
2476 (nto_insert_point, nto_remove_point): Adjust to new interface.
2477 (nto_target_ops): Install nto_supports_z_point_type.
2478 * mem-break.c: Adjust intro comment.
2479 (struct raw_breakpoint) <raw_type, size>: New fields.
2480 <inserted>: Update comment.
2481 <shlib_disabled>: Delete field.
2482 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2483 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2484 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2485 (raw_bkpt_type_to_target_hw_bp_type): New function.
2486 (find_enabled_raw_code_breakpoint_at): New function.
2487 (find_raw_breakpoint_at): New type and size parameters. Use them.
2488 (insert_memory_breakpoint): New function, based off
2489 set_raw_breakpoint_at.
2490 (remove_memory_breakpoint): New function.
2491 (set_raw_breakpoint_at): Reimplement.
2492 (set_breakpoint): New, based on set_breakpoint_at.
2493 (set_breakpoint_at): Reimplement.
2494 (delete_raw_breakpoint): Go through the_target->remove_point
2495 instead of assuming memory breakpoints.
2496 (find_gdb_breakpoint_at): Delete.
2497 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2498 (find_gdb_breakpoint): New function.
2499 (set_gdb_breakpoint_at): Delete.
2500 (z_type_supported): New function.
2501 (set_gdb_breakpoint_1): New function, loosely based off
2502 set_gdb_breakpoint_at.
2503 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2504 (delete_gdb_breakpoint_at): Delete.
2505 (delete_gdb_breakpoint_1): New function, loosely based off
2506 delete_gdb_breakpoint_at.
2507 (delete_gdb_breakpoint): New function.
2508 (clear_gdb_breakpoint_conditions): Rename to ...
2509 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2510 breakpoint.
2511 (add_condition_to_breakpoint): Make static.
2512 (add_breakpoint_condition): Take a struct breakpoint pointer
2513 instead of an address. Adjust.
2514 (gdb_condition_true_at_breakpoint): Rename to ...
2515 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2516 z_type parameter.
2517 (gdb_condition_true_at_breakpoint): Reimplement.
2518 (add_breakpoint_commands): Take a struct breakpoint pointer
2519 instead of an address. Adjust.
2520 (gdb_no_commands_at_breakpoint): Rename to ...
2521 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2522 parameter. Return true if no breakpoint was found. Change debug
2523 output.
2524 (gdb_no_commands_at_breakpoint): Reimplement.
2525 (run_breakpoint_commands): Rename to ...
2526 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2527 and change return type to boolean.
2528 (run_breakpoint_commands): New function.
2529 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2530 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2531 breakpoint. Go through the_target->remove_point instead of
2532 assuming memory breakpoint.
2533 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2534 software and hardware breakpoints.
2535 (reinsert_raw_breakpoint): Go through the_target->insert_point
2536 instead of assuming memory breakpoint.
2537 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2538 software and hardware breakpoints.
2539 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2540 Check both software and hardware breakpoints.
2541 (validate_inserted_breakpoint): Assert the breakpoint is a
2542 software breakpoint. Set the inserted flag to -1 instead of
2543 setting shlib_disabled.
2544 (delete_disabled_breakpoints): Adjust.
2545 (validate_breakpoints): Only validate software breakpoints.
2546 Adjust to inserted flag change.
2547 (check_mem_read, check_mem_write): Skip breakpoint types other
2548 than software breakpoints. Adjust to inserted flag change.
2549 * mem-break.h (enum raw_bkpt_type): New enum.
2550 (raw_breakpoint, struct process_info): Forward declare.
2551 (Z_packet_to_target_hw_bp_type): Delete declaration.
2552 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2553 (set_gdb_breakpoint, delete_gdb_breakpoint)
2554 (clear_breakpoint_conditions): New declarations.
2555 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2556 (breakpoint_inserted_here): Update comment.
2557 (add_breakpoint_condition, add_breakpoint_commands): Replace
2558 address parameter with a breakpoint pointer parameter.
2559 (gdb_breakpoint_here): Update comment.
2560 (delete_gdb_breakpoint_at): Delete.
2561 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2562 * server.c (process_point_options): Take a struct breakpoint
2563 pointer instead of an address. Adjust.
2564 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2565 delete_gdb_breakpoint.
2566 * spu-low.c (spu_target_ops): Install NULL as
2567 supports_z_point_type method.
2568 * target.h: Include mem-break.h.
2569 (struct target_ops) <prepare_to_access_memory>: Update comment.
2570 <supports_z_point_type>: New field.
2571 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2572 instead of a char. Also take a raw breakpoint pointer.
2573 * win32-arm-low.c (the_low_target): Install NULL as
2574 supports_z_point_type.
2575 * win32-i386-low.c (i386_supports_z_point_type): New function.
2576 (i386_insert_point, i386_remove_point): Adjust to new interface.
2577 (the_low_target): Install i386_supports_z_point_type.
2578 * win32-low.c (win32_supports_z_point_type): New function.
2579 (win32_insert_point, win32_remove_point): Adjust to new interface.
2580 (win32_target_ops): Install win32_supports_z_point_type.
2581 * win32-low.h (struct win32_target_ops):
2582 <supports_z_point_type>: New method.
2583 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2584 instead of a char. Also take a raw breakpoint pointer.
2585
2586 2014-05-20 Pedro Alves <palves@redhat.com>
2587
2588 * mem-break.h: Include break-common.h.
2589 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2590 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2591 (Z_packet_to_target_hw_bp_type): New declaration.
2592 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2593 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2594 (Z_PACKET_ACCESS_WP): Delete macros.
2595 (Z_packet_to_hw_type): Delete function.
2596 * i386-low.h: Don't include break-common.h here.
2597 (Z_packet_to_hw_type): Delete declaration.
2598 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2599 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2600 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2601 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2602 * linux-aarch64-low.c: Don't include break-common.h here.
2603 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2604 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2605 (Z_packet_to_target_hw_bp_type): Delete function.
2606 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2607 function.
2608 (mips_insert_point, mips_remove_point): Use
2609 Z_packet_to_target_hw_bp_type.
2610
2611 2014-05-20 Pedro Alves <palves@redhat.com>
2612
2613 * linux-aarch64-low.c: Include break-common.h.
2614 (enum target_point_type): Delete.
2615 (Z_packet_to_point_type): Rename to ...
2616 (Z_packet_to_target_hw_bp_type): ... this, and return a
2617 target_hw_bp_type instead.
2618 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2619 instead of an enum target_point_type.
2620 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2621 breakpoint type.
2622 (aarch64_dr_state_insert_one_point)
2623 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2624 (aarch64_handle_aligned_watchpoint)
2625 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2626 Take an enum target_hw_bp_type instead of an enum
2627 target_point_type.
2628 (aarch64_supports_z_point_type): New function.
2629 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2630 use Z_packet_to_target_hw_bp_type.
2631
2632 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2633
2634 * configure.ac: Only use -Werror by default when DEVELOPMENT
2635 is true.
2636 * configure: Regenerate.
2637
2638 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2639
2640 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2641 * linux-x86-low.c (X86_64_USER_REGS): New.
2642 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2643
2644 2014-04-28 Yao Qi <yao@codesourcery.com>
2645
2646 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2647 name.
2648
2649 2014-04-25 Pedro Alves <palves@redhat.com>
2650
2651 PR server/16255
2652 * linux-low.c (linux_attach_fail_reason_string): New function.
2653 (linux_attach_lwp): Delete.
2654 (linux_attach_lwp_1): Rename to ...
2655 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2656 argument. Remove "initial" parameter. Return int instead of
2657 void. Don't error or warn here.
2658 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2659 failure to attach to the tgid. Call warning when failing to
2660 attach to an lwp.
2661 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2662 argument. Remove "initial" parameter. Return int instead of
2663 void. Don't error or warn here.
2664 (linux_attach_fail_reason_string): New declaration.
2665 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2666 interface change. Use linux_attach_fail_reason_string.
2667
2668 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2669 Walfred Tedeschi <walfred.tedeschi@intel.com>
2670
2671 * Makefile.in: Added rules to handle new files
2672 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2673 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2674 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2675 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2676 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2677 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2678 x32-avx512-linux.o.
2679 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2680 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2681 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2682 i386/x32-avx512.xml.
2683 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2684 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2685 i386/x32-avx512-linux.xml.
2686 * i387-fp.c (num_avx512_k_registers): New constant for number
2687 of K registers.
2688 (num_avx512_zmmh_low_registers): New constant for number of
2689 lower ZMM registers (0-15).
2690 (num_avx512_zmmh_high_registers): New constant for number of
2691 higher ZMM registers (16-31).
2692 (num_avx512_ymmh_registers): New contant for number of higher
2693 YMM registers (ymm16-31 added by avx521 on x86_64).
2694 (num_avx512_xmm_registers): New constant for number of higher
2695 XMM registers (xmm16-31 added by AVX512 on x86_64).
2696 (struct i387_xsave): Add space for AVX512 registers.
2697 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2698 Add code to handle AVX512 registers.
2699 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2700 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2701 prototypei from generated file.
2702 (tdesc_amd64_avx512_linux): Likewise.
2703 (init_registers_x32_avx512_linux): Likewise.
2704 (tdesc_x32_avx512_linux): Likewise.
2705 (init_registers_i386_avx512_linux): Likewise.
2706 (tdesc_i386_avx512_linux): Likewise.
2707 (x86_64_regmap): Add AVX512 registers.
2708 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2709 mask.
2710 (initialize_low_arch): Add code to initialize AVX512 registers.
2711
2712 2014-04-23 Pedro Alves <palves@redhat.com>
2713
2714 * mem-break.c (find_gdb_breakpoint_at): Make static.
2715 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2716
2717 2014-04-23 Pedro Alves <palves@redhat.com>
2718
2719 * i386-low.c: Don't include break-common.h here.
2720 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2721 prototype to take target_hw_bp_type as argument instead of a Z
2722 packet char.
2723 * i386-low.h: Include break-common.h here.
2724 (Z_packet_to_hw_type): Declare.
2725 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2726 prototypes.
2727 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2728 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2729 (x86_remove_point): Convert the packet number to a
2730 target_hw_bp_type before calling i386_low_remove_watchpoint.
2731 * win32-i386-low.c (i386_insert_point): Convert the packet number
2732 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2733 (i386_remove_point): Convert the packet number to a
2734 target_hw_bp_type before calling i386_low_remove_watchpoint.
2735
2736 2014-04-23 Pedro Alves <palves@redhat.com>
2737
2738 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2739
2740 2014-04-10 Pedro Alves <palves@redhat.com>
2741
2742 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2743 Check if the condition or command is NULL before checking if the
2744 breakpoint is known. On success, return true.
2745 * mem-break.h (add_breakpoint_condition): Document return.
2746 (add_breakpoint_commands): Add describing comment.
2747 * server.c (skip_to_semicolon): New function.
2748 (process_point_options): Use it.
2749
2750 2014-04-09 Pedro Alves <palves@redhat.com>
2751
2752 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2753 to lwpid_of.
2754
2755 2014-02-27 Pedro Alves <palves@redhat.com>
2756
2757 PR 12702
2758 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2759 macros.
2760 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2761 output.
2762 (last_thread_of_process_p): Take a PID argument instead of a
2763 thread pointer.
2764 (linux_wait_for_lwp): Delete.
2765 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2766 functions.
2767 (linux_low_filter_event): New function, party factored out from
2768 linux_wait_for_event.
2769 (linux_wait_for_event): Rename to ...
2770 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2771 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2772 sigsuspend. Check for zombie leaders.
2773 (linux_wait_for_event): Reimplement as wrapper around
2774 linux_wait_for_event_filtered.
2775 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2776 a normal or signal exit is seen, it's the whole process exiting.
2777 (wait_for_sigstop): No longer a for_each_inferior callback.
2778 Rewrite on top of linux_wait_for_event_filtered.
2779 (stop_all_lwps): Call wait_for_sigstop directly.
2780 * server.c (resume, handle_target_event): Handle
2781 TARGET_WAITKIND_NO_RESUMED.
2782
2783 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2784
2785 * win32-low.c (psapi_get_dll_name,
2786 * win32_CreateToolhelp32Snapshot): Delete.
2787 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2788 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2789 Delete.
2790 (handle_load_dll): Add function description.
2791 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2792
2793 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2794
2795 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2796 Add comment.
2797 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2798 base address when calling win32_add_one_solib.
2799 (handle_load_dll): Delete local variable load_addr.
2800 Remove 0x1000 offset applied to DLL base address when calling
2801 win32_add_one_solib.
2802 (handle_unload_dll): Add comment.
2803
2804 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2805
2806 * win32-low.c (win32_add_all_dlls): Renames
2807 win32_ensure_ntdll_loaded. Rewrite function documentation.
2808 Adjust implementation to always load all DLLs.
2809 Add 0x1000 offset to DLL base address when calling
2810 win32_add_one_solib.
2811 (child_initialization_done): New static global.
2812 (do_initial_child_stuff): Set child_initialization_done to
2813 zero during child initialization, and 1 after. Replace call
2814 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2815 Add comment.
2816 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2817 (handle_unload_dll): Add function documentation.
2818 (get_child_debug_event): Ignore load and unload DLL events
2819 during child initialization.
2820
2821 2014-02-20 Doug Evans <dje@google.com>
2822
2823 Remove global all_lwps.
2824 * inferiors.h (ptid_of): Move here from linux-low.h.
2825 (pid_of, lwpid_of): Ditto.
2826 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2827 parameter is a struct thread_info * now.
2828 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2829 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2830 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2831 directly.
2832 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2833 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2834 * linux-arm-low.c (update_registers_callback): Update, "entry"
2835 parameter is a struct thread_info * now.
2836 Fetch lwpid from current_inferior directly.
2837 (arm_insert_point): Pass &all_threads to find_inferior instead of
2838 &all_lwps.
2839 (arm_remove_point): Ditto.
2840 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2841 (arm_prepare_to_resume): Fetch pid from thread.
2842 (arm_read_description): Fetch lwpid from current_inferior directly.
2843 * linux-low.c (all_lwps): Delete.
2844 (delete_lwp): Delete call to remove_inferior.
2845 (handle_extended_wait): Fetch lwpid from thread.
2846 (add_lwp): Don't set lwp->entry.id. Remove call to
2847 add_inferior_to_list.
2848 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2849 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2850 (kill_one_lwp_callback): Ditto.
2851 (linux_kill): Don't dereference NULL pointer.
2852 Fetch ptid,lwpid from thread.
2853 (get_detach_signal): Fetch ptid from thread.
2854 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2855 Simplify call to regcache_invalidate_thread.
2856 (delete_lwp_callback): Update, "entry" parameter is a
2857 struct thread_info * now. Fetch pid from thread.
2858 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2859 (status_pending_p_callback): Update, "entry" parameter is a
2860 struct thread_info * now. Fetch ptid from thread.
2861 (find_lwp_pid): Update, "entry" parameter is a
2862 struct thread_info * now.
2863 (linux_wait_for_lwp): Fetch pid from thread.
2864 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2865 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2866 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2867 (dequeue_one_deferred_signal): Ditto.
2868 (cancel_breakpoint): Fetch ptid from current_inferior.
2869 (linux_wait_for_event): Pass &all_threads to find_inferior,
2870 not &all_lwps. Fetch ptid, lwpid from thread.
2871 (count_events_callback): Update, "entry" parameter is a
2872 struct thread_info * now.
2873 (select_singlestep_lwp_callback): Ditto.
2874 (select_event_lwp_callback): Ditto.
2875 (cancel_breakpoints_callback): Ditto.
2876 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2877 not &all_lwps.
2878 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2879 (unsuspend_one_lwp): Update, "entry" parameter is a
2880 struct thread_info * now.
2881 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2882 not &all_lwps.
2883 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2884 Fetch lwpid from thread, not lwp.
2885 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2886 Pass &all_threads to find_inferior, not &all_lwps.
2887 (send_sigstop): Fetch lwpid from thread, not lwp.
2888 (send_sigstop_callback): Update, "entry" parameter is a
2889 struct thread_info * now.
2890 (suspend_and_send_sigstop_callback): Ditto.
2891 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2892 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2893 struct thread_info * now.
2894 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2895 from thread, lwp.
2896 (lwp_running): Update, "entry" parameter is a
2897 struct thread_info * now.
2898 (stop_all_lwps): Fetch ptid from thread.
2899 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2900 (linux_resume_one_lwp): Fetch lwpid from thread.
2901 (linux_set_resume_request): Update, "entry" parameter is a
2902 struct thread_info * now. Fetch pid, lwpid from thread.
2903 (resume_status_pending_p): Update, "entry" parameter is a
2904 struct thread_info * now.
2905 (need_step_over_p): Ditto. Fetch lwpid from thread.
2906 (start_step_over): Fetch lwpid from thread.
2907 (linux_resume_one_thread): Update, "entry" parameter is a
2908 struct thread_info * now. Fetch lwpid from thread.
2909 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2910 (proceed_one_lwp): Update, "entry" parameter is a
2911 struct thread_info * now. Fetch lwpid from thread.
2912 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2913 struct thread_info * now.
2914 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2915 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2916 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2917 directly.
2918 (regsets_store_inferior_registers): Ditto.
2919 (fetch_register, store_register): Ditto.
2920 (linux_read_memory, linux_write_memory): Ditto.
2921 (linux_request_interrupt): Ditto.
2922 (linux_read_auxv): Ditto.
2923 (linux_xfer_siginfo): Ditto.
2924 (linux_qxfer_spu): Ditto.
2925 (linux_qxfer_libraries_svr4): Ditto.
2926 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2927 moved to inferiors.h.
2928 (get_lwp): Delete.
2929 (get_thread_lwp): Update.
2930 (struct lwp_info): Delete member "entry". Simplify comment for
2931 member "thread".
2932 (all_lwps): Delete.
2933 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2934 current_inferior directly.
2935 (update_watch_registers_callback): Update, "entry" parameter is a
2936 struct thread_info * now. Fetch pid from thread.
2937 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2938 (mips_insert_point): Fetch lwpid from current_inferior.
2939 Pass &all_threads to find_inferior, not &all_lwps.
2940 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2941 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2942 directly.
2943 (mips_stopped_data_address): Ditto.
2944 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2945 directly.
2946 * linux-tile-low.c (tile_arch_setup): Ditto.
2947 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2948 (update_debug_registers_callback): Update, "entry" parameter is a
2949 struct thread_info * now. Fetch pid from thread.
2950 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2951 Pass &all_threads to find_inferior, not &all_lwps.
2952 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2953 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2954 Pass &all_threads to find_inferior, not &all_lwps.
2955 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2956 (i386_dr_low_get_status): Ditto.
2957 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2958 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2959 (x86_linux_read_description): Ditto.
2960 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2961
2962 2014-02-20 Doug Evans <dje@google.com>
2963
2964 * inferiors.c (get_first_inferior): Fix buglet.
2965
2966 2014-02-19 Doug Evans <dje@google.com>
2967
2968 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2969 * inferiors.c (add_thread): Change result type to struct thread_info *.
2970 All callers updated.
2971 (add_lwp): Call add_thread here instead of in callers.
2972 All callers updated.
2973 * linux-low.h (get_lwp_thread): Rewrite.
2974 (struct lwp_info): New member "thread".
2975
2976 2014-02-19 Doug Evans <dje@google.com>
2977
2978 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2979 All callers updated.
2980
2981 2014-02-19 Doug Evans <dje@google.com>
2982
2983 * inferiors.c (add_thread): Fix whitespace.
2984
2985 2014-02-19 Doug Evans <dje@google.com>
2986
2987 * dll.c (clear_dlls): Replace accessing list implemention details
2988 with API function.
2989 * gdbthread.h (get_first_thread): Declare.
2990 * inferiors.c (for_each_inferior_with_data): New function.
2991 (get_first_thread): New function.
2992 (find_thread_ptid): Simplify.
2993 (get_first_inferior): New function.
2994 (clear_list): Delete.
2995 (one_inferior_p): New function.
2996 (clear_inferior_list): New function.
2997 (clear_inferiors): Update.
2998 * inferiors.h (for_each_inferior_with_data): Declare.
2999 (clear_inferior_list): Declare.
3000 (one_inferior_p): Declare.
3001 (get_first_inferior): Declare.
3002 * linux-low.c (linux_wait_for_event): Replace accessing list
3003 implemention details with API function.
3004 * server.c (target_running): Ditto.
3005 (accumulate_file_name_length): New function.
3006 (emit_dll_description): New function.
3007 (handle_qxfer_libraries): Replace accessing list implemention
3008 details with API function.
3009 (handle_qxfer_threads_worker): New function.
3010 (handle_qxfer_threads_proper): Replace accessing list implemention
3011 details with API function.
3012 (handle_query): Ditto.
3013 (visit_actioned_threads_callback_ftype): New typedef.
3014 (visit_actioned_threads_data): New struct.
3015 (visit_actioned_threads): Rewrite to be find_inferior callback.
3016 (resume): Call find_inferior.
3017 (handle_status): Replace accessing list implemention
3018 details with API function.
3019 (process_serial_event): Replace accessing list implemention details
3020 with API function.
3021 * target.c (set_desired_inferior): Replace accessing list implemention
3022 details with API function.
3023 * tracepoint.c (same_process_p): New function.
3024 (gdb_agent_about_to_close): Replace accessing list implemention
3025 details with API function.
3026 * win32-low.c (child_delete_thread): Replace accessing list
3027 implemention details with API function.
3028 (match_dll_by_basename): New function.
3029 (dll_is_loaded_by_basename): New function.
3030 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3031 details call to dll_is_loaded_by_basename.
3032
3033 2014-02-19 Doug Evans <dje@google.com>
3034
3035 * dll.h (struct dll_info): Add comment.
3036 * gdbthread.h (struct thread_info): Add comment.
3037 (current_ptid): Simplify.
3038 * inferiors.c (add_process): Update.
3039 (remove_process): Update.
3040 * inferiors.h (struct process_info): Rename member "head" to "entry".
3041 * linux-low.c (delete_lwp): Update.
3042 (add_lwp): Update.
3043 (last_thread_of_process_p): Update.
3044 (kill_one_lwp_callback, linux_kill): Update.
3045 (status_pending_p_callback): Update.
3046 (wait_for_sigstop): Update. Simplify read of ptid.
3047 (start_step_over): Update.
3048 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3049 (get_lwp_thread): Update.
3050 (struct lwp_info): Rename member "head" to "entry".
3051 * regcache.h (inferior_list_entry): Delete.
3052 * server.c (kill_inferior_callback): Update.
3053 (detach_or_kill_inferior_callback): Update.
3054 (print_started_pid): Update.
3055 (print_attached_pid): Update.
3056 (process_serial_event): Simplify read of ptid.
3057 * thread-db.c (thread_db_create_event): Update.
3058 (thread_db_get_tls_address): Update.
3059 * win32-low.c (current_inferior_ptid): Simplify.
3060
3061 2014-02-19 Tom Tromey <tromey@redhat.com>
3062
3063 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3064 argument.
3065 (target_supports_btrace): Update.
3066
3067 2014-02-14 Yao Qi <yao@codesourcery.com>
3068
3069 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3070 (rsp-low-ipa.o): New target.
3071
3072 2014-02-12 Tom Tromey <tromey@redhat.com>
3073
3074 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3075 convert_ascii_to_int.
3076 * regcache.c (registers_to_string): Likewise.
3077 * remote-utils.c (decode_M_packet): Likewise.
3078 * server.c (process_serial_event): Likewise.
3079
3080 2014-02-12 Tom Tromey <tromey@redhat.com>
3081
3082 * server.c (handle_query, handle_v_run): Use hex2bin, not
3083 unhexify.
3084 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3085
3086 2014-02-12 Tom Tromey <tromey@redhat.com>
3087
3088 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3089 convert_int_to_ascii.
3090 * regcache.c (registers_to_string, collect_register_as_string):
3091 Likewise.
3092 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3093 Likewise.
3094 * server.c (process_serial_event): Likewise.
3095 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3096 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3097
3098 2014-02-12 Tom Tromey <tromey@redhat.com>
3099
3100 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3101 bin2hex, not hexify.
3102 * tracepoint.c (cmd_qtstatus): Likewise.
3103
3104 2014-02-12 Tom Tromey <tromey@redhat.com>
3105
3106 * remote-utils.c (monitor_output): Pass explicit length to
3107 hexify.
3108
3109 2014-02-12 Tom Tromey <tromey@redhat.com>
3110
3111 * tracepoint.c: Include rsp-low.h.
3112 * server.c: Include rsp-low.h.
3113 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3114 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3115 declare.
3116 * remote-utils.c: Include rsp-low.h.
3117 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3118 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3119 (convert_int_to_ascii, convert_ascii_to_int): Move to
3120 common/rsp-low.c.
3121 * regcache.c: Include rsp-low.h.
3122 * ax.c: Include rsp-low.h.
3123 * Makefile.in (SFILES): Add common/rsp-low.c.
3124 (OBS): Add rsp-low.o.
3125 (rsp-low.o): New target.
3126
3127 2014-02-12 Tom Tromey <tromey@redhat.com>
3128
3129 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3130 Include print-utils.h.
3131 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3132 (plongest, thirty_two, phex_nz): Remove.
3133 * Makefile.in (SFILES): Add common/print-utils.c.
3134 (OBS): Add print-utils.o.
3135 (print-utils-ipa.o): New target.
3136 (print-utils.o): New target.
3137 (IPA_OBJS): Add print-utils-ipa.o.
3138
3139 2014-02-06 Tom Tromey <tromey@redhat.com>
3140
3141 * Makefile.in (SFILES): Fix indentation.
3142
3143 2014-02-05 Doug Evans <dje@google.com>
3144
3145 * linux-low.c (linux_wait_for_event): Improve comment.
3146 (linux_wait_1): Keep current_inferior in sync with event_child.
3147
3148 2014-01-22 Doug Evans <dje@google.com>
3149
3150 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3151
3152 2014-01-22 Doug Evans <dje@google.com>
3153
3154 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3155 * configure: Regenerate.
3156 * config.in: Regenerate.
3157 * Makefile.in (SFILES): Add debug.c.
3158 (OBS): Add debug.o.
3159 * debug.c: New file.
3160 * debug.h: New file.
3161 * linux-aarch64-low.c (*): Update all debugging printfs to use
3162 debug_printf instead of fprintf.
3163 * linux-arm-low.c (*): Ditto.
3164 * linux-cris-low.c (*): Ditto.
3165 * linux-crisv32-low.c (*): Ditto.
3166 * linux-m32r-low.c (*): Ditto.
3167 * linux-sparc-low.c (*): Ditto.
3168 * linux-x86.c (*): Ditto.
3169 * linux-low.c (*): Ditto.
3170 (linux_wait_1): Add calls to debug_enter, debug_exit.
3171 (linux_wait): Remove redundant debugging printf.
3172 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3173 (linux_resume, unstop_all_lwps): Ditto.
3174 * mem-break.c (*): Update all debugging printfs to use
3175 debug_printf instead of fprintf.
3176 * remote-utils.c (*): Ditto.
3177 * thread-db.c (*): Ditto.
3178 * server.c #include <ctype.h>, "gdb_vecs.h".
3179 (debug_threads): Moved to debug.c.
3180 (*): Update all debugging printfs to use debug_printf instead of
3181 fprintf.
3182 (start_inferior): Replace call to fflush with call to debug_flush.
3183 (monitor_show_help): Mention set debug-format.
3184 (parse_debug_format_options): New function.
3185 (handle_monitor_command): Handle "monitor set debug-format".
3186 (gdbserver_usage): Mention --debug-format.
3187 (main): Parse --debug-format.
3188 * server.h (debug_threads): Declaration moved to debug.h.
3189 #include "debug.h".
3190 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3191 trace_debug_1 that uses debug_printf.
3192 (tracepoint_look_up_symbols): Update all debugging printfs to use
3193 debug_printf instead of fprintf.
3194
3195 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3196
3197 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3198 sys/ptrace.h.
3199
3200 2014-01-17 Pedro Alves <palves@redhat.com>
3201
3202 PR build/16445
3203 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3204 defined after including gdb_proc_service.h.
3205
3206 2014-01-16 Doug Evans <dje@google.com>
3207
3208 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3209 (match_dll): Use it.
3210
3211 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3212
3213 * target.h (target_ops) <read_btrace>: Change parameters and
3214 return type to allow error reporting.
3215 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3216 trace reading errors on.
3217 * linux-low.c (linux_low_read_btrace): Pass trace reading
3218 errors on.
3219 (linux_low_disable_btrace): New.
3220
3221 2014-01-15 Doug Evans <dje@google.com>
3222
3223 * inferiors.c (thread_id_to_gdb_id): Delete.
3224 * inferiors.h (thread_id_to_gdb_id): Delete.
3225
3226 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3227
3228 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3229 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3230 versions.
3231
3232 2014-01-08 Pedro Alves <palves@redhat.com>
3233
3234 * server.c (handle_status): Don't discard previous queued stop
3235 replies or thread's pending status here.
3236 (main) <disconnection>: Do it here instead.
3237
3238 2014-01-08 Pedro Alves <palves@redhat.com>
3239
3240 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3241 * server.c (visit_actioned_threads, handle_pending_status): New
3242 function.
3243 (handle_v_cont): Factor out parts to ...
3244 (resume): ... this new function. If in all-stop, and a thread
3245 being resumed has a pending status, report it without actually
3246 resuming.
3247 (myresume): Adjust to use the new 'resume' function.
3248 (clear_pending_status_callback, set_pending_status_callback)
3249 (find_status_pending_thread_callback): New functions.
3250 (handle_status): Handle the case of multiple threads having
3251 interesting statuses to report. Report threads' real last signal
3252 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3253 with an interesting thread to report the status for, instead of
3254 always reporting the status of the first thread.
3255
3256 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3257
3258 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3259 * gdbreplay.c (gdbreplay_version): Likewise.
3260
3261 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3262
3263 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3264 iov.iov_len with the real length in use.
3265
3266 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3267
3268 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3269 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3270 for all targets that use win32-low.c.
3271 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3272 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3273
3274 2013-12-13 Pedro Alves <palves@redhat.com>
3275
3276 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3277 if equal to TARGET_WAITKIND_LOADED.
3278 * win32-low.c (cached_status): New static global.
3279 (win32_wait): Add declaration.
3280 (do_initial_child_stuff): Flush all initial pending debug events
3281 up to the initial breakpoint.
3282 (win32_wait): If CACHED_STATUS was set, return that instead
3283 of doing a real wait. Remove the code resuming the execution
3284 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3285 during the initial phase. Also remove the code changing
3286 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3287 TARGET_WAITKIND_STOPPED.
3288
3289 2013-12-11 Yao Qi <yao@codesourcery.com>
3290
3291 * notif.c (handle_notif_ack): Return 0 if no notification
3292 matches.
3293
3294 2013-11-20 Doug Evans <dje@google.com>
3295
3296 * linux-low.c (linux_set_resume_request): Fix comment.
3297
3298 2013-11-20 Doug Evans <dje@google.com>
3299
3300 * linux-low.c (resume_status_pending_p): Tweak comment.
3301
3302 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3303
3304 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3305 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3306 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3307 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3308 (srv_amd64_regobj): Add amd64-mpx.o.
3309 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3310 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3311 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3312 * i387-fp.c (num_pl_bnd_register) Added constant.
3313 (num_pl_bnd_cfg_registers) Added constant.
3314 (struct i387_xsave) Added reserved area and MPX fields.
3315 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3316 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3317 function.
3318 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3319 (init_registers_amd64_mpx_linux): Declare new function.
3320 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3321 (x86_64_regmap): Add MPX registers.
3322 (x86_linux_read_description): Add MPX case.
3323 (initialize_low_arch): Initialize MPX targets.
3324
3325 2013-11-18 Tom Tromey <tromey@redhat.com>
3326
3327 * configure: Rebuild.
3328 * configure.ac: Don't check for stdlib.h.
3329 * gdbreplay.c: Unconditionally include stdlib.h.
3330
3331 2013-11-18 Tom Tromey <tromey@redhat.com>
3332
3333 * config.in: Rebuild.
3334 * configure: Rebuild.
3335 * configure.ac: Don't use AC_HEADER_DIRENT.
3336
3337 2013-11-18 Tom Tromey <tromey@redhat.com>
3338
3339 * server.h: Don't check HAVE_STRING_H.
3340 * gdbreplay.c: Don't check HAVE_STRING_H.
3341 * configure: Rebuild.
3342
3343 2013-11-18 Tom Tromey <tromey@redhat.com>
3344
3345 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3346 LIBGNU.
3347
3348 2013-11-08 Tom Tromey <tromey@redhat.com>
3349
3350 * configure, config.in: Rebuild.
3351 * configure.ac: Remove unused configury.
3352
3353 2013-11-08 Tom Tromey <tromey@redhat.com>
3354
3355 * acinclude.m4: Include common.m4, codeset.m4.
3356 * configure, config.in: Rebuild.
3357 * configure.ac: Use GDB_AC_COMMON.
3358
3359 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3360
3361 * linux-s390-low.c (HWCAP_S390_TE): New define.
3362 (s390_arch_setup): Consider the TE field in the HWCAP for
3363 determining 'have_regset_tdb'.
3364
3365 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3366
3367 PR gdb/16014
3368 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3369 call to sizeof.
3370
3371 2013-10-02 Pedro Alves <palves@redhat.com>
3372
3373 * server.c (process_serial_event): Don't output "GDBserver
3374 exiting" if GDB is connected through stdio.
3375 * target.c (mywait): Likewise, be silent if GDB is connected
3376 through stdio.
3377
3378 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3379
3380 * lynx-low.c (lynx_add_threads_after_attach): New function.
3381 (lynx_attach): Remove call to add_thread. Add call to
3382 lynx_add_threads_after_attach instead.
3383
3384 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3385
3386 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3387 * config.in, configure: Regenerated.
3388
3389 2013-09-18 Yao Qi <yao@codesourcery.com>
3390
3391 PR server/15959
3392 * server.c (start_inferior): Clear 'resume_info'.
3393
3394 2013-09-16 Jiong Wang <jiwang@tilera.com>
3395
3396 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3397 for each register.
3398
3399 2013-09-16 Jiong Wang <jiwang@tilera.com>
3400
3401 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3402 linux-tile-low.o to srv_tgtobj.
3403
3404 2013-09-16 Will Newton <will.newton@linaro.org>
3405
3406 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3407 out regs.
3408
3409 2013-09-06 Pedro Alves <palves@redhat.com>
3410
3411 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3412 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3413 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3414 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3415 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3416 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3417
3418 2013-09-06 Pedro Alves <palves@redhat.com>
3419
3420 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3421 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3422
3423 2013-09-06 Pedro Alves <palves@redhat.com>
3424
3425 * linux-amd64-ipa.c: Include tracepoint.h.
3426 * linux-i386-ipa.c: Include tracepoint.h.
3427
3428 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3429
3430 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3431 (ps_get_thread_area): New function.
3432
3433 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3434
3435 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3436 (initialize_low_arch): Call init_registers_crisv32 rather than
3437 init_register_crisv32.
3438
3439 2013-09-05 Pedro Alves <palves@redhat.com>
3440
3441 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3442 to ...
3443 * hostio.h: ... this new file.
3444 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3445 win32-low.c: Include hostio.h.
3446
3447 2013-09-05 Pedro Alves <palves@redhat.com>
3448
3449 * server.h (gdb_client_data, handler_func, callback_handler_func)
3450 (delete_file_handler, add_file_handler, append_callback_event)
3451 (delete_callback_event, start_event_loop, initialize_event_loop):
3452 Move to event-loop.h and include it.
3453 * event-loop.h: New file.
3454
3455 2013-09-05 Pedro Alves <palves@redhat.com>
3456
3457 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3458 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3459 (loaded_dll, unloaded_dll): Move to ...
3460 * dll.h: ... this new file.
3461 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3462
3463 2013-09-05 Pedro Alves <palves@redhat.com>
3464
3465 * server.h (current_process, get_thread_process, all_processes)
3466 (add_inferior_to_list, for_each_inferior, current_inferior)
3467 (remove_inferior, add_process, remove_process, find_process_pid)
3468 (have_started_inferiors_p, have_attached_inferiors_p)
3469 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3470 (clear_inferiors, find_inferior, find_inferior_id)
3471 (inferior_target_data, set_inferior_target_data)
3472 (inferior_regcache_data, set_inferior_regcache_data): Move to
3473 inferiors.h, and include it.
3474 * inferiors.h: New file.
3475
3476 2013-09-05 Pedro Alves <palves@redhat.com>
3477
3478 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3479 Move ...
3480 * ax.h: ... here.
3481
3482 2013-09-05 Pedro Alves <palves@redhat.com>
3483
3484 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3485 tracepoint.h.
3486 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3487 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3488 (handle_tracepoint_general_set, handle_tracepoint_query)
3489 (tracepoint_finished_step, tracepoint_was_hit)
3490 (release_while_stepping_state_list, current_traceframe)
3491 (in_readonly_region, traceframe_read_mem)
3492 (fetch_traceframe_registers, traceframe_read_sdata)
3493 (traceframe_read_info, struct fast_tpoint_collect_status)
3494 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3495 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3496 (supply_fast_tracepoint_registers)
3497 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3498 (ipa_tdesc, claim_trampoline_space)
3499 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3500 (agent_mem_read, agent_get_trace_state_variable_value)
3501 (agent_set_trace_state_variable_value, agent_tsv_read)
3502 (agent_mem_read_string, get_raw_reg_func_addr)
3503 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3504 * tracepoint.h: ... this new file.
3505
3506 2013-09-05 Pedro Alves <palves@redhat.com>
3507
3508 * server.h (perror_with_name, error, fatal, warning, paddress)
3509 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3510 include it.
3511 * utils.h: New file.
3512
3513 2013-09-05 Pedro Alves <palves@redhat.com>
3514
3515 * server.h (remote_debug, noack_mode, transport_is_reliable)
3516 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3517 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3518 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3519 (write_enn, initialize_async_io, enable_async_io)
3520 (disable_async_io, check_remote_input_interrupt_request)
3521 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3522 (dead_thread_notify, prepare_resume_reply)
3523 (decode_address_to_semicolon, decode_address, decode_m_packet)
3524 (decode_M_packet, decode_X_packet, decode_xfer_write)
3525 (decode_search_memory_packet, unhexify, hexify)
3526 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3527 (look_up_one_symbol, relocate_instruction)
3528 (monitor_output): Move to remote-utils.h, and include it.
3529 * remote-utils.h: New file.
3530
3531 2013-09-05 Pedro Alves <palves@redhat.com>
3532
3533 * server.h (_): Delete.
3534
3535 2013-09-02 Pedro Alves <palves@redhat.com>
3536
3537 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3538 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3539 allocated.
3540 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3541
3542 2013-09-02 Pierre Muller <muller@sourceware.org>
3543
3544 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3545 or WriteProcessMemory complete successfully and handle
3546 ERROR_PARTIAL_COPY error.
3547
3548 2013-09-02 Pedro Alves <palves@redhat.com>
3549
3550 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3551 error instead of EIO.
3552
3553 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3554
3555 PR server/15604
3556 * linux-low.c: Include filestuff.h.
3557 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3558 * lynx-low.c: Include filestuff.h.
3559 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3560 * server.c: Include filestuff.h.
3561 (main): Call notice_open_fds.
3562 * spu-low.c: Include filestuff.h.
3563 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3564
3565 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3566
3567 * Makefile.in: Explain why ../target and ../nat are not
3568 listed as include file search paths.
3569 (linux-waitpid.o): New object file rule.
3570 * configure.srv (srv_native_linux_obj): New variable.
3571 Replace all occurrences of linux native object files with
3572 $srv_native_linux_obj.
3573 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3574 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3575 (linux_enable_event_reporting): Remove declaration.
3576 (my_waitpid): Moved to common/linux-waitpid.c.
3577 (linux_wait_for_event): Pass ptid when calling
3578 linux_enable_event_reporting.
3579 (linux_supports_tracefork_flag): Remove.
3580 (linux_enable_event_reporting): Likewise.
3581 (linux_tracefork_grandchild): Remove.
3582 (STACK_SIZE): Moved to common/linux-ptrace.c.
3583 (linux_tracefork_child): Remove.
3584 (linux_test_for_tracefork): Remove.
3585 (linux_look_up_symbols): Call linux_supports_traceclone.
3586 (initialize_low): Remove call to linux_test_for_tracefork.
3587 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3588 common/linux-ptrace.h.
3589 (PTRACE_TYPE_ARG4): Likewise.
3590 Include linux-ptrace.h.
3591
3592 2013-08-21 Pedro Alves <palves@redhat.com>
3593
3594 * config.in: Renegerate.
3595
3596 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3597
3598 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3599 (SFILES): Remove $(srcdir)/common/target-common.c and
3600 add $(srcdir)/target/waitstatus.c.
3601 (OBS): Remove target-common.o and add waitstatus.o.
3602 (server_h): Remove $(srcdir)/../common/target-common.h and
3603 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3604 and $(srcdir)/../target/waitstatus.h.
3605 (target-common.o): Remove.
3606 (waitstatus.o): New target object file.
3607 * target.h: Do not include target-common.h and
3608 include target/resume.h, target/wait.h and
3609 target/waitstatus.h.
3610
3611 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3612
3613 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3614 to PTRACE_TYPE_ARG3.
3615 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3616 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3617 PTRACE_TYPE_ARG4.
3618 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3619 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3620
3621 2013-07-27 Jie Zhang <jie@codesourcery.com>
3622 Daniel Jacobowitz <dan@codesourcery.com>
3623 Yao Qi <yao@codesourcery.com>
3624
3625 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3626 (mips-linux-watch.o): New rule.
3627 (mips_linux_watch_h): New variable.
3628 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3629 srv_tgtobj.
3630 * linux-mips-low.c: Include mips-linux-watch.h.
3631 (struct arch_process_info, struct arch_lwp_info): New.
3632 (update_watch_registers_callback): New function.
3633 (mips_linux_new_process, mips_linux_new_thread) New functions.
3634 (mips_linux_prepare_to_resume, mips_insert_point): New
3635 functions.
3636 (mips_remove_point, mips_stopped_by_watchpoint): New
3637 functions.
3638 (rsp_bp_type_to_target_hw_bp_type): New function.
3639 (mips_stopped_data_address): New function.
3640 (the_low_target): Add watchpoint support functions.
3641
3642 2013-07-27 Yao Qi <yao@codesourcery.com>
3643
3644 * i386-low.c: Include break-common.h.
3645 (enum target_hw_bp_type): Remove.
3646
3647 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3648
3649 * Makefile.in (SFILES): /common/target-common.c.
3650 (OBS): Add target-common.o.
3651 (server_h): Add $(srcdir)/../common/target-common.h.
3652 (target-common.o): New target.
3653 * server.c (queue_stop_reply_callback): Free
3654 status string after use.
3655 * target.c (target_waitstatus_to_string): Remove.
3656 * target.h: Include target-common.h.
3657 (resume_kind): Likewise.
3658 (target_waitkind): Likewise.
3659 (target_waitstatus): Likewise.
3660 (TARGET_WNOHANG): Likewise.
3661
3662 2013-07-04 Yao Qi <yao@codesourcery.com>
3663
3664 * Makefile.in (host_alias): Use @host_noncanonical@.
3665 (target_alias): Use @target_noncanonical@.
3666 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3667 ACX_NONCANONICAL_HOST.
3668 * configure: Regenerated.
3669
3670 Revert:
3671 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3672
3673 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3674 * configure: Rebuild.
3675 * Makefile.in (version_host, version_target): Get from configure.
3676 (version.c): Use $(version_host) and $(version_target).
3677
3678 2013-07-03 Pedro Alves <palves@redhat.com>
3679
3680 * Makefile.in (config.status): Depend on development.sh.
3681 * acinclude.m4: Include libmcheck.m4.
3682 * configure: Regenerate.
3683
3684 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3685
3686 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3687 attribute inside the parentheses.
3688 (winapi_DebugSetProcessKillOnExit): Ditto.
3689 (winapi_DebugBreakProcess): Ditto.
3690 (winapi_GenerateConsoleCtrlEvent): Ditto.
3691
3692 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3693
3694 * notif.h (notif_event): Add a dummy member to avoid compiler
3695 errors.
3696
3697 2013-07-01 Pedro Alves <palves@redhat.com>
3698
3699 * hostio.c (HOSTIO_PATH_MAX): Define.
3700 (require_filename, handle_open, handle_unlink, handle_readlink):
3701 Use it.
3702
3703 2013-07-01 Pedro Alves <palves@redhat.com>
3704
3705 * server.h: Include "pathmax.h".
3706 * linux-low.c: Don't include sys/param.h.
3707 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3708 MAXPATHLEN.
3709 * win32-low.c: Don't include sys/param.h.
3710 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3711
3712 2013-07-01 Pedro Alves <palves@redhat.com>
3713
3714 * event-loop.c: Don't check HAVE_UNISTD_H before including
3715 <unistd.h>.
3716 * gdbreplay.c: Likewise.
3717 * remote-utils.c: Likewise.
3718 * server.c: Likewise.
3719 * configure.ac: Don't check for unistd.h.
3720 * configure: Regenerate.
3721
3722 2013-06-28 Tom Tromey <tromey@redhat.com>
3723
3724 * Makefile.in (version.c): Use version.in, not
3725 common/version.in.
3726
3727 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3728
3729 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3730 * configure: Rebuild.
3731 * Makefile.in (version_host, version_target): Get from configure.
3732 (version.c): Use $(version_host) and $(version_target).
3733
3734 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3735
3736 Fix trace-status to output user name without trailing colon.
3737 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3738
3739 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3740
3741 Fix trace-status to output proper start-time and stop-time.
3742 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3743 output start time and stop time in hex as gdb expects.
3744
3745 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3746
3747 * tracepoint.c (build_traceframe_info_xml): Output trace state
3748 variables present in the trace buffer.
3749
3750 2013-06-24 Tom Tromey <tromey@redhat.com>
3751
3752 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3753 create-version.sh.
3754 (version.o): Remove.
3755 * gdbreplay.c: Include version.h.
3756 (version, host_name): Don't declare.
3757 * server.h: Include version.h.
3758 (version, host_name): Don't declare.
3759
3760 2013-06-12 Pedro Alves <palves@redhat.com>
3761
3762 * linux-x86-low.c (linux_is_elf64): Delete global.
3763 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3764 with local linux_pid_exe_is_elf_64_file use.
3765
3766 2013-06-11 Pedro Alves <palves@redhat.com>
3767
3768 * linux-low.c (regset_disabled, disable_regset): New functions.
3769 (regsets_fetch_inferior_registers)
3770 (regsets_store_inferior_registers): Use them.
3771 (initialize_regsets_info); Don't allocate the disabled_regsets
3772 array here.
3773 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3774 comment.
3775
3776 2013-06-11 Pedro Alves <palves@redhat.com>
3777
3778 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3779 xmalloc.
3780
3781 2013-06-11 Pedro Alves <palves@redhat.com>
3782
3783 * linux-x86-low.c (initialize_low_arch): Call
3784 init_registers_x32_avx_linux.
3785
3786 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3787
3788 Fix compatibility with Android Bionic.
3789 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3790 it is not empty.
3791
3792 2013-06-07 Pedro Alves <palves@redhat.com>
3793
3794 PR server/14823
3795 * Makefile.in (OBS): Add tdesc.o.
3796 (IPA_OBJS): Add tdesc-ipa.o.
3797 (tdesc-ipa.o): New rule.
3798 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3799 interface.
3800 * linux-low.c (new_inferior): Delete.
3801 (disabled_regsets, num_regsets): Delete.
3802 (linux_add_process): Adjust to set the new per-process
3803 new_inferior flag.
3804 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3805 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3806 was a stop. When calling arch_setup, switch the current inferior
3807 to the thread that got an event.
3808 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3809 (regsets_fetch_inferior_registers)
3810 (regsets_store_inferior_registers): New regsets_info parameter.
3811 Adjust to use it.
3812 (linux_register_in_regsets): New regs_info parameter. Adjust to
3813 use it.
3814 (register_addr, fetch_register, store_register): New usrregs_info
3815 parameter. Adjust to use it.
3816 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3817 parameter regs_info. Adjust to use it.
3818 (linux_fetch_registers): Get the current inferior's regs_info, and
3819 adjust to use it.
3820 (linux_store_registers): Ditto.
3821 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3822 (initialize_low): Don't initialize the target_regsets here. Call
3823 initialize_low_arch.
3824 * linux-low.h (target_regsets): Delete declaration.
3825 (struct regsets_info): New.
3826 (struct usrregs_info): New.
3827 (struct regs_info): New.
3828 (struct process_info_private) <new_inferior>: New field.
3829 (struct linux_target_ops): Delete the num_regs, regmap, and
3830 regset_bitmap fields. New field regs_info.
3831 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3832 * i387-fp.c (num_xmm_registers): Delete.
3833 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3834 calls to new interface.
3835 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3836 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3837 Infer the number of xmm registers from the regcache's target
3838 description.
3839 * i387-fp.h (num_xmm_registers): Delete.
3840 * inferiors.c (add_thread): Don't install the thread's regcache
3841 here.
3842 * proc-service.c (gregset_info): Fetch the current inferior's
3843 regs_info. Adjust to use it.
3844 * regcache.c: Include tdesc.h.
3845 (register_bytes, reg_defs, num_registers)
3846 (gdbserver_expedite_regs): Delete.
3847 (get_thread_regcache): If the thread doesn't have a regcache yet,
3848 create one, instead of aborting gdbserver.
3849 (regcache_invalidate_one): Rename to ...
3850 (regcache_invalidate_thread): ... this.
3851 (regcache_invalidate_one): New.
3852 (regcache_invalidate): Only invalidate registers of the current
3853 process.
3854 (init_register_cache): Add target_desc parameter, and use it.
3855 (new_register_cache): Ditto. Assert the target description has a
3856 non zero registers_size.
3857 (regcache_cpy): Add assertions. Adjust.
3858 (realloc_register_cache, set_register_cache): Delete.
3859 (registers_to_string, registers_from_string): Adjust.
3860 (find_register_by_name, find_regno, find_register_by_number)
3861 (register_cache_size): Add target_desc parameter, and use it.
3862 (free_register_cache_thread, free_register_cache_thread_one)
3863 (regcache_release, register_cache_size): New.
3864 (register_size): Add target_desc parameter, and use it.
3865 (register_data, supply_register, supply_register_zeroed)
3866 (supply_regblock, supply_register_by_name, collect_register)
3867 (collect_register_as_string, collect_register_by_name): Adjust.
3868 * regcache.h (struct target_desc): Forward declare.
3869 (struct regcache) <tdesc>: New field.
3870 (init_register_cache, new_register_cache): Add target_desc
3871 parameter.
3872 (regcache_invalidate_thread): Declare.
3873 (regcache_invalidate_one): Delete declaration.
3874 (regcache_release): Declare.
3875 (find_register_by_number, register_cache_size, register_size)
3876 (find_regno): Add target_desc parameter.
3877 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3878 declarations.
3879 * remote-utils.c: Include tdesc.h.
3880 (outreg, prepare_resume_reply): Adjust.
3881 * server.c: Include tdesc.h.
3882 (gdbserver_xmltarget): Delete declaration.
3883 (get_features_xml, process_serial_event): Adjust.
3884 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3885 declare.
3886 (struct process_info) <tdesc>: New field.
3887 (ipa_tdesc): Declare.
3888 * tdesc.c: New file.
3889 * tdesc.h: New file.
3890 * tracepoint.c: Include tdesc.h.
3891 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3892 (get_context_regcache): Adjust to pass ipa_tdesc down.
3893 (do_action_at_tracepoint): Adjust to get the register cache size
3894 from the context regcache's description.
3895 (traceframe_walk_blocks): Adjust to get the register cache size
3896 from the current trace frame's description.
3897 (traceframe_get_pc): Adjust to get current trace frame's
3898 description and pass it down.
3899 (gdb_collect): Adjust to get the register cache size from the
3900 IPA's description.
3901 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3902 (gdbserver_xmltarget): Delete.
3903 (initialize_low_tracepoint): Set the ipa's target description.
3904 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3905 (initialize_low_tracepoint): Set the ipa's target description.
3906 * linux-x86-low.c: Include tdesc.h.
3907 [__x86_64__] (is_64bit_tdesc): New.
3908 (ps_get_thread_area, x86_get_thread_area): Use it.
3909 (i386_cannot_store_register): Rename to ...
3910 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3911 (i386_cannot_fetch_register): Rename to ...
3912 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3913 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3914 to new interface.
3915 (target_regsets): Rename to ...
3916 (x86_regsets): ... this.
3917 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3918 interface.
3919 (x86_siginfo_fixup): Use is_64bit_tdesc.
3920 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3921 (tdesc_x32_avx_linux, tdesc_x32_linux)
3922 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3923 Declare.
3924 (x86_linux_update_xmltarget): Delete.
3925 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3926 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3927 (AMD64_LINUX_USER64_CS): New.
3928 (x86_linux_read_description): New, based on
3929 x86_linux_update_xmltarget.
3930 (same_process_callback): New.
3931 (x86_arch_setup_process_callback): New.
3932 (x86_linux_update_xmltarget): New.
3933 (x86_regsets_info): New.
3934 (amd64_linux_regs_info): New.
3935 (i386_linux_usrregs_info): New.
3936 (i386_linux_regs_info): New.
3937 (x86_linux_regs_info): New.
3938 (x86_arch_setup): Reimplement.
3939 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3940 (x86_emit_ops): Ditto.
3941 (the_low_target): Adjust. Install x86_linux_regs_info,
3942 x86_cannot_fetch_register, and x86_cannot_store_register.
3943 (initialize_low_arch): New.
3944 * linux-ia64-low.c (tdesc_ia64): Declare.
3945 (ia64_fetch_register): Adjust.
3946 (ia64_usrregs_info, regs_info): New globals.
3947 (ia64_regs_info): New function.
3948 (the_low_target): Adjust.
3949 (initialize_low_arch): New function.
3950 * linux-sparc-low.c (tdesc_sparc64): Declare.
3951 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3952 Adjust.
3953 (sparc_arch_setup): New function.
3954 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3955 (the_low_target): Adjust.
3956 (initialize_low_arch): New function.
3957 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3958 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3959 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3960 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3961 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3962 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3963 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3964 (tdesc_powerpc_isa205_vsx64l): Declare.
3965 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3966 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3967 (ppc_set_pc, ppc_get_hwcap): Adjust.
3968 (ppc_usrregs_info): Forward declare.
3969 (!__powerpc64__) ppc_regmap_adjusted: New global.
3970 (ppc_arch_setup): Adjust to the current process'es target
3971 description.
3972 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3973 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3974 (ppc_store_evrregset): Adjust.
3975 (target_regsets): Rename to ...
3976 (ppc_regsets): ... this, and make static.
3977 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3978 (ppc_regs_info): New function.
3979 (the_low_target): Adjust.
3980 (initialize_low_arch): New function.
3981 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3982 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3983 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3984 (tdesc_s390x_linux64v2): Declare.
3985 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3986 (s390_fill_gregset, s390_store_last_break): Adjust.
3987 (target_regsets): Rename to ...
3988 (s390_regsets): ... this, and make static.
3989 (s390_get_pc, s390_set_pc): Adjust.
3990 (s390_get_hwcap): New target_desc parameter, and use it.
3991 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3992 (s390_arch_setup): Adjust to set the current process'es target
3993 description. Don't adjust the regmap.
3994 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3995 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3996 (regs_info_3264): New globals.
3997 (s390_regs_info): New function.
3998 (the_low_target): Adjust.
3999 (initialize_low_arch): New function.
4000 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4001 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4002 [__mips64] (init_registers_mips_linux)
4003 (init_registers_mips_dsp_linux): Delete defines.
4004 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4005 (have_dsp): New global.
4006 (mips_read_description): New, based on mips_arch_setup.
4007 (mips_arch_setup): Reimplement.
4008 (get_usrregs_info): New function.
4009 (mips_cannot_fetch_register, mips_cannot_store_register)
4010 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4011 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4012 (target_regsets): Rename to ...
4013 (mips_regsets): ... this, and make static.
4014 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4015 (dsp_regs_info, regs_info): New globals.
4016 (mips_regs_info): New function.
4017 (the_low_target): Adjust.
4018 (initialize_low_arch): New function.
4019 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4020 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4021 Declare.
4022 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4023 (arm_read_description): New, with bits factored from
4024 arm_arch_setup.
4025 (arm_arch_setup): Reimplement.
4026 (target_regsets): Rename to ...
4027 (arm_regsets): ... this, and make static.
4028 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4029 (arm_regs_info): New function.
4030 (the_low_target): Adjust.
4031 (initialize_low_arch): New function.
4032 * linux-m68k-low.c (tdesc_m68k): Declare.
4033 (target_regsets): Rename to ...
4034 (m68k_regsets): ... this, and make static.
4035 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4036 (m68k_regs_info): New function.
4037 (m68k_arch_setup): New function.
4038 (the_low_target): Adjust.
4039 (initialize_low_arch): New function.
4040 * linux-sh-low.c (tdesc_sharch): Declare.
4041 (target_regsets): Rename to ...
4042 (sh_regsets): ... this, and make static.
4043 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4044 (sh_regs_info, sh_arch_setup): New functions.
4045 (the_low_target): Adjust.
4046 (initialize_low_arch): New function.
4047 * linux-bfin-low.c (tdesc_bfin): Declare.
4048 (bfin_arch_setup): New function.
4049 (bfin_usrregs_info, regs_info): New globals.
4050 (bfin_regs_info): New function.
4051 (the_low_target): Adjust.
4052 (initialize_low_arch): New function.
4053 * linux-cris-low.c (tdesc_cris): Declare.
4054 (cris_arch_setup): New function.
4055 (cris_usrregs_info, regs_info): New globals.
4056 (cris_regs_info): New function.
4057 (the_low_target): Adjust.
4058 (initialize_low_arch): New function.
4059 * linux-cris-low.c (tdesc_crisv32): Declare.
4060 (cris_arch_setup): New function.
4061 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4062 (cris_regs_info): New function.
4063 (the_low_target): Adjust.
4064 (initialize_low_arch): New function.
4065 * linux-m32r-low.c (tdesc_m32r): Declare.
4066 (m32r_arch_setup): New function.
4067 (m32r_usrregs_info, regs_info): New globals.
4068 (m32r_regs_info): Adjust.
4069 (initialize_low_arch): New function.
4070 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4071 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4072 (tic6x_usrregs_info): Forward declare.
4073 (tic6x_read_description): New function, based on ...
4074 (tic6x_arch_setup): ... this. Reimplement.
4075 (target_regsets): Rename to ...
4076 (tic6x_regsets): ... this, and make static.
4077 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4078 (tic6x_regs_info): New function.
4079 (the_low_target): Adjust.
4080 (initialize_low_arch): New function.
4081 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4082 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4083 (target_regsets): Rename to ...
4084 (xtensa_regsets): ... this, and make static.
4085 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4086 globals.
4087 (xtensa_arch_setup, xtensa_regs_info): New functions.
4088 (the_low_target): Adjust.
4089 (initialize_low_arch): New function.
4090 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4091 (nios2_arch_setup): Set the current process'es tdesc.
4092 (target_regsets): Rename to ...
4093 (nios2_regsets): ... this.
4094 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4095 (nios2_regs_info): New function.
4096 (the_low_target): Adjust.
4097 (initialize_low_arch): New function.
4098 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4099 (aarch64_arch_setup): Set the current process'es tdesc.
4100 (target_regsets): Rename to ...
4101 (aarch64_regsets): ... this.
4102 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4103 (aarch64_regs_info): New function.
4104 (the_low_target): Adjust.
4105 (initialize_low_arch): New function.
4106 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4107 globals.
4108 (target_regsets): Rename to ...
4109 (tile_regsets): ... this.
4110 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4111 (tile_regs_info): New function.
4112 (tile_arch_setup): Set the current process'es tdesc.
4113 (the_low_target): Adjust.
4114 (initialize_low_arch): New function.
4115 * spu-low.c (tdesc_spu): Declare.
4116 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4117 * win32-arm-low.c (tdesc_arm): Declare.
4118 (arm_arch_setup): New function.
4119 (the_low_target): Install arm_arch_setup instead of
4120 init_registers_arm.
4121 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4122 (init_windows_x86): Rename to ...
4123 (i386_arch_setup): ... this. Set `win32_tdesc'.
4124 (the_low_target): Adjust.
4125 * win32-low.c (win32_tdesc): New global.
4126 (child_add_thread): Don't create the thread cache here.
4127 (do_initial_child_stuff): Set the new process'es tdesc.
4128 * win32-low.h (struct target_desc): Forward declare.
4129 (win32_tdesc): Declare.
4130 * lynx-i386-low.c (tdesc_i386): Declare global.
4131 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4132 * lynx-low.c (lynx_tdesc): New global.
4133 (lynx_add_process): Set the new process'es tdesc.
4134 * lynx-low.h (struct target_desc): Forward declare.
4135 (lynx_tdesc): Declare global.
4136 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4137 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4138 * nto-low.c (nto_tdesc): New global.
4139 (do_attach): Set the new process'es tdesc.
4140 * nto-low.h (struct target_desc): Forward declare.
4141 (nto_tdesc): Declare.
4142 * nto-x86-low.c (tdesc_i386): Declare.
4143 (nto_x86_arch_setup): Set `nto_tdesc'.
4144
4145 2013-06-04 Gary Benson <gbenson@redhat.com>
4146
4147 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4148 to qSupported response when appropriate.
4149 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4150 with nonzero-length annex.
4151 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4152 arguments supplied in annex.
4153
4154 2013-05-31 Doug Evans <dje@google.com>
4155
4156 PR server/15594
4157 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4158 64 bits in 64-cross-32 environment.
4159
4160 2013-05-28 Pedro Alves <palves@redhat.com>
4161
4162 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4163 (aarch64-without-fpu.c): Delete rule.
4164 * configure.srv (aarch64*-*-linux*): Remove references to
4165 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4166 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4167 declaration.
4168
4169 2013-05-24 Pedro Alves <palves@redhat.com>
4170
4171 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4172 instead of strchr/decode_address. Error if the range isn't split
4173 with a ','. Don't assume there's be a ':' in the action.
4174
4175 2013-05-23 Yao Qi <yao@codesourcery.com>
4176 Pedro Alves <palves@redhat.com>
4177
4178 * linux-low.c (lwp_in_step_range): New function.
4179 (linux_wait_1): If the thread was range stepping and stopped
4180 outside the stepping range, report the stop to GDB. Otherwise,
4181 continue stepping. Add range stepping debug output.
4182 (linux_set_resume_request): Copy the step range from the resume
4183 request to the lwp.
4184 (linux_supports_range_stepping): New.
4185 (linux_target_ops) <supports_range_stepping>: Set to
4186 linux_supports_range_stepping.
4187 * linux-low.h (struct linux_target_ops)
4188 <supports_range_stepping>: New field.
4189 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4190 * linux-x86-low.c (x86_supports_range_stepping): New.
4191 (the_low_target) <supports_range_stepping>: Set to
4192 x86_supports_range_stepping.
4193 * server.c (handle_v_cont): Handle 'r' action.
4194 (handle_v_requests): Append ";r" if the target supports range
4195 stepping.
4196 * target.h (struct thread_resume) <step_range_start,
4197 step_range_end>: New fields.
4198 (struct target_ops) <supports_range_stepping>:
4199 New field.
4200 (target_supports_range_stepping): New macro.
4201
4202 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4203
4204 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4205 confusion in comment.
4206
4207 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4208
4209 * lynx-low.c (struct process_info_private): New type.
4210 (lynx_add_process): New function.
4211 (lynx_create_inferior, lynx_attach): Replace calls to
4212 add_process by calls to lynx_add_process.
4213 (lynx_resume): If PTID is null, then try using
4214 current_process()->private->last_wait_event_ptid.
4215 Add comments.
4216 (lynx_clear_inferiors): Delete. The contents of that function
4217 has been inlined in lynx_mourn;
4218 (lynx_wait_1): Save the ptid in the process's private data.
4219 (lynx_mourn): Free the process' private data. Replace call
4220 to lynx_clear_inferiors by call to clear_inferiors.
4221
4222 2013-05-17 Yao Qi <yao@codesourcery.com>
4223
4224 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4225 the right place.
4226
4227 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4228
4229 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4230 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4231 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4232 PT_TEXT_END_ADDR guards. Update comments.
4233 (linux_target_op) <read_offsets>: Conditionally define to
4234 linux_read_offsets if the target is UCLIBC and if it defines
4235 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4236
4237 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4238 Andrew Jenner <andrew@codesourcery.com>
4239
4240 * Makefile.in (SFILES): Add linux-nios2-low.c.
4241 (clean): Add action to delete nios2-linux.c.
4242 (nios2-linux.c): New rule.
4243 * configure.srv: Add nios2*-*-linux*.
4244 * linux-nios2-low.c: New.
4245
4246 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4247
4248 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4249
4250 2013-04-25 Hui Zhu <hui@codesourcery.com>
4251
4252 PR gdb/15186
4253 * ax.c (ax_printf): Add fflush.
4254
4255 2013-04-22 Tom Tromey <tromey@redhat.com>
4256
4257 * Makefile.in (SFILES): Add filestuff.c.
4258 (OBS): Add filestuff.o.
4259 (filestuff.o): New target.
4260 * config.in, configure: Rebuild.
4261 * configure.ac: Check for fdwalk, pipe2.
4262
4263 2013-04-17 Pedro Alves <palves@redhat.com>
4264
4265 * configure.ac (USE_THREAD_DB): Delete variable.
4266 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4267 Don't AC_SUBST USE_THREAD_DB.
4268 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4269 * config.in, configure: Regenerate.
4270
4271 2013-04-16 Pedro Alves <palves@redhat.com>
4272
4273 * linux-low.h (struct lwp_info) <thread_known>: Move under
4274 the USE_THREAD_DB #ifdef.
4275
4276 2013-04-16 Pedro Alves <palves@redhat.com>
4277
4278 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4279 (linux-low.o): Delete rule.
4280 * linux-low.h: Always include "gdb_thread_db.h" instead of
4281 conditionally including thread_db.h.
4282 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4283 HAVE_THREAD_DB_H.
4284
4285 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4286
4287 * Makefile.in (install-only): Fix make install regression.
4288
4289 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4290
4291 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4292 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4293 installation.
4294 * gdbserver.1: Remove.
4295
4296 2013-03-22 Pedro Alves <palves@redhat.com>
4297
4298 * linux-low.c (handle_extended_wait): Don't call
4299 linux_enable_event_reporting.
4300
4301 2013-03-15 Tony Theodore <tonyt@logyst.com>
4302
4303 PR build/9098:
4304 * Makefile.in (SHELL): Use @SHELL@.
4305
4306 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4307
4308 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4309 compiler warning.
4310
4311 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4312
4313 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4314 Remove extraneous NULL element.
4315
4316 2013-03-13 Yao Qi <yao@codesourcery.com>
4317
4318 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4319 'V' block in trace frame.
4320
4321 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4322
4323 * target.h (struct target_ops): Add btrace ops.
4324 (target_supports_btrace): New macro.
4325 (target_enable_btrace): New macro.
4326 (target_disable_btrace): New macro.
4327 (target_read_btrace): New macro.
4328 * gdbthread.h (struct thread_info): Add btrace field.
4329 * server.c: Include btrace-common.h.
4330 (handle_btrace_general_set): New function.
4331 (handle_btrace_enable): New function.
4332 (handle_btrace_disable): New function.
4333 (handle_general_set): Call handle_btrace_general_set.
4334 (handle_qxfer_btrace): New function.
4335 (struct qxfer qxfer_packets[]): Add btrace entry.
4336 * inferiors.c (remove_thread): Disable btrace.
4337 * linux-low: Include linux-btrace.h.
4338 (linux_low_enable_btrace): New function.
4339 (linux_low_read_btrace): New function.
4340 (linux_target_ops): Add btrace ops.
4341 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4342 Add srv_linux_btrace=yes.
4343 (x86_64-*-linux*): Add linux-btrace.o.
4344 Add srv_linux_btrace=yes.
4345 * configure.ac: Define HAVE_LINUX_BTRACE.
4346 * config.in: Regenerated.
4347 * configure: Regenerated.
4348
4349 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4350
4351 * server.c (handle_qxfer): Preserve error message if -3 is
4352 returned.
4353 (qxfer): Document the -3 return value.
4354
4355 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4356
4357 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4358 (linux_btrace_h): New variable.
4359 (linux-btrace.o): New rule.
4360
4361 2013-03-08 Stan Shebs <stan@codesourcery.com>
4362 Hafiz Abid Qadeer <abidh@codesourcery.com>
4363
4364 * tracepoint.c (trace_buffer_size): New global.
4365 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4366 (init_trace_buffer): Change to one-argument function. Allocate
4367 trace buffer memory.
4368 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4369 handle QTBuffer:size packet.
4370 (cmd_bigqtbuffer_size): New function.
4371 (initialize_tracepoint): Call init_trace_buffer with
4372 DEFAULT_TRACE_BUFFER_SIZE.
4373 * server.c (handle_query): Add QTBuffer:size in the
4374 supported packets.
4375
4376 2013-03-07 Yao Qi <yao@codesourcery.com>
4377
4378 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4379 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4380 of -1.
4381 (cmd_qtsp): Adjust condition. Do post increment.
4382 Set cur_action and cur_step_action back to 0.
4383
4384 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4385
4386 PR server/15236
4387 * linux-low.c (linux_write_memory): Return early success if LEN is
4388 zero.
4389
4390 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4391
4392 * configure.srv: Add x86_64-*-cygwin* as target.
4393
4394 2013-02-28 Tom Tromey <tromey@redhat.com>
4395
4396 * configure.ac: Invoke AC_SYS_LARGEFILE.
4397 * configure, config.in: Rebuild.
4398
4399 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4400
4401 * win32-low.c: Throughout, fix format strings and casts of
4402 printf-like functions to avoid type related warnings on all
4403 platforms.
4404 (get_child_debug_event): Print dwDebugEventCode as hex since
4405 that's how it's usually documented.
4406
4407 2013-02-28 Yao Qi <yao@codesourcery.com>
4408
4409 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4410 pulongest.
4411
4412 2013-02-27 Jiong Wang <jiwang@tilera.com>
4413
4414 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4415 (reg-tilegx32.c): New rule.
4416 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4417 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4418 different register info initializer according to elf class.
4419 (init_registers_tilgx32): New function. The tilegx32 register info
4420 initializer.
4421 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4422 (tile_store_gregset): Likewise.
4423
4424 2013-02-27 Yao Qi <yao@codesourcery.com>
4425
4426 * server.c (process_point_options): Print debug message when
4427 debug_threads is true.
4428
4429 2013-02-26 Yao Qi <yao@codesourcery.com>
4430
4431 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4432
4433 2013-02-19 Pedro Alves <palves@redhat.com>
4434 Kai Tietz <ktietz@redhat.com>
4435
4436 PR gdb/15161
4437
4438 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4439 instead of strtoul to extract address from packet.
4440 (process_serial_event) <'z'>: Likewise.
4441
4442 2013-02-18 Yao Qi <yao@codesourcery.com>
4443
4444 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4445
4446 2013-02-14 Pedro Alves <palves@redhat.com>
4447
4448 Plug memory leak.
4449
4450 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4451 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4452
4453 2013-02-14 Pedro Alves <palves@redhat.com>
4454
4455 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4456
4457 2013-02-14 Pedro Alves <palves@redhat.com>
4458
4459 * tracepoint.c (save_string): Delete.
4460 (add_tracepoint_action): Use savestring instead of save_string.
4461
4462 2013-02-12 Pedro Alves <palves@redhat.com>
4463
4464 * linux-xtensa-low.c: Ditto.
4465 * xtensa-xtregs.c: Ditto.
4466
4467 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4468
4469 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4470 thread_db.
4471
4472 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4473
4474 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4475 aarch64_num_wp_regs and aarch64_num_bp_regs to
4476 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4477
4478 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4479
4480 * linux-aarch64-low.c (ps_get_thread_area): Replace
4481 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4482
4483 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4484 Marcus Shawcroft <marcus.shawcroft@arm.com>
4485 Nigel Stephens <nigel.stephens@arm.com>
4486 Yufeng Zhang <yufeng.zhang@arm.com>
4487
4488 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4489 (aarch64.c, aarch64-without-fpu.c): New targets.
4490 * configure.srv (aarch64*-*-linux*): New.
4491 * linux-aarch64-low.c: New file.
4492
4493 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4494
4495 * linux-low.c (handle_extended_wait, linux_create_inferior)
4496 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4497 (dequeue_one_deferred_signal, linux_resume_one_thread)
4498 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4499 (linux_tracefork_grandchild, linux_test_for_tracefork)
4500 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4501 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4502 where the argument is 0.
4503
4504 2013-01-25 Yao Qi <yao@codesourcery.com>
4505
4506 * event-loop.c: Include "queue.h".
4507 (gdb_event_p): New typedef.
4508 (struct gdb_event) <next_event>: Remove.
4509 (event_queue): Change to QUEUE(gdb_event_p).
4510 (async_queue_event): Remove.
4511 (gdb_event_xfree): New.
4512 (initialize_event_loop): New.
4513 (process_event): Use API from QUEUE.
4514 (wait_for_event): Likewise.
4515 * server.c (main): Call initialize_event_loop.
4516 * server.h (initialize_event_loop): Declare.
4517
4518 2013-01-18 Yao Qi <yao@codesourcery.com>
4519
4520 * ax.h (struct eval_agent_expr_context): New.
4521 (gdb_eval_agent_expr): Update declaration.
4522 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4523 TFRAME. Add new argument CTX.
4524 * server.h (struct eval_agent_expr_context): Declare.
4525 (agent_mem_read, agent_tsv_read): Update declaration.
4526 (agent_mem_read_string): Likewise.
4527 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4528 (add_traceframe_block): Add new argument TPOINT.
4529 Increase TPOINT->traceframe_usage.
4530 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4531 eval_tracepoint_agent_expr.
4532 (condition_true_at_tracepoint): Likewise.
4533 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4534 (agent_mem_read_string, agent_tsv_read): Likewise.
4535
4536 2013-01-16 Yao Qi <yao@codesourcery.com>
4537
4538 * linux-low.c (linux_resume_one_lwp): Don't check
4539 'lwp->bp_reinsert != 0'.
4540
4541 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4542 Pedro Alves <palves@redhat.com>
4543
4544 * lynx-low.c (ptrace_request_to_str): Define a temporary
4545 macro and use it to simplify this function's implementation.
4546
4547 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4548
4549 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4550 sets errno.
4551
4552 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4553
4554 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4555
4556 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4557
4558 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4559
4560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4561
4562 * lynx-low.c (lynx_resume): Use the resume_info parameter
4563 to determine the ptid for the lynx_ptrace call, unless
4564 it is equal to minus_one_ptid, in which case we use the
4565 ptid of the current_inferior.
4566 (lynx_wait_1): After having received a thread create/exit
4567 event, resume the inferior's execution using the signaling
4568 thread's ptid, rather than the old ptid.
4569
4570 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4571
4572 * lynx-low.c (lynx_resume): Delete variable ret.
4573
4574 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4575
4576 * gdbreplay.c (gdbreplay_version): Update copyright year.
4577 * server.c (gdbserver_version): Likewise.
4578
4579 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4580
4581 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4582 new thread.
4583
4584 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4585
4586 * lynx-low.c (ptrace_request_to_str): Add handling for
4587 PTRACE_GETTRACESIG.
4588
4589 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4590
4591 * lynx-low.c (lynx_attach): Delete variable new_process.
4592
4593 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4594
4595 * lynx-low.c (lynx_create_inferior): Delete variable
4596 new_process.
4597
4598 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4599
4600 * lynx-low.c (ptrace_request_to_str): Do not handle
4601 PTRACE_GETTHREADLIST if this macro does not exist.
4602
4603 2012-12-15 Yao Qi <yao@codesourcery.com>
4604
4605 * Makefile.in (OBS): Add notif.o.
4606 * notif.c, notif.h: New.
4607 * server.c: Include "notif.h".
4608 (struct vstop_notif) <next>: Remove.
4609 <base>: New field.
4610 (queue_stop_reply): Update.
4611 (push_event, send_next_stop_reply): Remove.
4612 (discard_queued_stop_replies): Update.
4613 (notif_stop): New variable.
4614 (handle_v_stopped): Remove.
4615 (handle_v_requests): Don't call handle_v_stopped. Call
4616 handle_ack_notif instead.
4617 (queue_stop_reply_callback): Call notif_event_enque instead
4618 of queue_stop_reply.
4619 (handle_status): Don't call send_next_stop_reply, call
4620 notif_write_event instead.
4621 (kill_inferior_callback): Likewise.
4622 (detach_or_kill_inferior_callback): Likewise.
4623 (main): Call initialize_notif.
4624 (process_serial_event): Call QUEUE_is_empty.
4625 (handle_target_event): Call notif_push instead of push event.
4626 * server.h (push_event): Remove declaration.
4627
4628 2012-12-10 Tom Tromey <tromey@redhat.com>
4629
4630 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4631 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4632 macros.
4633 (.c.o): Rewrite.
4634 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4635 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4636 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4637 (amd64-linux-ipa.o, ax.o): Rewrite.
4638 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4639 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4640 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4641 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4642 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4643 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4644 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4645 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4646 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4647 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4648 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4649 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4650 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4651 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4652 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4653 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4654 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4655 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4656 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4657 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4658 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4659 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4660 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4661 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4662 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4663 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4664 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4665 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4666 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4667 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4668 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4669 (reg-tilegx.o): Remove.
4670 (all_object_files): New macro.
4671 Include .deps files.
4672 * aclocal.m4, configure: Rebuild.
4673 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4674 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4675 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4676
4677 2012-12-05 Tom Tromey <tromey@redhat.com>
4678
4679 PR gdb/14917:
4680 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4681
4682 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4683
4684 * configure.ac: Check for linux/perf_event.h.
4685 * config.in: Regenerated.
4686 * configure: Regenerated.
4687
4688 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4689
4690 * hostio.c (handle_readlink): Decrease buffer size
4691 parameter passed to readlink by one byte.
4692
4693 2012-11-26 Yao Qi <yao@codesourcery.com>
4694
4695 * configure.ac (build_warnings): Append '-Wempty-body'.
4696 * configure: Regenerated.
4697 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4698 body.
4699
4700 2012-11-15 Pierre Muller <muller@sourceware.org>
4701
4702 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4703 * config.in: Regenerate.
4704 * configure: Regenerate.
4705 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4706 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4707 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4708 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4709 header.
4710 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4711 instead of <sys/wait.h> header.
4712 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4713
4714 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4715
4716 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4717 (various make rules): Remove -DGDBSERVER
4718
4719 2012-11-09 Yao Qi <yao@codesourcery.com>
4720
4721 * spu-low.c (current_ptid): Move it to ..
4722 * gdbthread.h: ... here. New.
4723 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4724 * server.c (myresume, process_serial_event): Likewise.
4725 * thread-db.c (thread_db_find_new_threads): Likewise.
4726 * tracepoint.c (run_inferior_command): Likewise.
4727
4728 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4729
4730 * server.c (handle_search_memory_1): Include access length in
4731 warning message.
4732
4733 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4734
4735 * linux-crisv32-low.c: Fix compile errors.
4736
4737 2012-09-04 Yao Qi <yao@codesourcery.com>
4738
4739 * tracepoint.c (cmd_qtsv): Adjust debug message.
4740 Don't check CUR_TPOINT.
4741
4742 2012-08-28 Yao Qi <yao@codesourcery.com>
4743
4744 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4745 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4746 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4747 Remove declarations of xmalloc, xreallloc, xstrdup and
4748 freeargv.
4749 * Makefile.in (libiberty_h): New.
4750 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4751 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4752
4753 2012-08-23 Yao Qi <yao@codesourcery.com>
4754
4755 * server.h: Remove declaration of 'xsnprintf'.
4756
4757 2012-08-22 Keith Seitz <keiths@redhat.com>
4758
4759 * server.h: Include build-gnulib-gbserver/config.h.
4760 * gdbreplay.c: Likewise.
4761
4762 2012-08-08 Doug Evans <dje@google.com>
4763
4764 * Makefile.in (SFILES): Add gdb_vecs.c.
4765 (OBS): Add gdb_vecs.o.
4766 (gdb_vecs_h, host_defs_h): New variables.
4767 (thread-db.o): Add $(gdb_vecs_h) dependency.
4768 (gdb_vecs.o): New rule.
4769 * thread-db.c: #include "gdb_vecs.h".
4770 (thread_db_load_search): Use a vector to iterate over path elements.
4771 Handle text appearing after "$pdir".
4772
4773 * configure.ac: Add check for strstr.
4774 * config.in: Regenerate.
4775 * configure: Regenerate.
4776
4777 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4778
4779 * hostio.c (handle_pread): If pread fails, fall back to attempting
4780 lseek/read.
4781 (handle_pwrite): Likewise for pwrite.
4782
4783 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4784
4785 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4786 between unsupported TYPE and unimplementable ADDR/LEN combination.
4787 (arm_insert_point): Act on new return value.
4788
4789 2012-07-31 Pedro Alves <palves@redhat.com>
4790
4791 * server.c (process_point_options): Only skip tokens if we find
4792 one that is unrecognized. Don't treat 'X' specially while
4793 skipping unrecognized tokens.
4794
4795 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4796
4797 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4798 to 4-byte-align HW breakpoint addresses for Thumb.
4799
4800 2012-07-27 Yao Qi <yao@codesourcery.com>
4801
4802 PR remote/14161.
4803
4804 * server.h: Declare gdb_agent_about_to_close.
4805 * target.c (kill_inferior): Include "agent.h".
4806 New. Send command 'kill'.
4807 * target.h (kill_inferior): Removed macro.
4808 * tracepoint.c (gdb_agent_about_to_close): New.
4809 (gdb_agent_helper_thread): Handle command 'close'.
4810 Wait endlessly until the inferior stops.
4811 Install gdb_agent_remove_socket to atexit hook.
4812 (agent_socket_name): New static variable.
4813 (gdb_agent_socket_init): Replace local variable 'name' with
4814 'agent_socket_name'.
4815 (gdb_agent_remove_socket): New.
4816
4817 2012-07-27 Yao Qi <yao@codesourcery.com>
4818
4819 * server.c (process_point_options): Stop at 'X' when parsing.
4820
4821 2012-07-19 Michael Eager <eager@eagercon.com>
4822
4823 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4824 to hw_execute.
4825 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4826 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4827 hardware breakpoint.
4828
4829 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4830
4831 * gdbserver/linux-low.c (initialize_low): Call
4832 linux_ptrace_init_warnings.
4833
4834 2012-07-02 Doug Evans <dje@google.com>
4835
4836 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4837 pointer to int.
4838
4839 2012-07-02 Stan Shebs <stan@codesourcery.com>
4840
4841 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4842 (ax.o): Add it to build rule.
4843 (ax-ipa.o): Ditto.
4844 (OBS): Add format.o.
4845 (IPA_OBS): Add format.o.
4846 * server.c (handle_query): Claim support for breakpoint commands.
4847 (process_point_options): Add command case.
4848 (process_serial_event): Leave running if there are printfs in
4849 effect.
4850 * mem-break.h (any_persistent_commands): Declare.
4851 (add_breakpoint_commands): Declare.
4852 (gdb_no_commands_at_breakpoint): Declare.
4853 (run_breakpoint_commands): Declare.
4854 * mem-break.c (struct point_command_list): New struct.
4855 (struct breakpoint): New field command_list.
4856 (any_persistent_commands): New function.
4857 (add_commands_to_breakpoint): New function.
4858 (add_breakpoint_commands): New function.
4859 (gdb_no_commands_at_breakpoint): New function.
4860 (run_breakpoint_commands): New function.
4861 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4862 locally.
4863 * ax.c: Include format.h.
4864 (ax_printf): New function.
4865 (gdb_eval_agent_expr): Add printf opcode.
4866
4867 2012-06-13 Yao Qi <yao@codesourcery.com>
4868
4869 * server.c (start_inferior): Remove duplicated writes to fields
4870 'last_resume_kind' and 'last_status' of 'current_inferior'.
4871
4872 2012-06-12 Yao Qi <yao@codesourcery.com>
4873 Pedro Alves <palves@redhat.com>
4874
4875 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4876 comment.
4877 * server.c (handle_v_cont): Extend comment.
4878
4879 2012-06-11 Yao Qi <yao@codesourcery.com>
4880
4881 * linux-low.c (linux_attach): Add 'static'.
4882
4883 2012-06-06 Yao Qi <yao@codesourcery.com>
4884
4885 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4886
4887 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4888
4889 Fix gcc -flto compilation warning.
4890 * server.c (main): Make variable multi_mode and attach volatile.
4891
4892 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4893
4894 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4895 if the platform doesn't know about it.
4896
4897 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4898
4899 * Makefile.in (SFILES): Add linux-tile-low.c.
4900 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4901 * configure.srv: Handle tilegx-*-linux*.
4902 * linux-tile-low.c: New file.
4903
4904 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4905
4906 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4907
4908 2012-05-24 Pedro Alves <palves@redhat.com>
4909
4910 PR gdb/7205
4911
4912 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4913
4914 2012-05-24 Pedro Alves <palves@redhat.com>
4915
4916 PR gdb/7205
4917
4918 Replace target_signal with gdb_signal throughout.
4919
4920 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4921
4922 * linux-low.c (linux_store_registers): Avoid the copying sequence
4923 when no data has been retrieved by ptrace.
4924
4925 2012-05-22 Will Deacon <will.deacon@arm.com>
4926
4927 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4928 Include asm/ptrace.h.
4929 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4930 already defined.
4931
4932 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4933
4934 * linux-low.c (linux_store_registers): Don't re-retrieve data
4935 with ptrace that has already been obtained from /proc. Always
4936 copy any data retrieved with ptrace to the buffer supplied.
4937
4938 2012-05-11 Yao Qi <yao@codesourcery.com>
4939 Pedro Alves <palves@redhat.com>
4940
4941 * linux-low.c (enum stopping_threads_kind): New.
4942 (stopping_threads): Change type to `enum stopping_threads_kind'.
4943 (handle_extended_wait): If stopping and suspending threads, leave
4944 the new_lwp suspended too.
4945 (linux_wait_for_event): Adjust.
4946 (stop_all_lwps): Set `stopping_threads' to
4947 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4948 whether we're suspending threads or just stopping them. Assert no
4949 recursion happens.
4950
4951 2012-04-29 Yao Qi <yao@codesourcery.com>
4952
4953 * server.h: Move some code to ...
4954 * gdbthread.h: ... here. New.
4955 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4956 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4957 (nto-low.o, win32-low.o): Likewise.
4958 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4959 * regcache.c, remote-utils.c, server.c: Likewise.
4960 * target.c, tracepoint.c, win32-low.c: Likewise.
4961
4962 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4963
4964 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4965 (PTRACE_ARG4_TYPE): Likewise.
4966 (PTRACE_XFER_TYPE): Likewise.
4967 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4968 ptrace to PTRACE_ARG3_TYPE.
4969 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4970 (PTRACE_ARG4_TYPE): Likewise.
4971 (PTRACE_XFER_TYPE): Likewise.
4972 (linux_detach_one_lwp): Cast fourth argument of
4973 ptrace to long then PTRACE_ARG4_TYPE.
4974 (regsets_fetch_inferior_registers): Cast third argument of
4975 ptrace to long then PTRACE_ARG3_TYPE.
4976 (regsets_store_inferior_registers): Likewise.
4977
4978 2012-04-20 Pedro Alves <palves@redhat.com>
4979
4980 * configure: Regenerate.
4981
4982 2012-04-19 Pedro Alves <palves@redhat.com>
4983
4984 * Makefile.in (GNULIB_BUILDDIR): New.
4985 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4986 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4987 (all, install-only, uninstall, clean-info, all-lib, clean): No
4988 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4989 (maintainer-clean realclean distclean): Use subdir_do.
4990 (subdir_do): New.
4991 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4992 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4993 * acinclude.m4: Include acx_configure_dir.m4.
4994 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4995 calls. Call AC_PROG_RANLIB. Configure gnulib using
4996 ACX_CONFIGURE_DIR.
4997 (GNULIB): New.
4998 (GNULIB_STDINT_H): Adjust.
4999 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5000 * gdbreplay.c: Include build-gnulib/config.h.
5001 * server.h: Likewise.
5002 * aclocal.m4: Regenerate.
5003 * config.in: Regenerate.
5004 * configure: Regenerate.
5005
5006 2012-04-19 Pedro Alves <palves@redhat.com>
5007
5008 * Makefile.in (LIBGNU, INCGNU): Adjust.
5009 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5010 (all, install-only, uninstall, clean-info, all-lib, clean)
5011 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5012 * configure.ac: Adjust AC_OUTPUT output.
5013 * aclocal.m4: Regenerate.
5014 * configure: Regenerate.
5015
5016 2012-04-19 Pedro Alves <palves@redhat.com>
5017
5018 * Makefile.in (generated_files): New.
5019 (server_h): Remove the explicit dependency on config.h, and depend
5020 on $generated_files.
5021
5022 2012-04-19 Pedro Alves <palves@redhat.com>
5023
5024 * Makefile.in (INCGNU): Add -Ignulib.
5025
5026 2012-04-19 Pedro Alves <palves@redhat.com>
5027
5028 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5029 (INCGNU): ... this, and spell out -I here.
5030 (GNULIB_LIB): Rename to ...
5031 (LIBGNU): ... this.
5032 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5033
5034 2012-04-19 Pedro Alves <palves@redhat.com>
5035
5036 * config.in: Regenerate.
5037
5038 2012-04-19 Pedro Alves <palves@redhat.com>
5039
5040 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5041 * server.h (memmem): Remove declaration.
5042 * config.in: Regenerate.
5043 * configure: Regenerate.
5044
5045 2012-04-19 Yao Qi <yao@codesourcery.com>
5046
5047 * Makefile.in (SFILES): Add common/vec.c.
5048 (OBS): Add vec.o.
5049 (vec.o): New rule.
5050
5051 2012-04-19 Yao Qi <yao@codesourcery.com>
5052
5053 * remote-utils.c (prepare_resume_reply): Replace with macro
5054 target_core_of_thread.
5055 * server.c (handle_qxfer_threads_proper): Likewise.
5056 * target.h (traget_core_of_thread): New macro.
5057
5058 2012-04-18 Pedro Alves <palves@redhat.com>
5059
5060 * aclocal.m4: Regenerate.
5061 * configure: Regenerate.
5062
5063 2012-04-16 Yao Qi <yao@codesourcery.com>
5064
5065 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5066 duplicated on address.
5067
5068 2012-04-16 Yao Qi <yao@codesourcery.com>
5069
5070 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5071 (struct tracepoint_action_ops) <send>: New field.
5072 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5073 (agent_expr_send, x_tracepoint_action_send): New.
5074 (l_tracepoint_action_send): New.
5075 (cmd_qtdp): Download and install tracepoint
5076 according to `use_agent'.
5077 (run_inferior_command): Add one more parameter `len'.
5078 Update callers.
5079 (tracepoint_send_agent): New.
5080 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5081
5082 2012-04-16 Yao Qi <yao@codesourcery.com>
5083
5084 * tracepoint.c (download_tracepoints): Moved to ...
5085 (cmd_qtstart): ... here.
5086
5087 2012-04-14 Yao Qi <yao@codesourcery.com>
5088
5089 * tracepoint.c: Include inttypes.h.
5090 (struct collect_memory_action): Use sized types.
5091 (struct tracepoint): Likewise.
5092 (cmd_qtdp, stop_tracing): Update print specifiers.
5093 (cmd_qtp, response_tracepoint): Likewise.
5094 (collect_data_at_tracepoint): Likewise.
5095 (collect_data_at_step): Likewise.
5096
5097 2012-04-14 Yao Qi <yao@codesourcery.com>
5098
5099 Import gnulib module inttypes.
5100 * aclocal.m4, config.in, configure: Regenerated.
5101
5102 2012-04-14 Yao Qi <yao@codesourcery.com>
5103
5104 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5105 Makefile and config.status at last.
5106
5107 2012-04-13 Yao Qi <yao@codesourcery.com>
5108
5109 * tracepoint.c: Include stdint.h unconditionally.
5110
5111 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5112
5113 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5114 on BFD_HAVE_SYS_PROCFS_TYPE.
5115 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5116 * configure: Regenerate.
5117 * config.in: Likewise.
5118
5119 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5120
5121 * Makefile.in (clean): Also remove x32.c x32-linux.c
5122 x32-avx.c x32-avx-linux.c.
5123 (x32.o): New target.
5124 (x32.c): Likewise.
5125 (x32-linux.o): Likewise.
5126 (x32-linux.c): Likewise.
5127 (x32-avx.o): Likewise.
5128 (x32-avx.c): Likewise.
5129 (x32-avx-linux.o): Likewise.
5130 (x32-avx-linux.c): Likewise.
5131
5132 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5133 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5134 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5135 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5136 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5137 i386/x32-avx-linux.xml.
5138
5139 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5140 (init_registers_x32_avx_linux): Likwise.
5141 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5142 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5143
5144 2012-04-13 Pedro Alves <palves@redhat.com>
5145
5146 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5147 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5148 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5149 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5150 the sub-make.
5151
5152 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5153
5154 * linux-x86-low.c (compat_x32_clock_t): New.
5155 (compat_x32_siginfo_t): Likewise.
5156 (compat_x32_siginfo_from_siginfo): Likewise.
5157 (siginfo_from_compat_x32_siginfo): Likewise.
5158 (linux_is_elf64): Likewise.
5159 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5160 and siginfo_from_compat_x32_siginfo for x32.
5161 (x86_arch_setup): Set linux_is_elf64.
5162
5163 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5164
5165 PR gdb/13969
5166 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5167 e_machine field.
5168 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5169 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5170 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5171 compatible with process.
5172
5173 2012-04-12 Yao Qi <yao@codesourcery.com>
5174
5175 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5176 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5177 (install-only, install-info, clean): Handle sub dir gnulib.
5178 (all-lib, am--refresh): New targets.
5179 (memmem.o): Remove target.
5180 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5181 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5182 (AC_REPLACE_FUNCS): Remove memmem.
5183 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5184 (AC_OUTPUT): Generate Makefile in gnulib/.
5185 * aclocal.m4, config.in, configure: Regenerated.
5186
5187 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5188
5189 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5190
5191 2012-04-05 Pedro Alves <palves@redhat.com>
5192
5193 -Werror=strict-aliasing
5194
5195 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5196 pointer.
5197
5198 2012-04-04 Pedro Alves <palves@redhat.com>
5199
5200 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5201 (sparc_store_gregset_from_stack, sparc_store_gregset)
5202 (sparc_breakpoint_at): Fix formatting.
5203
5204 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5205
5206 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5207 are available.
5208 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5209 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5210 * config.in: Regenerate.
5211 * configure: Likewise.
5212
5213 2012-03-29 Pedro Alves <palves@redhat.com>
5214
5215 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5216 Correct ptrace arguments.
5217
5218 2012-03-28 Pedro Alves <palves@redhat.com>
5219
5220 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5221 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5222 (IA64_FR1_REGNUM): New defines.
5223 (ia64_fetch_register): New.
5224 (the_low_target): Install it.
5225 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5226 field.
5227 * linux-low.c (linux_fetch_registers): Try the
5228 the_low_target.fetch_register hook first.
5229
5230 * linux-arm-low.c (the_low_target): Adjust.
5231 * linux-bfin-low.c (the_low_target): Adjust.
5232 * linux-cris-low.c (the_low_target): Adjust.
5233 * linux-crisv32-low.c (the_low_target): Adjust.
5234 * linux-m32r-low.c (the_low_target): Adjust.
5235 * linux-m68k-low.c (the_low_target): Adjust.
5236 * linux-mips-low.c (the_low_target): Adjust.
5237 * linux-ppc-low.c (the_low_target): Adjust.
5238 * linux-s390-low.c (the_low_target): Adjust.
5239 * linux-sh-low.c (the_low_target): Adjust.
5240 * linux-sparc-low.c (the_low_target): Adjust.
5241 * linux-tic6x-low.c (the_low_target): Adjust.
5242 * linux-x86-low.c (the_low_target): Adjust.
5243 * linux-xtensa-low.c (the_low_target): Adjust.
5244
5245 2012-03-26 Pedro Alves <palves@redhat.com>
5246
5247 * server.c (handle_qxfer_libraries): Don't bail early if
5248 the_target->qxfer_libraries_svr4 is not NULL.
5249
5250 2012-03-26 Pedro Alves <palves@redhat.com>
5251
5252 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5253
5254 2012-03-23 Pedro Alves <palves@redhat.com>
5255
5256 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5257 "library-list-svr4" element's start tag when the the DSO list is
5258 empty.
5259
5260 2012-03-23 Pedro Alves <palves@redhat.com>
5261
5262 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5263 a variable whose type size is the same as the inferior's pointer
5264 size.
5265
5266 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5267
5268 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5269 struct siginfo.
5270 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5271 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5272 * linux-low.h: Include <signal.h>.
5273 (struct siginfo): Remove forward declaration.
5274 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5275 struct siginfo.
5276
5277 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5278
5279 * .gitignore: Ignore more files.
5280
5281 2012-03-19 Pedro Alves <palves@redhat.com>
5282 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 * server.c (cont_thread, general_thread): Add describing comments.
5285 (start_inferior): Clear `cont_thread'.
5286 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5287 of a process.
5288
5289 2012-03-15 Yao Qi <yao@codesourcery.com>
5290
5291 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5292 handling to ...
5293 (cmd_qtdp): ... here.
5294
5295 2012-03-15 Yao Qi <yao@codesourcery.com>
5296
5297 * tracepoint.c (struct tracepoint_action_ops): New.
5298 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5299 (m_tracepoint_action_download): New.
5300 (r_tracepoint_action_download): New.
5301 (x_tracepoint_action_download): New.
5302 (l_tracepoint_action_download): New.
5303 (add_tracepoint_action): Install `action->ops' according type.
5304 (download_tracepoint_1): Move code `download' function pointer
5305 of various tracepoint_action_ops.
5306
5307 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5308
5309 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5310 linux_ptrace_attach_warnings.
5311
5312 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5313
5314 * Makefile.in (linux-ptrace.o): New.
5315 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5316 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5317 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5318 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5319 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5320 of these targets.
5321 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5322
5323 2012-03-08 Yao Qi <yao@codesourcery.com>
5324 Pedro Alves <palves@redhat.com>
5325
5326 Fix PR server/13392.
5327 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5328 offset of JMP insn.
5329 * tracepoint.c (remove_tracepoint): New.
5330 (cmd_qtdp): Call remove_tracepoint when failed to install.
5331
5332 2012-03-07 Pedro Alves <palves@redhat.com>
5333
5334 * linux-low.c (get_detach_signal): New.
5335 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5336 Pass on pending signals to PTRACE_DETACH. Check the result of the
5337 ptrace call.
5338 * server.c (program_signals, program_signals_p): New.
5339 (handle_general_set): Handle QProgramSignals.
5340 * server.h (program_signals, program_signals_p): Declare.
5341
5342 2012-03-05 Pedro Alves <palves@redhat.com>
5343 Jan Kratochvil <jan.kratochvil@redhat.com>
5344
5345 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5346 New comment why.
5347
5348 2012-03-03 Yao Qi <yao@codesourcery.com>
5349
5350 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5351 agent_look_up_symbols.
5352
5353 2012-03-03 Yao Qi <yao@codesourcery.com>
5354
5355 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5356 (linux-x86-low.o): Likewise.
5357 * server.h: Remove in_process_agent_loaded.
5358 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5359 common/agent.c.
5360 Update callers.
5361
5362 2012-03-03 Yao Qi <yao@codesourcery.com>
5363
5364 * tracepoint.c (gdb_agent_capability): New global.
5365 (in_process_agent_loaded_ust): Renamed to
5366 `in_process_agent_supports_ust'.
5367 Update callers.
5368 (in_process_agent_supports_ust): Call agent_capability_check.
5369 (clear_installed_tracepoints): Assert that agent supports
5370 agent.
5371
5372 2012-03-03 Yao Qi <yao@codesourcery.com>
5373
5374 * linux-low.c (linux_supports_agent): New.
5375 (linux_target_ops): Initialize field `supports_agent' with
5376 linux_supports_agent.
5377 * target.h (struct target_ops) <supports_agent>: New.
5378 (target_supports_agent): New macro.
5379 * server.c (handle_general_set): Handle packet 'QAgent'.
5380 (handle_query): Send `QAgent+'.
5381 * Makefile.in (server.o): Depends on agent.h.
5382
5383 2012-03-03 Yao Qi <yao@codesourcery.com>
5384
5385 * Makefile.in (OBS): Add agent.o.
5386 Add new rule for agent.o.
5387 Track dependence of tracepoint.c on agent.h.
5388 * tracepoint.c (run_inferior_command_1):
5389 (run_inferior_command): Call agent_run_command.
5390 (gdb_ust_connect_sync_socket): Deleted. Move it to
5391 common/agent.c.
5392 (resume_thread, stop_thread): Likewise.
5393 (gdb_ust_socket_init): Renamed to ...
5394 (gdb_agent_socket_init): ... New.
5395 (gdb_ust_thread): Renamed to ...
5396 (gdb_agent_helper_thread): ... New.
5397 (gdb_ust_init): Move some code to ...
5398 (gdb_agent_init): ... here. New.
5399 [HAVE_UST]: Call gdb_ust_init.
5400 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5401 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5402 * config.in, configure: Regenerated.
5403
5404 2012-03-02 Pedro Alves <palves@redhat.com>
5405
5406 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5407 * linux-low.c (struct simple_pid_list): New.
5408 (stopped_pids): New a struct simple_pid_list pointer.
5409 (add_to_pid_list, pull_pid_from_list): New.
5410 (handle_extended_wait): Don't assume the first signal new children
5411 report is SIGSTOP. Adjust call to pull_pid_from_list.
5412 (linux_wait_for_lwp): Adjust.
5413
5414 2012-03-02 Yao Qi <yao@codesourcery.com>
5415
5416 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5417 debug log.
5418
5419 2012-03-02 Yao Qi <yao@codesourcery.com>
5420
5421 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5422 `stop_pc' and `tpoint'. Update caller.
5423
5424 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5425
5426 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5427 * linux-low.c (use_linux_regsets): New macro.
5428 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5429 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5430 (linux_register_in_regsets): New function.
5431 (usr_fetch_inferior_registers): Skip registers covered by
5432 regsets.
5433 (usr_store_inferior_registers): Likewise.
5434 (usr_fetch_inferior_registers): New macro.
5435 (usr_store_inferior_registers): Likewise.
5436 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5437 (linux_store_registers): Likewise.
5438 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5439 prototype.
5440 (init_registers_mips64_dsp_linux): Likewise.
5441 (init_registers_mips_linux): New macro.
5442 (init_registers_mips_dsp_linux): Likewise.
5443 (mips_dsp_num_regs): Likewise.
5444 (DSP_BASE, DSP_CONTROL): New fallback macros.
5445 (mips_base_regs): New macro.
5446 (mips_regmap): Use it. Fix the size.
5447 (mips_dsp_regmap): New variable.
5448 (mips_dsp_regset_bitmap): Likewise.
5449 (mips_arch_setup): New function.
5450 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5451 than mips_regmap.
5452 (mips_cannot_store_register): Likewise.
5453 (the_low_target): Update .arch_setup, .num_regs and .regmap
5454 initializers. Add .regset_bitmap initializer.
5455 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5456 initializer.
5457 * linux-bfin-low.c (the_low_target): Likewise.
5458 * linux-cris-low.c (the_low_target): Likewise.
5459 * linux-crisv32-low.c (the_low_target): Likewise.
5460 * linux-ia64-low.c (the_low_target): Likewise.
5461 * linux-m32r-low.c (the_low_target): Likewise.
5462 * linux-m68k-low.c (the_low_target): Likewise.
5463 * linux-ppc-low.c (the_low_target): Likewise.
5464 * linux-s390-low.c (the_low_target): Likewise.
5465 * linux-sh-low.c (the_low_target): Likewise.
5466 * linux-sparc-low.c (the_low_target): Likewise.
5467 * linux-tic6x-low.c (the_low_target): Likewise.
5468 * linux-x86-low.c (the_low_target): Likewise.
5469 * linux-xtensa-low.c (the_low_target): Likewise.
5470 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5471 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5472 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5473 srv_xmlfiles.
5474 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5475 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5476
5477 2012-02-29 Yao Qi <yao@codesourcery.com>
5478 Pedro Alves <palves@redhat.com>
5479
5480 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5481 `step_over_finished' is true.
5482
5483 2012-02-27 Pedro Alves <palves@redhat.com>
5484
5485 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5486 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5487
5488 2012-02-27 Pedro Alves <palves@redhat.com>
5489
5490 PR server/9684
5491 * linux-low.c (pid_is_stopped): New.
5492 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5493
5494 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5495
5496 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5497 of conditions.
5498
5499 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5500
5501 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5502
5503 2012-02-24 Luis Machado <lgustavo@codesourcery>
5504
5505 * server.c (handle_query): Advertise support for target-side
5506 breakpoint condition evaluation.
5507 (process_point_options): New function.
5508 (process_serial_event): When inserting a breakpoint, check for
5509 a target-side condition that should be evaluated.
5510
5511 * mem-break.c: Include regcache.h and ax.h.
5512 (point_cond_list_t): New data structure.
5513 (breakpoint) <cond_list>: New field.
5514 (find_gdb_breakpoint_at): Make non-static.
5515 (delete_gdb_breakpoint_at): Clear any target-side
5516 conditions.
5517 (clear_gdb_breakpoint_conditions): New function.
5518 (add_condition_to_breakpoint): Likewise.
5519 (add_breakpoint_condition): Likewise.
5520 (gdb_condition_true_at_breakpoint): Likewise.
5521 (gdb_breakpoint_here): Return result directly instead
5522 of going through a local variable.
5523
5524 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5525 (clear_gdb_breakpoint_conditions): Likewise.
5526 (add_breakpoint_condition): Likewise.
5527 (gdb_condition_true_at_breakpoint): Likewise.
5528
5529 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5530 (need_step_over_p): Take target-side breakpoint condition into
5531 consideration.
5532
5533 2012-02-24 Luis Machado <lgustavo@codesourcery>
5534
5535 * server.h: Include tracepoint.h.
5536 (agent_mem_read, agent_get_trace_state_variable_value,
5537 agent_set_trace_state_variable_value,
5538 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5539 get_set_tsv_func_addr): New prototypes.
5540
5541 * ax.h: New include file.
5542 * ax.c: New source file.
5543
5544 * tracepoint.c: Include ax.h.
5545 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5546 agent_expr, eval_result_type): Move to ax.h.
5547 (parse_agent_expr): Rename to ...
5548 (gdb_parse_agent_expr): ... this, make it non-static and move
5549 to ax.h.
5550 (unparse_agent_expr) Rename to ...
5551 (gdb_unparse_agent_expr): ... this, make it non-static and move
5552 to ax.h.
5553 (eval_agent_expr): Rename to ...
5554 (eval_tracepoint_agent_expr): ... this.
5555 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5556 forward declarations.
5557 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5558 (agent_get_trace_state_variable_value): New function.
5559 (agent_set_trace_state_variable_value): New function.
5560 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5561 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5562 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5563 (condition_true_at_tracepoint): Likewise.
5564 (parse_agent_expr): Rename to ...
5565 (gdb_parse_agent_expr): ... this and move to ax.c.
5566 (unparse_agent_expr): Rename to ...
5567 (gdb_unparse_agent_expr): ... this and move to ax.c.
5568 (gdb_agent_op_name): Move to ax.c.
5569 (eval_agent_expr): Rename to ...
5570 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5571 and move to ax.c.
5572 (eval_tracepoint_agent_expr): New function.
5573 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5574 non-static.
5575 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5576 ax.c.
5577 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5578 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5579 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5580 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5581 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5582 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5583 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5584 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5585 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5586 (compile_bytecodes): Remove forward declaration.
5587 (is_goto_target): Move to ax.c.
5588 (compile_bytecodes): Move to ax.c and call
5589 agent_get_trace_state_variable_value (...) and
5590 agent_set_trace_state_variable_value (...).
5591
5592 * Makefile.in: Update ax.c and IPA dependencies.
5593
5594 2012-02-24 Pedro Alves <palves@redhat.com>
5595
5596 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5597 (cmd_bigqtbuffer_circular): ... this. Only handle
5598 'QTBuffer:circular:'.
5599 (handle_tracepoint_general_set): Adjust.
5600
5601 2012-02-16 Yao Qi <yao@codesourcery.com>
5602
5603 * inferiors.c: Move code to ...
5604 * dll.c: .... here. New.
5605 * server.h: Declare clear_dlls.
5606 * Makefile.in (SFILES): Add dll.c.
5607 (OBS): Add dll.o
5608 (dll.o): New rule.
5609
5610 2012-02-11 Yao Qi <yao@codesourcery.com>
5611
5612 * server.c: (handle_monitor_command): Add a new parameter
5613 `own_buf'.
5614 (handle_query): Update caller.
5615
5616 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5617
5618 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5619 * configure, config.in: Regenerate.
5620 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5621 is not defined.
5622
5623 2012-02-02 Pedro Alves <palves@redhat.com>
5624
5625 Try SIGKILL first, then PTRACE_KILL.
5626 * linux-low.c (linux_kill_one_lwp): New.
5627 (linux_kill_one_lwp): Rename to ...
5628 (kill_one_lwp_callback): ... this. Use the new
5629 linux_kill_one_lwp.
5630
5631 2012-02-02 Pedro Alves <palves@redhat.com>
5632
5633 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5634 inferior.
5635
5636 2012-01-27 Pedro Alves <palves@redhat.com>
5637
5638 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5639 (elf_64_file_p): Make static.
5640 (linux_pid_exe_is_elf_64_file): New.
5641 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5642 Delete declarations.
5643 (linux_pid_exe_is_elf_64_file): Declare.
5644 * linux-x86-low.c (x86_arch_setup): Use
5645 linux_pid_exe_is_elf_64_file.
5646
5647 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5648
5649 * linux-low.c (linux_wait_for_event_1): Rename to ...
5650 (linux_wait_for_event): ... here and merge it with former
5651 linux_wait_for_event - new variable wait_ptid, use it.
5652 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5653
5654 2012-01-23 Pedro Alves <palves@redhat.com>
5655
5656 * server.c (main): Avoid yet another case of infinite loop while
5657 detaching/killing after a longjmp.
5658
5659 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5660
5661 Code cleanup.
5662 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5663
5664 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5665
5666 * hostio.c (handle_readlink): New function.
5667 (handle_vFile): Call it to handle "vFile:readlink" packets.
5668
5669 2012-01-20 Pedro Alves <palves@redhat.com>
5670 Ulrich Weigand <ulrich.weigand@linaro.org>
5671
5672 * server.c (handle_v_requests): Only support vAttach and vRun to
5673 start multiple processes when in extended protocol mode.
5674
5675 2012-01-17 Pedro Alves <palves@redhat.com>
5676
5677 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5678 memalign plus mprotect to allocate the scratch buffer.
5679
5680 2012-01-13 Pedro Alves <palves@redhat.com>
5681
5682 * server.c (attach_inferior): Clear `cont_thread'.
5683
5684 2012-01-13 Pedro Alves <palves@redhat.com>
5685
5686 * server.c (main): Avoid infinite loop while detaching/killing
5687 after a longjmp.
5688
5689 2012-01-09 Doug Evans <dje@google.com>
5690
5691 * server.c (start_inferior): Set last_ptid in --wrapper case.
5692
5693 2012-01-06 Yao Qi <yao@codesourcery.com>
5694
5695 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5696 defined.
5697 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5698
5699 2012-01-04 Yao Qi <yao@codesourcery.com>
5700
5701 * tracepoint.c (cmd_qtdp): Print debug message
5702 for static tracepoint.
5703
5704 2012-01-04 Yao Qi <yao@codesourcery.com>
5705
5706 * tracepoint.c (trace_vdebug): Differentiate debug message
5707 between gdbserver and IPA.
5708
5709 2012-01-03 Yao Qi <yao@codesourcery.com>
5710
5711 * tracepoint.c (tracepoint_was_hit): Don't collect for
5712 static tracepoint.
5713
5714 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5715
5716 * terminal.h: Reformat copyright header.
5717
5718 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5719
5720 * server.c (gdbserver_version): Update copyright year.
5721 * gdbreplay.c (gdbreplay_version): Likewise.
5722
5723 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5724
5725 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5726
5727 Revert:
5728 2011-12-18 Hui Zhu <teawater@gmail.com>
5729 * linux-low.c (linux_create_inferior): Save return value to ret.
5730
5731 2011-12-18 Hui Zhu <teawater@gmail.com>
5732
5733 * linux-low.c (linux_create_inferior): Save return value to ret.
5734
5735 2011-12-16 Doug Evans <dje@google.com>
5736
5737 * linux-low.c (linux_create_inferior): If stdio connection,
5738 redirect stdin from /dev/null, stdout to stderr.
5739 * remote-utils.c (remote_is_stdio): New static global.
5740 (remote_connection_is_stdio): New function.
5741 (remote_prepare): Handle stdio connection.
5742 (remote_open): Ditto.
5743 (remote_close): Don't close stdin for stdio connections.
5744 (read_prim,write_prim): New functions. Replace all calls to
5745 read/write to these.
5746 * server.c (main): Watch for "-" argument. Move call to
5747 remote_prepare before start_inferior.
5748 * server.h (STDIO_CONNECTION_NAME): New macro.
5749 (remote_connection_is_stdio): Declare.
5750
5751 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5752 in debugging output.
5753
5754 2011-12-15 Yao Qi <yao@codesourcery.com>
5755
5756 * tracepoint.c: Include sys/syscall.h.
5757 (gdb_ust_thread): Remove preprocessor conditional.
5758
5759 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5760
5761 * linux-low.c (linux_detach_one_lwp): Call
5762 the_low_target.prepare_to_resume before detaching.
5763
5764 2011-12-14 Yao Qi <yao@codesourcery.com>
5765
5766 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5767 of write.
5768
5769 2011-12-14 Yao Qi <yao@codesourcery.com>
5770
5771 * i386-low.c (i386_low_stopped_data_address): Initialize local
5772 variable `control'.
5773
5774 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5775
5776 PR remote/13492
5777
5778 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5779 DR_CONTROL unless necessary. Extend comments.
5780 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5781 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5782
5783 2011-12-13 Yao Qi <yao@codesourcery.com>
5784
5785 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5786 macros.
5787 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5788
5789 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5790
5791 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5792 Print new debug message for such case.
5793
5794 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5795
5796 Fix overlapping memcpy.
5797 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5798 the read_inferior_memory transfer.
5799 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5800 write_inferior_memory transfer.
5801 (set_fast_tracepoint_jump): New variable buf. Use it for the
5802 read_inferior_memory and write_inferior_memory transfers.
5803 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5804 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5805 Use it for the write_inferior_memory transfer.
5806 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5807 buffers.
5808
5809 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5810
5811 * linux-low.c (fetch_register, store_register): Make code
5812 consistent, fix formatting.
5813
5814 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5815
5816 * linux-low.c (usr_store_inferior_registers): Factor out code
5817 to handle individual registers into...
5818 (store_register): ... this new function.
5819
5820 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5821
5822 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5823 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5824 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5825 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5826 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5827 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5828 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5829 (srv_xmlfiles): Add new XML files.
5830
5831 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5832 and <sys/uio.h>.
5833 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5834 (init_registers_s390_linux32v1): Add prototype.
5835 (init_registers_s390_linux32v2): Likewise.
5836 (init_registers_s390_linux64v1): Likewise.
5837 (init_registers_s390_linux64v2): Likewise.
5838 (init_registers_s390x_linux64v1): Likewise.
5839 (init_registers_s390x_linux64v2): Likewise.
5840 (s390_num_regs): Increment to 52.
5841 (s390_regmap): Add orig_r2 register.
5842 (s390_num_regs_3264): Increment to 68.
5843 (s390_regmap_3264): Add orig_r2 register.
5844 (s390_collect_ptrace_register): Handle orig_r2 register.
5845 (s390_supply_ptrace_register): Likewise.
5846 (s390_fill_last_break): New function.
5847 (s390_store_last_break): Likewise.
5848 (s390_fill_system_call): New function.
5849 (s390_store_system_call): Likewise.
5850 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5851 register sets.
5852 (s390_check_regset): New function.
5853 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5854 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5855 Update target_regsets for available register sets.
5856
5857 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5858 Jan Kratochvil <jan.kratochvil@redhat.com>
5859
5860 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5861 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5862 New.
5863 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5864 * linux-low.h (struct process_info_private): New member r_debug.
5865 * server.c (handle_qxfer_libraries): Call
5866 the_target->qxfer_libraries_svr4.
5867 (handle_qxfer_libraries_svr4): New function.
5868 (qxfer_packets): New entry "libraries-svr4".
5869 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5870 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5871 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5872 PACKET_qXfer_libraries_svr4.
5873
5874 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5875
5876 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5877 PSW address/mask between 8-byte and 16-byte formats.
5878 (s390_supply_ptrace_register): Likewise.
5879 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5880 basic addressing mode bit.
5881
5882 2011-11-24 Stan Shebs <stan@codesourcery.com>
5883
5884 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5885
5886 2011-11-17 Stan Shebs <stan@codesourcery.com>
5887
5888 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5889 (tracing_start_time): New global.
5890 (tracing_stop_time): New global.
5891 (tracing_user_name): New global.
5892 (tracing_notes): New global.
5893 (tracing_stop_note): New global.
5894 (cmd_qtstart): Set traceframe_usage, start_time.
5895 (stop_tracing): Set stop_time.
5896 (cmd_qtstatus): Report additional status.
5897 (cmd_qtp): New function.
5898 (handle_tracepoint_query): Call it.
5899 (cmd_qtnotes): New function.
5900 (handle_tracepoint_general_set): Call it.
5901 (get_timestamp): Rename from tsv_get_timestamp.
5902
5903 2011-11-14 Stan Shebs <stan@codesourcery.com>
5904 Kwok Cheung Yeung <kcy@codesourcery.com>
5905
5906 * linux-x86-low.c (small_jump_insn): New.
5907 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5908 trampoline and error message, build a trampoline and issue a small
5909 jump instruction to it.
5910 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5911 trampoline and error message.
5912 (x86_get_min_fast_tracepoint_insn_len): New.
5913 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5914 * linux-low.h (struct linux_target_ops): Add arguments to
5915 install_fast_tracepoint_jump_pad operation, add new operation.
5916 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5917 arguments.
5918 (linux_get_min_fast_tracepoint_insn_len): New function.
5919 (linux_target_op): Add new operation.
5920 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5921 (gdb_trampoline_buffer_end): Ditto.
5922 (gdb_trampoline_buffer_error): Ditto.
5923 (struct ipa_sym_addresses): Add fields for new IPA variables.
5924 (symbol_list): Add entries for new IPA variables.
5925 (struct tracepoint): Add fields to hold the address range of the
5926 trampoline used by the tracepoint.
5927 (trampoline_buffer_head): New static variable.
5928 (trampoline_buffer_tail): Ditto.
5929 (claim_trampoline_space): New function.
5930 (have_fast_tracepoint_trampoline_buffer): New function.
5931 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5932 structure.
5933 (install_fast_tracepoint): Ditto, also add error buffer argument.
5934 (cmd_qtminftpilen): New function.
5935 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5936 (fast_tracepoint_from_trampoline_address): New function.
5937 (fast_tracepoint_collecting): Handle trampoline as part of jump
5938 pad space.
5939 (set_trampoline_buffer_space): New function.
5940 (initialize_tracepoint): Initialize new IPA variables.
5941 * target.h (struct target_ops): Add arguments to
5942 install_fast_tracepoint_jump_pad operation, add new
5943 get_min_fast_tracepoint_insn_len operation.
5944 (target_get_min_fast_tracepoint_insn_len): New.
5945 (install_fast_tracepoint_jump_pad): Add arguments.
5946 * server.h (IPA_BUFSIZ): Define.
5947 * linux-i386-ipa.c: Include extra header files.
5948 (initialize_fast_tracepoint_trampoline_buffer): New function.
5949 (initialize_low_tracepoint): Call it.
5950 * server.h (set_trampoline_buffer_space): Declare.
5951 (claim_trampoline_space): Ditto.
5952 (have_fast_tracepoint_trampoline_buffer): Ditto.
5953
5954 2011-11-14 Yao Qi <yao@codesourcery.com>
5955
5956 * server.c (handle_query): Handle InstallInTrace for qSupported.
5957 * tracepoint.c (add_tracepoint): Sort list.
5958 (install_tracepoint, download_tracepoint): New.
5959 (cmd_qtdp): Call them to install and download tracepoints.
5960 (sort_tracepoints): Removed.
5961 (cmd_qtstart): Update.
5962
5963 2011-11-14 Yao Qi <yao@codesourcery.com>
5964
5965 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5966 * mem-break.h: Declare.
5967 * tracepoint.c (cmd_qtstart): Move some code to ...
5968 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5969 New.
5970 (download_tracepoints): Move some code to ...
5971 (download_tracepoint_1): ... here. New.
5972
5973 2011-11-08 Yao Qi <yao@codesourcery.com>
5974
5975 * remote-utils.c (relocate_instruction): A comment fix.
5976
5977 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5978
5979 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5980 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5981 dr_status_mirror and dr_control_mirror from debug_reg_state.
5982 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5983 (i386_initial_stuff): Remove use of deleted globals.
5984 (i386_get_thread_context, i386_set_thread_context,
5985 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5986 from debug_reg_state.
5987
5988 2011-11-05 Yao Qi <yao@codesourcery.com>
5989
5990 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5991 address as TPOINT's.
5992
5993 2011-11-02 Stan Shebs <stan@codesourcery.com>
5994
5995 * tracepoint.c (agent_mem_read_string): New function.
5996 (eval_agent_expr): Call it for tracenz.
5997 * server.c (handle_query): Report support for tracenz.
5998
5999 2011-11-02 Yao Qi <yao@codesourcery.com>
6000
6001 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6002
6003 2011-11-02 Yao Qi <yao@codesourcery.com>
6004
6005 * target.h: Fix a typo in comment.
6006
6007 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6008
6009 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6010 clobber the breakpoints' shadows with fast tracepoint jumps.
6011 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6012 * target.c (write_inferior_memory): Also pass MYADDR down to
6013 check_mem_write.
6014
6015 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6016
6017 * configure.ac: Check support for personality routine.
6018 * configure: Regenerate.
6019 * config.in: Likewise.
6020 * linux-low.c: Include <sys/personality.h>.
6021 Define ADDR_NO_RANDOMIZE if necessary.
6022 (linux_create_inferior): Disable address space randomization when
6023 forking inferior, if requested.
6024 (linux_supports_disable_randomization): New function.
6025 (linux_target_ops): Install it.
6026 * server.h (disable_randomization): Declare.
6027 * server.c (disable_randomization): New global variable.
6028 (handle_general_set): Handle QDisableRandomization.
6029 (handle_query): Likewise for qSupported.
6030 (main): Support --disable-randomization and --no-disable-randomization
6031 command line arguments.
6032 * target.h (struct target_ops): Add supports_disable_randomization.
6033 (target_supports_disable_randomization): New macro.
6034
6035 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6036
6037 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6038 ifdef check.
6039 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6040 [!PT_GETDSBT] (target_loadmap): New definition.
6041 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6042 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6043 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6044 and PT_GETDSBT to LINUX_LOADMAP.
6045 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6046 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6047
6048 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6049
6050 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6051 (arm_linux_hwbp_cap): New static variable.
6052 (arm_linux_get_hwbp_cap): Replace by ...
6053 (arm_linux_init_hwbp_cap): ... this new function.
6054 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6055 (arm_linux_get_hw_watchpoint_count): Likewise.
6056 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6057 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6058 (arm_prepare_to_resume): Use perror_with_name instead of error.
6059
6060 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6061
6062 * linux-arm-low.c: Include <signal.h>.
6063 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6064 (struct arm_linux_hwbp_cap): New data type.
6065 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6066 (struct arm_linux_hw_breakpoint): New data type.
6067 (MAX_BPTS, MAX_WPTS): Define.
6068 (struct arch_process_info, struct arch_lwp_info): New data types.
6069 (arm_linux_get_hwbp_cap): New function.
6070 (arm_linux_get_hw_breakpoint_count): Likewise.
6071 (arm_linux_get_hw_watchpoint_count): Likewise.
6072 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6073 (arm_hwbp_control_initialize): Likewise.
6074 (arm_hwbp_control_is_enabled): Likewise.
6075 (arm_hwbp_control_is_initialized): Likewise.
6076 (arm_hwbp_control_disable): Likewise.
6077 (arm_linux_hw_breakpoint_equal): Likewise.
6078 (arm_linux_hw_point_initialize): Likewise.
6079 (struct update_registers_data): New data structure.
6080 (update_registers_callback: New function.
6081 (arm_insert_point): Likewise.
6082 (arm_remove_point): Likewise.
6083 (arm_stopped_by_watchpoint): Likewise.
6084 (arm_stopped_data_address): Likewise.
6085 (arm_new_process): Likewise.
6086 (arm_new_thread): Likewise.
6087 (arm_prepare_to_resume): Likewise.
6088 (the_low_target): Register arm_insert_point, arm_remove_point,
6089 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6090 arm_new_thread, and arm_prepare_to_resume.
6091
6092 2011-09-15 Stan Shebs <stan@codesourcery.com>
6093
6094 * server.h (struct emit_ops): Add compare-goto fields.
6095 * tracepoint.c (gdb_agent_op_sizes): New table.
6096 (emit_eq_goto): New function.
6097 (emit_ne_goto): New function.
6098 (emit_lt_goto): New function.
6099 (emit_le_goto): New function.
6100 (emit_gt_goto): New function.
6101 (emit_ge_goto): New function.
6102 (is_goto_target): New function.
6103 (compile_bytecodes): Recognize special cases of compare-goto
6104 combinations and call specialized emitters for them.
6105 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6106 (amd64_emit_ne_goto): New function.
6107 (amd64_emit_lt_goto): New function.
6108 (amd64_emit_le_goto): New function.
6109 (amd64_emit_gt_goto): New function.
6110 (amd64_emit_ge_goto): New function.
6111 (amd64_emit_ops): Add the new functions.
6112 (i386_emit_eq_goto): New function.
6113 (i386_emit_ne_goto): New function.
6114 (i386_emit_lt_goto): New function.
6115 (i386_emit_le_goto): New function.
6116 (i386_emit_gt_goto): New function.
6117 (i386_emit_ge_goto): New function.
6118 (i386_emit_ops): Add the new functions.
6119
6120 2011-09-08 Stan Shebs <stan@codesourcery.com>
6121
6122 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6123 (i386_emit_epilogue): Restore %ebx.
6124
6125 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6126
6127 * server.c (step_thread): Remove definition.
6128 (process_serial_event): Don't handle Hs.
6129 * server.h (step_thread): Remove declaration.
6130 * target.c (set_desired_inferior): Remove use of step_thread.
6131
6132 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6133
6134 * linux-low.c: Include linux-procfs.h.
6135 (linux_attach_lwp_1): Update comments.
6136 (linux_attach): Scan for existing threads when attaching to a
6137 process that is the tgid.
6138 * Makefile.in: Update dependencies.
6139
6140 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6141
6142 * configure.srv: Add linux-procfs.o dependencies.
6143
6144 2011-08-14 Yao Qi <yao@codesourcery.com>
6145
6146 * target.h (struct target_ops): Fix indent.
6147 * win32-low.c (win32_target_ops): Fix comment.
6148
6149 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6150 Yao Qi <yao@codesourcery.com>
6151
6152 * Makefile.in (clean): Remove tic6x-*.c files.
6153 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6154 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6155 (tic6x-c64xp-linux.c): Likewise.
6156 * configure.srv: Add support for tic6x-*-uclinux.
6157 * linux-tic6x-low.c: New.
6158 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6159
6160 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6161 Yao Qi <yao@codesourcery.com>
6162
6163 * target.h (struct target_ops): Add read_loadmap.
6164 * linux-low.c (struct target_loadseg): New type.
6165 (struct target_loadmap): New type.
6166 (linux_read_loadmap): New function.
6167 (linux_target_ops): Add linux_read_loadmap.
6168 * server.c (handle_query): Support qXfer:fdpic:read packet.
6169 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6170 to NULL.
6171
6172 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6173
6174 * win32-low.c: Include <stdint.h>.
6175
6176 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6177
6178 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6179 to the inferior here.
6180 (i386_remove_aligned_watchpoint): Ditto.
6181 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6182 fit part of the watchpoint in the debug registers.
6183 (i386_update_inferior_debug_regs): New.
6184 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6185 registers, and only update the inferior on success.
6186 (i386_low_remove_watchpoint): Ditto.
6187
6188 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6189
6190 * linux-low.c (compare_ints, unique, list_threads, show_process,
6191 linux_core_of_thread): Delete.
6192 (linux_target_ops): Change linux_core_of_thread to
6193 linux_common_core_of_thread.
6194 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6195 * utils.c (malloc_failure): Change type of argument.
6196 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6197 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6198 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6199 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6200 (IPA_OBJS): Add common-utils-ipa.o.
6201 (ptid_h, linux_osdata_h): New macros.
6202 (server_h): Add common/common-utils.h, common/xml-utils.h,
6203 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6204 common/ptid.h.
6205 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6206 ptid.o, buffer.o): New rules.
6207 (linux-low.o): Add common/linux-osdata.h as a dependency.
6208 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6209 * configure.ac: Add AC_HEADER_DIRENT check.
6210 * config.in: Regenerate.
6211 * configure: Regenerate.
6212 * remote-utils.c (xml_escape_text): Delete.
6213 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6214 buffer_xml_printf): Move to common/buffer.c.
6215 * server.c (main): Remove call to initialize_inferiors.
6216 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6217 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6218 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6219 internal_error, gdb_assert, gdb_assert_fail): Delete.
6220 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6221 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6222 common/buffer.h.
6223 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6224 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6225 initialize_inferiors): Delete.
6226
6227 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6228
6229 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6230 symbol error.
6231
6232 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6233
6234 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6235 assertion.
6236 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6237
6238 2011-05-26 Yao Qi <yao@codesourcery.com>
6239
6240 * Makefile.in (thread-db.o): Track dependence to
6241 common/gdb_thread_db.h.
6242 * thread-db.c: include gdb_thread_db.h from right place.
6243
6244 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6245
6246 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6247 __FILE__ and __LINE__ to internal_error.
6248
6249 2011-05-13 Doug Evans <dje@google.com>
6250
6251 * thread-db.c (try_thread_db_load_from_sdir): New function.
6252 (try_thread_db_load_from_dir): New function.
6253 (thread_db_load_search): Handle $sdir, ignore $pdir.
6254 Remove trying of system directories if search of
6255 libthread-db-search-path fails, that is now done via $sdir.
6256
6257 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6258
6259 * server.c (handle_query): Add EnableDisableTracepoints to the list
6260 of supported features.
6261 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6262 tracepoints.
6263 (cmd_qtenable_disable): New.
6264 (cmd_qtstart): Install tracepoints even if disabled.
6265 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6266 receiving a QTEnable or QTDisable packet.
6267 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6268 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6269 tracepoints.
6270 (gdb_probe): Skip data collection if static tracepoint is disabled.
6271
6272 2011-05-10 Doug Evans <dje@google.com>
6273
6274 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6275
6276 2011-05-04 Doug Evans <dje@google.com>
6277
6278 * linux-low.c (linux_join): Skip process lookup.
6279 * spu-low.c (spu_join): Ditto.
6280 * server.c (join_inferiors_callback): Delete.
6281 (process_serial_event): For 'D' packet (detach) call join_inferior
6282 directly.
6283
6284 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6285
6286 * README: Don't mention xscale*-*-linux*.
6287 * configure.srv (xscale*-*-linux*): Don't handle target.
6288
6289 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6290
6291 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6292 casting pointers.
6293 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6294 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6295 (i386_emit_void_call_2): Likewise.
6296
6297 2011-04-26 Yao Qi <yao@codesourcery.com>
6298
6299 * linux-low.c: Move common macros to linux-ptrace.h.
6300 Include linux-ptrace.h.
6301 * Makefile.in (linux_ptrace_h): New.
6302 (linux-low.o): Depends on linux-ptrace.h.
6303
6304 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6305
6306 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6307 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6308 (remote_prepare): New function with most of the TCP code from ...
6309 (remote_open): ... here. Detect PORT here unconditionally. Move also
6310 setting transport_is_reliable.
6311 * server.c (run_once): New variable.
6312 (gdbserver_usage): Document it.
6313 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6314 the first run if RUN_ONCE.
6315 * server.h (run_once, remote_prepare): New declarations.
6316
6317 2011-04-19 Tom Tromey <tromey@redhat.com>
6318
6319 * win32-low.c (handle_load_dll): Remove duplicate "the".
6320
6321 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6322
6323 Remove support for old Cygwin 1.5 versions.
6324 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6325 function to avoid warning.
6326 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6327 warning.
6328
6329 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6330
6331 * gdbserver/server.h (Macro _): Define it if not available.
6332
6333 2011-03-14 Michael Snyder <msnyder@vmware.com>
6334
6335 * hostio.c (handle_close): Remove unnecessary null test.
6336
6337 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6338
6339 * Makefile.in (maintainer-clean realclean distclean): Remove
6340 "make ... subdir_do" command.
6341
6342 2011-03-10 Michael Snyder <msnyder@vmware.com>
6343
6344 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6345
6346 * server.c (handle_v_run): Free alloced buffer on early return.
6347
6348 2011-03-09 Yao Qi <yao@codesourcery.com>
6349
6350 Revert:
6351 2011-03-04 Yao Qi <yao@codesourcery.com>
6352
6353 * Makefile.in: Remove GNU make feature --directory.
6354
6355 2011-03-05 Yao Qi <yao@codesourcery.com>
6356
6357 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6358 (subdir_do): New make target. Copied from gdb/Makefile.
6359 (maintainer-clean, realclean, distclean, clean): Call corresponding
6360 make targets in common/Makefile.
6361
6362 2011-02-11 Yao Qi <yao@codesourcery.com>
6363
6364 * configure.ac: Call AC_PROG_RANLIB.
6365 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6366 * configure: Regenerate.
6367
6368 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6369
6370 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6371
6372 2011-03-06 Yao Qi <yao@codesourcery.com>
6373
6374 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6375
6376 2011-03-05 Yao Qi <yao@codesourcery.com>
6377
6378 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6379 (subdir_do): New make target. Copied from gdb/Makefile.
6380 (maintainer-clean, realclean, distclean, clean): Call corresponding
6381 make targets in common/Makefile.
6382
6383 2011-03-04 Yao Qi <yao@codesourcery.com>
6384
6385 * Makefile.in: Remove GNU make feature --directory.
6386
6387 2011-03-04 Michael Snyder <msnyder@vmware.com>
6388
6389 * server.c (queue_stop_reply): Call xmalloc not malloc.
6390
6391 2011-03-02 Michael Snyder <msnyder@vmware.com>
6392
6393 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6394
6395 2011-02-28 Michael Snyder <msnyder@vmware.com>
6396
6397 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6398 (cmd_qtframe): Ditto.
6399 (cmd_qtbuffer): Ditto.
6400 (cmd_bigqtbuffer): Ditto.
6401
6402 * utils.c (decimal2str): Initialize 'width' to nine, then
6403 don't mess with it.
6404
6405 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6406
6407 * hostio.c (require_data): Free *data, not data.
6408
6409 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6410
6411 * hostio.c (require_data): Use free, not xfree.
6412
6413 2011-02-27 Michael Snyder <msnyder@vmware.com>
6414
6415 * server.c (handle_query): Discard unused value.
6416
6417 * hostio.c (require_data): Free malloc memory before returning
6418 error.
6419
6420 2011-02-26 Michael Snyder <msnyder@vmware.com>
6421
6422 * linux-low.c (list_threads): Call closedir for dirent.
6423
6424 2011-02-27 Michael Snyder <msnyder@vmware.com>
6425
6426 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6427 a case statement falls through.
6428
6429 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6430
6431 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6432 in comparison.
6433
6434 2011-02-26 Michael Snyder <msnyder@vmware.com>
6435
6436 * utils.c (decimal2str): Eliminate dead code and dead param.
6437 (pulongest): Drop dead param from call to decimal2str.
6438 (plongest): Ditto.
6439
6440 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6441
6442 Revert the following patch (not approved yet):
6443 2011-02-21 Hui Zhu <teawater@gmail.com>
6444 * tracepoint.c (tp_printf): New function.
6445 (eval_agent_expr): Handle gdb_agent_op_printf.
6446
6447 2011-02-21 Hui Zhu <teawater@gmail.com>
6448
6449 * tracepoint.c (tp_printf): New function.
6450 (eval_agent_expr): Handle gdb_agent_op_printf.
6451
6452 2011-02-18 Tom Tromey <tromey@redhat.com>
6453
6454 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6455 (tracepoint.o): Likewise.
6456 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6457 (gdb_agent_op_names): Likewise.
6458
6459 2011-02-18 Tom Tromey <tromey@redhat.com>
6460
6461 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6462 gdb_agent_op_rot>: New constants.
6463 (gdb_agent_op_names): Add pick and roll.
6464 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6465 cases.
6466
6467 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6468
6469 * aclocal.m4: Regenerated with aclocal-1.11.1.
6470
6471 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6472
6473 * server.c (handle_qxfer_traceframe_info): New.
6474 (qxfer_packets): Register "traceframe-info".
6475 (handle_query): Report support for qXfer:traceframe-info:read+.
6476 * tracepoint.c (match_blocktype): New.
6477 (traceframe_find_block_type): Rename to ...
6478 (traceframe_walk_blocks): ... this. Add callback filter argument,
6479 and use it.
6480 (traceframe_find_block_type): New, reimplemented on top of
6481 traceframe_walk_blocks.
6482 (build_traceframe_info_xml): New.
6483 (traceframe_read_info): New.
6484 * server.h (traceframe_read_info): Declare.
6485
6486 2011-02-11 Yao Qi <yao@codesourcery.com>
6487
6488 * configure.ac: Call AC_PROG_RANLIB.
6489 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6490 * configure: Regenerate.
6491
6492 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6493
6494 * server.c (gdb_read_memory): Change return semantics to allow
6495 partial transfers.
6496 (handle_search_memory_1): Adjust.
6497 (process_serial_event) <'m' packet>: Handle partial transfers.
6498 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6499
6500 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6501
6502 * regcache.c (init_register_cache): Initialize
6503 regcache->register_status.
6504 (free_register_cache): Release regcache->register_status.
6505 (regcache_cpy): Copy register_status.
6506 (registers_to_string): Print 'x's for unavailable registers.
6507 (supply_register): Mark the register's status valid or
6508 unavailable, depending on whether a buffer was passed in or not.
6509 (supply_register_zeroed): New.
6510 (supply_regblock): Mark the registers' status valid or
6511 unavailable, depending on whether a buffer was passed in or not.
6512 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6513 (struct regcache): New `register_status' field.
6514 (supply_register_zeroed): Declare.
6515 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6516 supply_register_zeroed, rather than passing a NULL buffer to
6517 supply_register.
6518 * tracepoint.c (fetch_traceframe_registers): Update comment.
6519
6520 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6521
6522 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6523 buffer explicit.
6524
6525 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6526
6527 * server.h (decode_xfer_write): Change prototype.
6528 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6529 and don't extract the annex here.
6530 * server.c (decode_xfer_read): Remove `annex' parameter,
6531 and don't extract the annex here.
6532 (decode_xfer): New.
6533 (struct qxfer): New.
6534 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6535 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6536 (handle_qxfer_statictrace): New functions, abstracted out from
6537 handle_query, and made to use the struct qxfer interface.
6538 (handle_threads_qxfer_proper): Rename to ...
6539 (handle_qxfer_threads_proper): ... this.
6540 (handle_threads_qxfer): Rename to ...
6541 (handle_qxfer_threads): ... this. Adjust.
6542 (qxfer_packets): New array.
6543 (handle_qxfer): New function.
6544 (handle_query): Use handle_qxfer.
6545
6546 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6547
6548 * gdbreplay.c: Shorten lines of >= 80 columns.
6549 * linux-low.c: Ditto.
6550 * linux-ppc-low.c: Ditto.
6551 * linux-s390-low.c: Ditto.
6552 * linux-sparc-low.c: Ditto.
6553 * linux-x86-low.c: Ditto.
6554 * linux-xtensa-low.c: Ditto.
6555 * mem-break.c: Ditto.
6556 * nto-low.c: Ditto.
6557 * regcache.h: Ditto.
6558 * remote-utils.c: Ditto.
6559 * server.c: Ditto.
6560 * server.h: Ditto.
6561 * thread-db.c: Ditto.
6562 * tracepoint.c: Ditto.
6563 * utils.c: Ditto.
6564 * win32-low.h: Ditto.
6565
6566 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6567
6568 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6569 update.
6570
6571 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6572
6573 * server.c (gdbserver_version): Update copyright year in version
6574 output.
6575 * gdbreplay.c (gdbreplay_version): Ditto.
6576
6577 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6578
6579 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6580 * linux-bfin-low.c: New file.
6581 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6582 PT_DATA_ADDR for BFIN targets.
6583 * Makefile.in (SFILES): Add linux-bfin-low.c.
6584 (clean): Remove reg-bfin.c.
6585 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6586 * README: Mention supported Blackfin targets.
6587
6588 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6589
6590 * .gitignore: New file.
6591
6592 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6593
6594 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6595
6596 2010-10-22 Jie Zhang <jie@codesourcery.com>
6597
6598 * Makefile.in: Add FLAGS_TO_PASS variable.
6599 (install): Remove dependency of install-only and recursively
6600 invoke make for install-only.
6601
6602 2010-10-04 Doug Evans <dje@google.com>
6603
6604 * Makefile.in (uninstall): Use $(DESTDIR).
6605
6606 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6607
6608 PR gdb/11842
6609
6610 * linux-x86-low.c (compat_siginfo_from_siginfo)
6611 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6612 si_code is < 0. Check for si_code == SI_TIMER before checking for
6613 si_code < 0.
6614
6615 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6616
6617 * lynx-i386-low.c: New file.
6618 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6619
6620 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6621
6622 * lynx-low.c (ptrace_request_to_str): Remove handling for
6623 request values that have been removed in LynxOS 5.x.
6624
6625 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6626
6627 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6628 <ptrace.h>
6629
6630 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6631
6632 * configure.ac: Add --enable-inprocess-agent option.
6633 * configure: Rebuilt.
6634
6635 2010-09-06 Yao Qi <yao@codesourcery.com>
6636
6637 * linux-low.c (linux_kill): Remove unused variable.
6638 (linux_stabilize_threads): Likewise.
6639 * server.c (start_inferior): Likewise.
6640 (queue_stop_reply_callback): Likewise.
6641 * tracepoint.c (do_action_at_tracepoint): Likewise.
6642
6643 2010-09-06 Yao Qi <yao@codesourcery.com>
6644
6645 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6646 on return.
6647
6648 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6649
6650 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6651
6652 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6653
6654 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6655 "$(IPA_DEPFILES)".
6656
6657 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6658
6659 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6660 gdbserver/lynx-ppc-low.c: New files.
6661 * Makefile.in (lynx_low_h): New variable.
6662 (lynx-low.o, lynx-ppc-low.o): New rules.
6663 * configure.ac: On LynxOS, link with -lnetinet.
6664 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6665 * configure: regenerate.
6666
6667 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6668
6669 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6670 * configure.ac: Add check for vasprintf and vsnprintf.
6671 * configure, config.in: Regenerate.
6672 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6673
6674 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6675
6676 * gdbreplay.c: Move include of alloca.h up, next to include of
6677 malloc.h.
6678 * server.h: Add include of malloc.h.
6679 * mem-break.c: Remove include of malloc.h.
6680 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6681
6682 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6683
6684 * Makefile.in (memmem.o): Build with -Wno-error.
6685
6686 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6687
6688 * utils.c (xsnprintf): Make non-static.
6689 * server.h: Add xsnprintf declaration.
6690 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6691 replace calls to snprintf by calls to xsnprintf throughout.
6692
6693 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6694
6695 * configure.ac: Add configure check for alloca.
6696 * configure, config.in: Regenerate.
6697 * server.h: Include alloca.h if it exists.
6698 * gdbreplay.c: Include alloca.h if it exists.
6699
6700 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6701
6702 * linux-low.c (__SIGRTMIN): Define if not already defined.
6703 (linux_create_inferior): Check for __ANDROID__ rather than
6704 __SIGRTMIN.
6705 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6706 are already deferred.
6707 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6708 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6709 stopped and already has a pending signal to report.
6710 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6711 a pending signal to report or is moving out of a jump pad.
6712 (linux_init_signals): Check for __ANDROID__ rather than
6713 __SIGRTMIN.
6714
6715 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6716
6717 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6718 debug_threads check. Avoid a linear search when not doing debug
6719 output.
6720
6721 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6722
6723 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6724 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6725 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6726 (process_event): Change local fd's type to gdb_fildes_t.
6727 (create_file_handler): Adjust prototype.
6728 (delete_file_handler): Adjust prototype.
6729 (handle_file_event): Adjust prototype. Use pfildes.
6730 (create_file_event): Adjsut prototype.
6731 * remote-utils.c (remote_desc, listen_desc): Change type to
6732 gdb_fildes_t.
6733 * server.h: New gdb_fildes_t typedef.
6734 [USE_WIN32API]: Include winsock2.h.
6735 (delete_file_handler, add_file_handler): Adjust prototypes.
6736 (pfildes): Declare.
6737 * utils.c (pfildes): New.
6738
6739 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6740
6741 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6742 * configure: Regenerate.
6743
6744 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6745
6746 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6747 (linux_done_accessing_memory): ... this.
6748 (linux_target_ops): Adjust.
6749 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6750 * nto-low.c (nto_target_ops): Adjust comment.
6751 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6752 * spu-low.c (spu_target_ops): Adjust comment.
6753 * target.h (target_ops): Rename unprepare_to_access_memory field
6754 to done_accessing_memory.
6755 (unprepare_to_access_memory): Rename to ...
6756 (done_accessing_memory): ... this.
6757
6758 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6759
6760 * linux-low.c (linux_prepare_to_access_memory): New.
6761 (linux_unprepare_to_access_memory): New.
6762 (linux_target_ops): Install them.
6763 * server.c (read_memory): Rename to ...
6764 (gdb_read_memory): ... this. Use
6765 prepare_to_access_memory/prepare_to_access_memory.
6766 (write_memory): Rename to ...
6767 (gdb_write_memory): ... this. Use
6768 prepare_to_access_memory/prepare_to_access_memory.
6769 (handle_search_memory_1): Adjust.
6770 (process_serial_event): Adjust.
6771 * target.h (struct target_ops): New fields
6772 prepare_to_access_memory and unprepare_to_access_memory.
6773 (prepare_to_access_memory, unprepare_to_access_memory): New.
6774 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6775 prepare_to_access_memory/prepare_to_access_memory.
6776 * nto-low.c (nto_target_ops): Adjust.
6777 * spu-low.c (spu_target_ops): Adjust.
6778 * win32-low.c (win32_target_ops): Adjust.
6779
6780 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6781
6782 * Makefile.in (WARN_CFLAGS): Get it from configure.
6783 (WERROR_CFLAGS): New.
6784 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6785 * configure.ac: Introduce --enable-werror, which adds -Werror to
6786 the compiler command line. Enabled by default. Disable with
6787 --disable-werror. Add -Wdeclaration-after-statement
6788 Wpointer-arith and -Wformat-nonliteral to warning flags.
6789 * configure: Regenerate.
6790
6791 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6792
6793 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6794
6795 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6796
6797 * gdbreplay.c (remote_error): New.
6798 (gdbchar): New.
6799 (expect): Use gdbchar. Check for error reading from GDB.
6800 Clarify sync error output.
6801 (play): Check for errors writing to GDB.
6802 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6803 * remote-utils.c (getpkt): Check for errors writing to the remote
6804 descriptor.
6805
6806 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6807
6808 * linux-low.c (linux_wait_1): Move non-debugging code out of
6809 `debug_threads' control.
6810
6811 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6812
6813 * linux-low.c (linux_wait_1): Don't set last_status here.
6814 * server.c (push_event, queue_stop_reply_callback): Assert we're
6815 not pushing a TARGET_WAITKIND_IGNORE event.
6816 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6817 (myresume, handle_target_event): Set the thread's last_resume_kind
6818 and last_status from the target returned status.
6819
6820 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6821
6822 PR threads/10729
6823
6824 * linux-x86-low.c (update_debug_registers_callback): New.
6825 (i386_dr_low_set_addr): Use it.
6826 (i386_dr_low_get_addr): New.
6827 (i386_dr_low_set_control): Use update_debug_registers_callback.
6828 (i386_dr_low_get_control): New.
6829 (i386_dr_low_get_status): Adjust.
6830 * linux-low.c (linux_stop_lwp): New.
6831 * linux-low.h (linux_stop_lwp): Declare.
6832
6833 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6834 argument instead of a i386_debug_reg_state.
6835 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6836 a i386_debug_reg_state.
6837 (i386_insert_aligned_watchpoint): Adjust.
6838 (i386_remove_aligned_watchpoint): Adjust.
6839 (i386_low_stopped_data_address): Read the debug registers from the
6840 inferior instead of from the mirrors.
6841 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6842 (i386_dr_low_get_addr): Declare.
6843 (i386_dr_low_get_control): Declare.
6844 (i386_dr_low_get_status): Change prototype.
6845
6846 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6847 (i386_dr_low_get_addr): New.
6848 (i386_dr_low_get_control): New.
6849 (i386_dr_low_get_status): Adjust prototype. Return
6850 dr_status_mirror.
6851 (i386_initial_stuff): Clear dr_status_mirror and
6852 dr_control_mirror.
6853 (i386_get_thread_context): Adjust.
6854 (i386_set_thread_context): Adjust.
6855 (i386_thread_added): Adjust.
6856
6857 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6858
6859 * linux-low.h (linux_thread_area): Delete declaration.
6860
6861 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6862
6863 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6864 after its termination.
6865
6866 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6867
6868 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6869 (gdb_wants_all_stopped): Delete.
6870 (linux_wait_1): Don't call them.
6871 * server.c (handle_v_cont): Tag all threads as want-stopped.
6872 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6873 stopped as "client-wants-stopped".
6874
6875 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6876
6877 * Makefile.in (signals_h): New.
6878 (server_h): Depend on it.
6879 (server.o): Don't depend on $(signals_def).
6880 (signals.o): Depend on $(signals_def).
6881
6882 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6883
6884 * Makefile.in (signals_def): New.
6885 (server_h): Append include/gdb/signals.h and signals_def.
6886 (server.o): Append signals_def.
6887
6888 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6889
6890 * server.c (handle_target_event): Use target_signal_to_host for
6891 resume_info.sig initialization.
6892 * target.h (struct thread_resume) <sig>: New comment.
6893
6894 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6895
6896 * server.c (handle_query): strcpy() the returned string from paddress()
6897 instead of sprintf().
6898 * utils.c (paddress): Return phex_nz().
6899
6900 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6901
6902 * server.c (handle_v_cont): Call mourn_inferior if process
6903 just exited.
6904 (myresume): Likewise.
6905
6906 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6907
6908 Static tracepoints, and integration with UST.
6909
6910 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6911 * mem-break.c (uninsert_all_breakpoints)
6912 (reinsert_all_breakpoints): New.
6913 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6914 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6915 (gdb_agent_ust_loaded, helper_thread_id)
6916 (gdb_agent_helper_thread_id): New macros.
6917 (struct ipa_sym_addresses): Add addr_ust_loaded,
6918 addr_helper_thread_id, addr_cmd_buf.
6919 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6920 (in_process_agent_loaded_ust): New.
6921 (write_e_ust_not_loaded): New.
6922 (maybe_write_ipa_ust_not_loaded): New.
6923 (struct collect_static_trace_data_action): New.
6924 (enum tracepoint_type) <static_tracepoint>: New.
6925 (struct tracepoint) <handle>: Mention static tracepoints.
6926 (struct static_tracepoint_ctx): New.
6927 (CMD_BUF_SIZE): New.
6928 (add_tracepoint_action): Handle static tracepoint actions.
6929 (unprobe_marker_at): New.
6930 (clear_installed_tracepoints): Handle static tracepoints.
6931 (cmd_qtdp): Handle static tracepoints.
6932 (probe_marker_at): New.
6933 (cmd_qtstart): Handle static tracepoints.
6934 (response_tracepoint): Handle static tracepoints.
6935 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6936 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6937 (get_context_regcache): Handle static tracepoints.
6938 (do_action_at_tracepoint): Handle static tracepoint actions.
6939 (traceframe_find_block_type): Handle static trace data blocks.
6940 (traceframe_read_sdata): New.
6941 (download_tracepoints): Download static tracepoint actions.
6942 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6943 (GDB_PROBE_NAME): New.
6944 (ust_ops): New.
6945 (GET_UST_SYM): New.
6946 (USTF): New.
6947 (dlsym_ust): New.
6948 (ust_marker_to_static_tracepoint): New.
6949 (gdb_probe): New.
6950 (collect_ust_data_at_tracepoint): New.
6951 (gdb_ust_probe): New.
6952 (UNIX_PATH_MAX, SOCK_DIR): New.
6953 (gdb_ust_connect_sync_socket): New.
6954 (resume_thread, stop_thread): New.
6955 (run_inferior_command): New.
6956 (init_named_socket): New.
6957 (gdb_ust_socket_init): New.
6958 (cstr_to_hexstr): New.
6959 (next_st): New.
6960 (first_marker, next_marker): New.
6961 (response_ust_marker): New.
6962 (cmd_qtfstm, cmd_qtsstm): New.
6963 (unprobe_marker_at, probe_marker_at): New.
6964 (cmd_qtstmat, gdb_ust_thread): New.
6965 (gdb_ust_init): New.
6966 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6967 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6968 (ST_REGENTRY): New.
6969 (x86_64_st_collect_regmap): New.
6970 (X86_64_NUM_ST_COLLECT_GREGS): New.
6971 (AMD64_RIP_REGNUM): New.
6972 (supply_static_tracepoint_registers): New.
6973 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6974 (ST_REGENTRY): New.
6975 (i386_st_collect_regmap): New.
6976 (i386_NUM_ST_COLLECT_GREGS): New.
6977 (supply_static_tracepoint_registers): New.
6978 * server.c (handle_query): Handle qXfer:statictrace:read.
6979 <qSupported>: Report support for StaticTracepoints, and
6980 qXfer:statictrace:read features.
6981 * server.h (traceframe_read_sdata)
6982 (supply_static_tracepoint_registers): Declare.
6983 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6984 (unpack_varlen_hex): Include in IPA build.
6985 * Makefile.in (ustlibs, ustinc): New.
6986 (IPA_OBJS): Add remote-utils-ipa.o.
6987 ($(IPA_LIB)): Link -ldl and -lpthread.
6988 (UST_CFLAGS): New.
6989 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6990 * config.in, configure: Regenerate.
6991
6992 2010-06-20 Ian Lance Taylor <iant@google.com>
6993 Pedro Alves <pedro@codesourcery.com>
6994
6995 * linux-x86-low.c (always_true): Delete.
6996 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6997 trying to fool the compiler with always_true.
6998
6999 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7000
7001 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7002 conditions in gdbserver.
7003
7004 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7005
7006 * spu-low.c (spu_read_memory): Wrap around local store limit.
7007 (spu_write_memory): Likewise.
7008
7009 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7010
7011 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7012 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7013 LONGEST uses.
7014 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7015 uses.
7016 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7017 uses with LONGEST uses.
7018
7019 2010-06-14 Stan Shebs <stan@codesourcery.com>
7020 Pedro Alves <pedro@codesourcery.com>
7021
7022 Bytecode compiler.
7023
7024 * linux-x86-low.c: Include limits.h.
7025 (add_insns): New.
7026 (always_true): New.
7027 (EMIT_ASM): New.
7028 (EMIT_ASM32): New.
7029 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7030 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7031 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7032 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7033 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7034 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7035 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7036 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7037 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7038 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7039 (amd64_emit_void_call_2): New.
7040 (amd64_emit_ops): New.
7041 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7042 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7043 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7044 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7045 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7046 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7047 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7048 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7049 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7050 (i386_emit_stack_adjust, i386_emit_int_call_1)
7051 (i386_emit_void_call_2): New.
7052 (i386_emit_ops): New.
7053 (x86_emit_ops): New.
7054 (the_low_target): Install x86_emit_ops.
7055 * server.h (struct emit_ops): New.
7056 (get_raw_reg_func_addr): Declare.
7057 (current_insn_ptr, emit_error): Declare.
7058 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7059 (set_trace_state_variable_value): New defines.
7060 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7061 addr_get_trace_state_variable_value and
7062 addr_set_trace_state_variable_value.
7063 (symbol_list): New fields for get_raw_reg,
7064 get_trace_state_variable_value and set_trace_state_variable_value.
7065 (condfn): New typedef.
7066 (struct tracepoint): New field `compiled_cond'.
7067 (do_action_at_tracepoint): Clear compiled_cond.
7068 (get_trace_state_variable_value, set_trace_state_variable_value):
7069 Export in the IPA.
7070 (condition_true_at_tracepoint): If there's a compiled condition,
7071 run that.
7072 (current_insn_ptr, emit_error): New globals.
7073 (struct bytecode_address): New.
7074 (get_raw_reg_func_addr): New.
7075 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7076 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7077 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7078 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7079 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7080 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7081 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7082 (compile_tracepoint_condition, compile_bytecodes): New.
7083 * target.h (emit_ops): Forward declare.
7084 (struct target_ops): New field emit_ops.
7085 (target_emit_ops): New.
7086 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7087 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7088 * linux-low.c (linux_emit_ops): New.
7089 (linux_target_ops): Install it.
7090 * linux-low.h (struct linux_target_ops): New field emit_ops.
7091
7092 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7093
7094 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7095 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7096
7097 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7098 Stan Shebs <stan@codesourcery.com>
7099
7100 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7101 (all): Depend on $(extra_libraries).
7102 (install-only): Install the IPA.
7103 (IPA_OBJS, IPA_LIB): New.
7104 (clean): Remove the IPA lib.
7105 (IPAGENT_CFLAGS): New.
7106 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7107 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7108 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7109 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7110 * configure.ac: Check for atomic builtins support in the compiler.
7111 (IPA_DEPFILES, extra_libraries): Define.
7112 * configure.srv (ipa_obj): Add description.
7113 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7114 (i[34567]86-*-linux*): Set ipa_obj.
7115 (x86_64-*-linux*): Set ipa_obj.
7116 * linux-low.c (stabilizing_threads): New.
7117 (supports_fast_tracepoints): New.
7118 (linux_detach): Stabilize threads before detaching.
7119 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7120 the lwp is either not stabilizing, or is moving out of a jump pad.
7121 (linux_fast_tracepoint_collecting): New.
7122 (maybe_move_out_of_jump_pad): New.
7123 (enqueue_one_deferred_signal): New.
7124 (dequeue_one_deferred_signal): New.
7125 (linux_wait_for_event_1): If moving out of a jump pad, defer
7126 pending signals to later.
7127 (linux_stabilize_threads): New.
7128 (linux_wait_1): Check if threads need moving out of jump pads, and
7129 do it if so.
7130 (stuck_in_jump_pad_callback): New.
7131 (move_out_of_jump_pad_callback): New.
7132 (lwp_running): New.
7133 (linux_resume_one_lwp): Handle moving out of jump pads.
7134 (linux_set_resume_request): Dequeue deferred signals.
7135 (need_step_over_p): Also step over fast tracepoint jumps.
7136 (start_step_over): Also uninsert fast tracepoint jumps.
7137 (finish_step_over): Also reinsert fast tracepoint jumps.
7138 (linux_install_fast_tracepoint_jump): New.
7139 (linux_target_ops): Install linux_stabilize_threads and
7140 linux_install_fast_tracepoint_jump_pad.
7141 * linux-low.h (linux_target_ops) <get_thread_area,
7142 install_fast_tracepoint_jump_pad>: New fields.
7143 (struct lwp_info) <collecting_fast_tracepoint,
7144 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7145 (linux_get_thread_area): Declare.
7146 * linux-x86-low.c (jump_insn): New.
7147 (x86_get_thread_area): New.
7148 (append_insns): New.
7149 (push_opcode): New.
7150 (amd64_install_fast_tracepoint_jump_pad): New.
7151 (i386_install_fast_tracepoint_jump_pad): New.
7152 (x86_install_fast_tracepoint_jump_pad): New.
7153 (the_low_target): Install x86_get_thread_area and
7154 x86_install_fast_tracepoint_jump_pad.
7155 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7156 (struct fast_tracepoint_jump): New.
7157 (fast_tracepoint_jump_insn): New.
7158 (fast_tracepoint_jump_shadow): New.
7159 (find_fast_tracepoint_jump_at): New.
7160 (fast_tracepoint_jump_here): New.
7161 (delete_fast_tracepoint_jump): New.
7162 (set_fast_tracepoint_jump): New.
7163 (uninsert_fast_tracepoint_jumps_at): New.
7164 (reinsert_fast_tracepoint_jumps_at): New.
7165 (set_breakpoint_at): Use write_inferior_memory.
7166 (uninsert_raw_breakpoint): Use write_inferior_memory.
7167 (check_mem_read): Mask out fast tracepoint jumps.
7168 (check_mem_write): Mask out fast tracepoint jumps.
7169 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7170 (set_fast_tracepoint_jump): Declare.
7171 (delete_fast_tracepoint_jump)
7172 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7173 (reinsert_fast_tracepoint_jumps_at): Declare.
7174 * regcache.c: Don't compile many functions when building the
7175 in-process agent library.
7176 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7177 the register buffer in the heap.
7178 (free_register_cache): If the register buffer isn't owned by the
7179 regcache, don't free it.
7180 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7181 pre-existing register caches.
7182 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7183 type.
7184 (convert_ascii_to_int): : Constify `from' parameter type.
7185 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7186 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7187 the needed buffer in-place.
7188 (relocate_instruction): New.
7189 * server.c (handle_query) <qSymbols>: If the target supports
7190 tracepoints, give it a chance of looking up symbols. Report
7191 support for fast tracepoints.
7192 (handle_status): Stabilize threads.
7193 (process_serial_event): Adjust.
7194 * server.h (struct fast_tracepoint_jump): Forward declare.
7195 (struct process_info) <fast_tracepoint_jumps>: New field.
7196 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7197 (decode_X_packet, decode_M_packet): Adjust.
7198 (relocate_instruction): Declare.
7199 (in_process_agent_loaded): Declare.
7200 (tracepoint_look_up_symbols): Declare.
7201 (struct fast_tpoint_collect_status): Declare.
7202 (fast_tracepoint_collecting): Declare.
7203 (force_unlock_trace_buffer): Declare.
7204 (handle_tracepoint_bkpts): Declare.
7205 (initialize_low_tracepoint)
7206 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7207 * target.h (struct target_ops) <stabilize_threads,
7208 install_fast_tracepoint_jump_pad>: New fields.
7209 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7210 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7211 [HAVE_STDINT_H]: Include stdint.h.
7212 (trace_debug_1): Rename to ...
7213 (trace_vdebug): ... this.
7214 (trace_debug): Rename to ...
7215 (trace_debug_1): ... this. Add `level' parameter.
7216 (trace_debug): New.
7217 (ATTR_USED, ATTR_NOINLINE): New.
7218 (IP_AGENT_EXPORT): New.
7219 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7220 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7221 (about_to_request_buffer_space, trace_buffer_is_full)
7222 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7223 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7224 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7225 (traceframe_write_count, traceframes_created)
7226 (trace_state_variables)
7227 New renaming defines.
7228 (struct ipa_sym_addresses): New.
7229 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7230 (symbol_list): New.
7231 (ipa_sym_addrs): New.
7232 (all_tracepoint_symbols_looked_up): New.
7233 (in_process_agent_loaded): New.
7234 (write_e_ipa_not_loaded): New.
7235 (maybe_write_ipa_not_loaded): New.
7236 (tracepoint_look_up_symbols): New.
7237 (debug_threads) [IN_PROCESS_AGENT]: New.
7238 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7239 (UNKNOWN_SIDE_EFFECTS): New.
7240 (stop_tracing): New.
7241 (flush_trace_buffer): New.
7242 (stop_tracing_bkpt): New.
7243 (flush_trace_buffer_bkpt): New.
7244 (read_inferior_integer): New.
7245 (read_inferior_uinteger): New.
7246 (read_inferior_data_pointer): New.
7247 (write_inferior_data_pointer): New.
7248 (write_inferior_integer): New.
7249 (write_inferior_uinteger): New.
7250 (struct collect_static_trace_data_action): Delete.
7251 (enum tracepoint_type): New.
7252 (struct tracepoint) <type>: New field `type'.
7253 <actions_str, step_actions, step_actions_str>: Only include in
7254 GDBserver.
7255 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7256 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7257 (tracepoints): Use IP_AGENT_EXPORT.
7258 (last_tracepoint): Don't include in the IPA.
7259 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7260 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7261 (alloced_trace_state_variables): New.
7262 (trace_state_variables): Use IP_AGENT_EXPORT.
7263 (traceframe_t): Delete unused variable.
7264 (circular_trace_buffer): Don't include in the IPA.
7265 (trace_buffer_start): Delete.
7266 (struct trace_buffer_control): New.
7267 (trace_buffer_free): Delete.
7268 (struct ipa_trace_buffer_control): New.
7269 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7270 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7271 New.
7272 (trace_buffer_ctrl): New.
7273 (TRACE_BUFFER_CTRL_CURR): New.
7274 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7275 Reimplement as macros.
7276 (trace_buffer_wrap): Delete.
7277 (traceframe_write_count, traceframe_read_count)
7278 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7279 (struct tracepoint_hit_ctx) <type>: New field.
7280 (struct fast_tracepoint_ctx): New.
7281 (memory_barrier): New.
7282 (cmpxchg): New.
7283 (record_tracepoint_error): Update atomically in the IPA.
7284 (clear_inferior_trace_buffer): New.
7285 (about_to_request_buffer_space): New.
7286 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7287 updating the same buffer.
7288 (add_tracepoint): Default the tracepoint's type to trap
7289 tracepoint, and orig_size to -1.
7290 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7291 internal variables.
7292 (create_trace_state_variable): New parameter `gdb'. Handle it.
7293 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7294 (cmd_qtdp): Handle fast tracepoints.
7295 (cmd_qtdv): Adjust.
7296 (max_jump_pad_size): New.
7297 (gdb_jump_pad_head): New.
7298 (get_jump_space_head): New.
7299 (claim_jump_space): New.
7300 (sort_tracepoints): New.
7301 (MAX_JUMP_SIZE): New.
7302 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7303 IPA.
7304 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7305 support. Upload fast traceframes, and delete internal IPA
7306 breakpoints.
7307 (stop_tracing_handler): New.
7308 (flush_trace_buffer_handler): New.
7309 (cmd_qtstop): Upload fast tracepoints.
7310 (response_tracepoint): Handle fast tracepoints.
7311 (tracepoint_finished_step): Upload fast traceframes. Set the
7312 tracepoint hit context's tracepoint type.
7313 (handle_tracepoint_bkpts): New.
7314 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7315 type. Add comment about fast tracepoints.
7316 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7317 non-existing action_str field.
7318 (get_context_regcache): Handle fast tracepoints.
7319 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7320 to the regcache.
7321 (fast_tracepoint_from_jump_pad_address): New.
7322 (fast_tracepoint_from_ipa_tpoint_address): New.
7323 (collecting_t): New.
7324 (force_unlock_trace_buffer): New.
7325 (fast_tracepoint_collecting): New.
7326 (collecting): New.
7327 (gdb_collect): New.
7328 (write_inferior_data_ptr): New.
7329 (target_tp_heap): New.
7330 (target_malloc): New.
7331 (download_agent_expr): New.
7332 (UALIGN): New.
7333 (download_tracepoints): New.
7334 (download_trace_state_variables): New.
7335 (upload_fast_traceframes): New.
7336 (IPA_FIRST_TRACEFRAME): New.
7337 (IPA_NEXT_TRACEFRAME_1): New.
7338 (IPA_NEXT_TRACEFRAME): New.
7339 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7340 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7341 (gdb_jump_pad_buffer_end): New.
7342 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7343 (initialize_tracepoint): Adjust.
7344 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7345 buffer. Initialize the low module.
7346 * utils.c (PREFIX, TOOLNAME): New.
7347 (malloc_failure): Use PREFIX.
7348 (error): In the IPA, an error causes an exit.
7349 (fatal, warning): Use PREFIX.
7350 (internal_error): Use TOOLNAME.
7351 (NUMCELLS): Increase to 10.
7352 * configure, config.in: Regenerate.
7353
7354 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7355
7356 * server.c (handle_query) <qSupported>: Do two passes over the
7357 qSupported string to avoid nesting strtok.
7358
7359 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7360
7361 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7362 (CDEPS): New.
7363 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7364 -Wl,--dynamic-list.
7365 * configure: Regenerate.
7366 * proc-service.list: New.
7367
7368 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7369
7370 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7371 New comment.
7372
7373 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7374
7375 * gdbreplay.c (remote_open): Check error return from socket() call by
7376 its equality to -1 not by it being negative.
7377 * remote-utils.c (remote_open): Likewise.
7378
7379 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7380
7381 * config.h: Regenerate.
7382
7383 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7384
7385 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7386 doesn't provide PTRACE_GET_THREAD_AREA.
7387
7388 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7389
7390 * linux-m68k-low.c: Include <asm/ptrace.h>
7391 (ps_get_thread_area): Implement.
7392
7393 2010-05-03 Doug Evans <dje@google.com>
7394
7395 * event-loop.c (struct callback_event): New struct.
7396 (callback_list): New global.
7397 (append_callback_event, delete_callback_event): New functions.
7398 (process_callback): New function.
7399 (start_event_loop): Call it.
7400 * remote-utils.c (NOT_SCHEDULED): Define.
7401 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7402 moved out of readchar.
7403 (readchar): Rewrite. Call reschedule before returning.
7404 (reset_readchar): New function.
7405 (remote_close): Call it.
7406 (process_remaining, reschedule): New functions.
7407 * server.h (callback_handler_func): New typedef.
7408 (append_callback_event, delete_callback_event): Declare.
7409
7410 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7411
7412 * proc-service.c (ps_pglobal_lookup): Use
7413 thread_db_look_up_one_symbol.
7414 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7415 parameter. Use it instead of all_symbols_looked_up.
7416 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7417 field.
7418 (all_symbols_looked_up): Don't declare.
7419 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7420 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7421 field.
7422 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7423 Set all_symbols_looked_up here.
7424 (thread_db_look_up_one_symbol): New.
7425 (thread_db_get_tls_address): Adjust.
7426 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7427 thread_db object on the heap, and tentatively set it in the
7428 process structure.
7429 (thread_db_init): Don't set all_symbols_looked_up here.
7430 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7431
7432 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7433
7434 * linux-low.c (linux_kill, linux_detach): Adjust.
7435 (status_pending_p_callback): Remove redundant statement. Check
7436 for !TARGET_WAITIKIND_IGNORE, instead of
7437 TARGET_WAITKIND_STOPPED.
7438 (handle_tracepoints): Make sure LWP is locked. Adjust.
7439 (linux_wait_for_event_1): Adjust.
7440 (linux_cancel_breakpoints): New.
7441 (unsuspend_one_lwp): New.
7442 (unsuspend_all_lwps): New.
7443 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7444 (send_sigstop_callback): Change return type to int, add new
7445 `except' parameter and handle it.
7446 (suspend_and_send_sigstop_callback): New.
7447 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7448 pass them down. If SUSPEND, also increment the lwp's suspend
7449 count.
7450 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7451 (need_step_over_p): Don't consider suspended LWPs.
7452 (start_step_over): Adjust.
7453 (proceed_one_lwp): Change return type to int, add new `except'
7454 parameter and handle it.
7455 (unsuspend_and_proceed_one_lwp): New.
7456 (proceed_all_lwps): Use find_inferior instead of
7457 for_each_inferior.
7458 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7459 also decrement the suspend count of LWPs. Pass `except' down,
7460 instead of hacking its suspend count.
7461 (linux_pause_all): Add `freeze' parameter. Adjust.
7462 (linux_unpause_all): New.
7463 (linux_target_ops): Install linux_unpause_all.
7464 * server.c (handle_status): Adjust.
7465 * target.h (struct target_ops): New fields `unpause_all' and
7466 `cancel_breakpoints'. Add new parameter to `pause_all'.
7467 (pause_all): Add new `freeze' parameter.
7468 (unpause_all): New.
7469 (cancel_breakpoints): New.
7470 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7471 cancel breakpoints.
7472 (cmd_qtstart): Pause threads.
7473 (stop_tracing): Pause threads, and cancel breakpoints.
7474 * win32-low.c (win32_target_ops): Adjust.
7475
7476 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7477
7478 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7479 the inferior right away from here...
7480 (linux_wait_1): ... to here, and adjust to check the thread's
7481 last_resume_kind instead of the lwp's step or stop_expected flags.
7482
7483 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7484
7485 * README: Use consistent `GDB' and `GDBserver' spellings.
7486
7487 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7488
7489 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7490 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7491 (linux_detach_one_lwp): Assume the lwp is stopped.
7492 (any_thread_of): Delete.
7493 (linux_detach): Stop all lwps here. Don't blindly delete all
7494 breakpoints.
7495 (delete_lwp_callback): New.
7496 (linux_mourn): Delete all lwps of the process that is gone.
7497 (linux_wait_1): Don't delete the last lwp of the process here.
7498 * mem-break.h (mark_breakpoints_out): Declare.
7499 * mem-break.c (mark_breakpoints_out): New.
7500 (free_all_breakpoints): Use it.
7501 * server.c (handle_target_event): If the process is gone, mark
7502 breakpoints out.
7503 * thread-db.c (struct thread_db) <create_bp>: New field.
7504 (thread_db_enable_reporting): Fix prototype. Store a thread event
7505 breakpoint reference in the thread_db struct.
7506 (thread_db_load_search): Clear the thread_db object.
7507 (try_thread_db_load_1): Ditto.
7508 (switch_to_process): New.
7509 (disable_thread_event_reporting): Use it.
7510 (remove_thread_event_breakpoints): New.
7511 (thread_db_detach, thread_db_mourn): Use it.
7512
7513 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7514
7515 * linux-low.c (linux_enable_event_reporting): New.
7516 (linux_wait_for_event_1, handle_extended_wait): Use it.
7517
7518 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7519
7520 * linux-low.c (linux_kill_one_lwp, linux_kill)
7521 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7522 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7523 SIGSTOP even if the LWP is stopped.
7524 (send_sigstop_callback): New.
7525 (stop_all_lwps): Use send_sigstop_callback instead.
7526 (linux_resume_one_thread): Adjust.
7527 (proceed_one_lwp): Still proceed an LWP that the client has
7528 requested to stop, if we haven't reported it as stopped yet. Make
7529 sure that LWPs the client want stopped, have a pending SIGSTOP.
7530
7531 2010-04-26 Doug Evans <dje@google.com>
7532
7533 * server.c (handle_general_set): Make static.
7534
7535 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7536 Print received char after testing for error/eof instead of before.
7537 (input_interrupt): Tweak comment.
7538
7539 2010-04-23 Doug Evans <dje@google.com>
7540
7541 * server.c (start_inferior): Print inferior argv if --debug.
7542
7543 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7544
7545 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7546 * nto-x86-low.c: Include server.h
7547
7548 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7549
7550 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7551 be consistent with other sources of this directory.
7552 (init_registers_amd64): Correct name of source file of this function
7553 in the comment.
7554
7555 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7556
7557 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7558 64-bit executables.
7559
7560 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7561
7562 * win32-i386-low.c: Add 64-bit support.
7563 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7564 (init_registers_amd64): Declare.
7565 (mappings): Add 64-bit version of array.
7566 (init_windows_x86): New function.
7567 (the_low_target): Change init_arch field to init_windows_x86.
7568
7569 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7570
7571 * win32-low.c: Adapt to support also 64-bit architecture.
7572 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7573 (get_image_name): Use SIZE_T type for local variable `done'.
7574 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7575 (toolhelp_get_dll_name): Idem.
7576 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7577 Use uintptr_t typecast to avoid warning.
7578 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7579 (handle_exception): Use phex_nz to avoid warning.
7580 (win32_wait): Remove unused local variable `process'.
7581
7582 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7583
7584 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7585 `amd64-avx.o'.
7586
7587 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7588
7589 * configure.ac: Use `ws2_32' library for srv_mingw.
7590 * configure: Regenerate.
7591 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7592 * remote-utils.c: Likewise.
7593
7594 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7595
7596 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7597 if __x86_64__ is defined.
7598
7599 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7600
7601 * configure: Regenerate.
7602
7603 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7604
7605 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7606 * target.h (target_ops): New get_tib_address field.
7607 * win32-low.h (win32_thread_info): Add thread_local_base field.
7608 * win32-low.c (child_add_thread): Add tlb argument.
7609 Set thread_local_base field to TLB.
7610 (get_child_debug_event): Adapt to child_add_thread change.
7611 (win32_get_tib_address): New function.
7612 (win32_target_ops): Set get_tib_address field to
7613 win32_get_tib_address.
7614 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7615
7616 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7617
7618 * linux-low.c (linux_mourn): Also remove the process.
7619 * server.c (handle_target_event): Don't remove the process here.
7620 * nto-low.c (nto_mourn): New.
7621 (nto_target_ops): Install it.
7622 * spu-low.c (spu_mourn): New.
7623 (spu_target_ops): Install it.
7624 * win32-low.c (win32_mourn): New.
7625 (win32_target_ops): Install it.
7626
7627 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7628
7629 * server.h (buffer_xml_printf): Remove redundant `;'.
7630
7631 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7632
7633 * regcache.c (set_register_cache): Invalidate regcaches before
7634 changing the register cache layout.
7635 (regcache_invalidate_one): Allow a NULL regcache.
7636 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7637 regcaches before changing the register cache layout or the target
7638 regsets.
7639
7640 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7641
7642 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7643 variable warning on Linux/x86-64.
7644
7645 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7646
7647 GDBserver disconnected tracing support.
7648
7649 * linux-low.c (linux_remove_process): Delete.
7650 (add_lwp): Don't set last_resume_kind here.
7651 (linux_kill): Use `mourn'.
7652 (linux_detach): Use `thread_db_detach', and `mourn'.
7653 (linux_mourn): New.
7654 (linux_attach_lwp_1): Adjust comment.
7655 (linux_attach): last_resume_kind moved the thread_info; adjust.
7656 (status_pending_p_callback): Adjust.
7657 (linux_wait_for_event_1): Adjust.
7658 (count_events_callback, select_singlestep_lwp_callback)
7659 (select_event_lwp_callback, cancel_breakpoints_callback)
7660 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7661 (proceed_one_lwp): Adjust.
7662 (linux_async): Add debug output.
7663 (linux_thread_stopped): New.
7664 (linux_pause_all): New.
7665 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7666 linux_pause_all.
7667 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7668 (thread_db_free): Delete declaration.
7669 (thread_db_detach, thread_db_mourn): Declare.
7670 * thread-db.c (thread_db_init): Use thread_db_mourn.
7671 (thread_db_free): Delete, split in two.
7672 (disable_thread_event_reporting): New.
7673 (thread_db_detach): New.
7674 (thread_db_mourn): New.
7675
7676 * server.h (struct thread_info) <last_resume_kind>: New field.
7677 <attached>: Add comment.
7678 <gdb_detached>: New field.
7679 (handler_func): Change return type to int.
7680 (handle_serial_event, handle_target_event): Ditto.
7681 (gdb_connected): Declare.
7682 (tracing): Delete.
7683 (disconnected_tracing): Declare.
7684 (stop_tracing): Declare.
7685
7686 * server.c (handle_query) <qSupported>: Report support for
7687 disconnected tracing.
7688 (queue_stop_reply_callback): Account for running threads.
7689 (gdb_wants_thread_stopped): New.
7690 (gdb_wants_all_threads_stopped): New.
7691 (gdb_reattached_process): New.
7692 (handle_status): Clear the `gdb_detached' flag of all processes.
7693 In all-stop, stop all threads.
7694 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7695 (process_serial_event): If the remote connection breaks, or if an
7696 exit was forced with "monitor exit", force an event loop exit.
7697 Handle disconnected tracing on detach.
7698 (handle_serial_event): Adjust.
7699 (handle_target_event): If GDB isn't connected, forward events back
7700 to the inferior, unless the last process exited, in which case,
7701 exit gdbserver. Adjust interface.
7702
7703 * remote-utils.c (remote_open): Don't block in accept. Instead
7704 register an event loop source on the listen socket file
7705 descriptor. Refactor bits into ...
7706 (listen_desc): ... this new global.
7707 (gdb_connected): ... this new function.
7708 (enable_async_notification): ... this new function.
7709 (handle_accept_event): ... this new function.
7710 (remote_close): Clear remote_desc.
7711
7712 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7713
7714 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7715 New fields.
7716 (mourn_inferior): Define.
7717 (target_process_qsupported): Avoid the dangling else problem.
7718 (thread_stopped): Define.
7719 (pause_all): Define.
7720 (target_waitstatus_to_string): Declare.
7721 * target.c (target_waitstatus_to_string): New.
7722
7723 * tracepoint.c (tracing): Make extern.
7724 (disconnected_tracing): New.
7725 (stop_tracing): Make extern. Handle tracing stops due to GDB
7726 disconnecting.
7727 (cmd_qtdisconnected): New.
7728 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7729 (handle_tracepoint_general_set): Handle QTDisconnected.
7730
7731 * event-loop.c (event_handler_func): Change return type to int.
7732 (process_event): Bail out if the event handler wants the event
7733 loop to stop.
7734 (handle_file_event): Ditto.
7735 (start_event_loop): Bail out if the event handler wants the event
7736 loop to stop.
7737
7738 * nto-low.c (nto_target_ops): Adjust.
7739 * spu-low.c (spu_wait): Don't remove the process here.
7740 (spu_target_ops): Adjust.
7741 * win32-low.c (win32_wait): Don't remove the process here.
7742 (win32_target_ops): Adjust.
7743
7744 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7745
7746 * regcache.c (realloc_register_cache): Invalidate inferior's
7747 regcache before recreating it.
7748
7749 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7750
7751 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7752
7753 2010-04-09 Stan Shebs <stan@codesourcery.com>
7754 Pedro Alves <pedro@codesourcery.com>
7755
7756 * server.h (LONGEST): New.
7757 (struct thread_info) <while_stepping>: New field.
7758 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7759 Declare.
7760 (initialize_tracepoint, handle_tracepoint_general_set)
7761 (handle_tracepoint_query, tracepoint_finished_step)
7762 (tracepoint_was_hit, release_while_stepping_state_list):
7763 (current_traceframe): Declare.
7764 * server.c (handle_general_set): Handle tracepoint packets.
7765 (read_memory): New.
7766 (write_memory): New.
7767 (handle_search_memory_1): Use read_memory.
7768 (handle_query): Report support for conditional tracepoints, trace
7769 state variables, and tracepoint sources. Handle tracepoint
7770 queries.
7771 (main): Initialize the tracepoints module.
7772 (process_serial_event): Handle traceframe reads/writes.
7773
7774 * linux-low.c (handle_tracepoints): New.
7775 (linux_wait_1): Call it.
7776 (linux_resume_one_lwp): Handle while-stepping.
7777 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7778 (linux_target_ops): Install them.
7779 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7780 New field.
7781 * linux-x86-low.c (x86_supports_tracepoints): New.
7782 (the_low_target). Install it.
7783
7784 * mem-break.h (delete_breakpoint): Declare.
7785 * mem-break.c (delete_breakpoint): Make external.
7786
7787 * target.h (struct target_ops): Add `supports_tracepoints',
7788 `read_pc', and `write_pc' fields.
7789 (target_supports_tracepoints): Define.
7790 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7791 (phex_nz): New.
7792
7793 * regcache.h (struct regcache) <registers_owned>: New field.
7794 (init_register_cache, regcache_cpy): Declare.
7795 (regcache_read_pc, regcache_write_pc): Declare.
7796 (register_cache_size): Declare.
7797 (supply_regblock): Declare.
7798 * regcache.c (init_register_cache): New.
7799 (new_register_cache): Use it.
7800 (regcache_cpy): New.
7801 (register_cache_size): New.
7802 (supply_regblock): New.
7803 (regcache_read_pc, regcache_write_pc): New.
7804
7805 * tracepoint.c: New.
7806
7807 * Makefile.in (OBS): Add tracepoint.o.
7808 (tracepoint.o): New rule.
7809
7810 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7811
7812 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7813 (i386-mmx.o): New.
7814 (i386-mmx.c): Likewise.
7815 (i386-mmx-linux.o): Likewise.
7816 (i386-mmx-linux.c): Likewise.
7817
7818 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7819 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7820 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7821 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7822
7823 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7824 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7825 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7826
7827 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7828
7829 * Makefile.in (clean): Updated.
7830 (i386-avx.o): New.
7831 (i386-avx.c): Likewise.
7832 (i386-avx-linux.o): Likewise.
7833 (i386-avx-linux.c): Likewise.
7834 (amd64-avx.o): Likewise.
7835 (amd64-avx.c): Likewise.
7836 (amd64-avx-linux.o): Likewise.
7837 (amd64-avx-linux.c): Likewise.
7838
7839 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7840 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7841 (srv_amd64_regobj): Add amd64-avx.o.
7842 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7843 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7844 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7845 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7846 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7847 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7848 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7849
7850 * i387-fp.c: Include "i386-xstate.h".
7851 (i387_xsave): New.
7852 (i387_cache_to_xsave): Likewise.
7853 (i387_xsave_to_cache): Likewise.
7854 (x86_xcr0): Likewise.
7855
7856 * i387-fp.h (i387_cache_to_xsave): Likewise.
7857 (i387_xsave_to_cache): Likewise.
7858 (x86_xcr0): Likewise.
7859
7860 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7861 * linux-crisv32-low.c (target_regsets): Likewise.
7862 * linux-m68k-low.c (target_regsets): Likewise.
7863 * linux-mips-low.c (target_regsets): Likewise.
7864 * linux-ppc-low.c (target_regsets): Likewise.
7865 * linux-s390-low.c (target_regsets): Likewise.
7866 * linux-sh-low.c (target_regsets): Likewise.
7867 * linux-sparc-low.c (target_regsets): Likewise.
7868 * linux-xtensa-low.c (target_regsets): Likewise.
7869
7870 * linux-low.c: Include <sys/uio.h>.
7871 (regsets_fetch_inferior_registers): Support nt_type.
7872 (regsets_store_inferior_registers): Likewise.
7873 (linux_process_qsupported): New.
7874 (linux_target_ops): Add linux_process_qsupported.
7875
7876 * linux-low.h (regset_info): Add nt_type.
7877 (linux_target_ops): Add process_qsupported.
7878
7879 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7880 and <sys/uio.h>.
7881 (init_registers_i386_avx_linux): New.
7882 (init_registers_amd64_avx_linux): Likewise.
7883 (xmltarget_i386_linux_no_xml): Likewise.
7884 (xmltarget_amd64_linux_no_xml): Likewise.
7885 (PTRACE_GETREGSET): Likewise.
7886 (PTRACE_SETREGSET): Likewise.
7887 (x86_fill_xstateregset): Likewise.
7888 (x86_store_xstateregset): Likewise.
7889 (use_xml): Likewise.
7890 (x86_linux_update_xmltarget): Likewise.
7891 (x86_linux_process_qsupported): Likewise.
7892 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7893 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7894 init_registers_i386_linux here. Call
7895 x86_linux_update_xmltarget.
7896 (the_low_target): Add x86_linux_process_qsupported.
7897
7898 * server.c (handle_query): Call target_process_qsupported.
7899
7900 * target.h (target_ops): Add process_qsupported.
7901 (target_process_qsupported): New.
7902
7903 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7904
7905 * inferiors.c (add_thread): Set last_status kind to
7906 TARGET_WAITKIND_IGNORE.
7907 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7908 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7909 (linux_wait_1): Move `thread' local definition to block that uses
7910 it. Don't NULL initialize `event_child'.
7911 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7912 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7913 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7914
7915 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7916
7917 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7918 an extended waitstatus, or by a watchpoint.
7919 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7920 thread was stepping or has been stopped by a watchpoint.
7921
7922 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7923
7924 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7925 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7926 of another, then delete the previous, and validate all
7927 breakpoints.
7928 (validate_inserted_breakpoint): New.
7929 (delete_disabled_breakpoints): New.
7930 (validate_breakpoints): New.
7931 (check_mem_read): Validate breakpoints before trusting their
7932 shadow. Delete disabled breakpoints.
7933 (check_mem_write): Validate breakpoints before trusting they
7934 should be inserted. Delete disabled breakpoints.
7935 * mem-break.h (validate_breakpoints):
7936 * server.c (handle_query): Validate breakpoints when we see a
7937 qSymbol query.
7938
7939 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7940
7941 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7942 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7943 if we could tell there's a GDB breakpoint at stop_pc.
7944 (need_step_over_p): Don't do a step over if we find a GDB
7945 breakpoint at the resume PC.
7946
7947 * mem-break.c (struct raw_breakpoint): New.
7948 (enum bkpt_type): New type `gdb_breakpoint'.
7949 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7950 fields. New field `raw'.
7951 (find_raw_breakpoint_at): New.
7952 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7953 breakpoint instead.
7954 (set_breakpoint_at): Adjust.
7955 (delete_raw_breakpoint): New.
7956 (release_breakpoint): New.
7957 (delete_breakpoint): Rename to...
7958 (delete_breakpoint_1): ... this. Add proc parameter. Use
7959 release_breakpoint. Return ENOENT.
7960 (delete_breakpoint): Reimplement.
7961 (find_breakpoint_at): Delete.
7962 (find_gdb_breakpoint_at): New.
7963 (delete_breakpoint_at): Delete.
7964 (set_gdb_breakpoint_at): New.
7965 (delete_gdb_breakpoint_at): New.
7966 (gdb_breakpoint_here): New.
7967 (set_reinsert_breakpoint): Use release_breakpoint.
7968 (uninsert_breakpoint): Rename to ...
7969 (uninsert_raw_breakpoint): ... this.
7970 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7971 (reinsert_raw_breakpoint): Change parameter type to
7972 raw_breakpoint.
7973 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7974 instead.
7975 (check_breakpoints): Adjust. Use release_breakpoint.
7976 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7977 (breakpoint_inserted_here): Ditto.
7978 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7979 Don't trust the breakpoint's shadow if it is not inserted.
7980 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7981 (delete_all_breakpoints): Adjust.
7982 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7983 use delete_breakpoint_1.
7984
7985 * mem-break.h (breakpoints_supported): Delete declaration.
7986 (set_gdb_breakpoint_at): Declare.
7987 (gdb_breakpoint_here): Declare.
7988 (delete_breakpoint_at): Delete.
7989 (delete_gdb_breakpoint_at): Declare.
7990
7991 * server.h (struct raw_breakpoint): Forward declare.
7992 (struct process_info): New field `raw_breakpoints'.
7993
7994 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7995 breakpoints.
7996
7997 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7998
7999 * linux-low.c (status_pending_p_callback): Fix comment.
8000 (linux_wait_for_event_1): Move most of the internal breakpoint
8001 handling from here...
8002 (linux_wait_1): ... to here.
8003 (count_events_callback): New.
8004 (select_singlestep_lwp_callback): New.
8005 (select_event_lwp_callback): New.
8006 (cancel_breakpoints_callback): New.
8007 (select_event_lwp): New.
8008 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8009 priority to all LWPs that have had events that should be reported
8010 to the client. Cancel breakpoints when about to reporting the
8011 event to the client, not while stopping lwps. No longer cancel
8012 finished single-steps here.
8013 (cancel_finished_single_step): Delete.
8014 (cancel_finished_single_steps): Delete.
8015
8016 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8017
8018 * mem-break.c (enum bkpt_type): New.
8019 (struct breakpoint): New field `type'.
8020 (set_breakpoint_at): Change return type to struct breakpoint
8021 pointer. Set type to `other_breakpoint' by default.
8022 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8023 in the breakpoint list.
8024 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8025 (reinsert_breakpoint): Rename to ...
8026 (reinsert_raw_breakpoint): ... this.
8027 (reinsert_breakpoints_at): Adjust.
8028 * mem-break.h (struct breakpoint): Declare.
8029 (set_breakpoint_at): Change return type to struct breakpoint
8030 pointer.
8031
8032 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8033
8034 * server.c (handle_query): Assign, not compare.
8035
8036 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8037
8038 Teach linux gdbserver to step-over-breakpoints.
8039
8040 * linux-low.c (can_hardware_single_step): New.
8041 (supports_breakpoints): New.
8042 (handle_extended_wait): If stopping threads, read the stop pc of
8043 the new cloned LWP.
8044 (get_pc): New.
8045 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8046 low target doesn't support retrieving the PC.
8047 (add_lwp): Set last_resume_kind to resume_continue.
8048 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8049 (linux_attach): Don't clear stop_expected. Set the lwp's
8050 last_resume_kind to resume_stop.
8051 (linux_detach_one_lwp): Don't check for removed breakpoints.
8052 (check_removed_breakpoint): Delete.
8053 (status_pending_p): Rename to ...
8054 (status_pending_p_callback): ... this. Don't check for removed
8055 breakpoints. Don't consider threads that are stopped from GDB's
8056 perspective.
8057 (linux_wait_for_lwp): Always read the stop_pc here.
8058 (cancel_breakpoint): New.
8059 (step_over_bkpt): New global.
8060 (linux_wait_for_event_1): Implement stepping over breakpoints.
8061 (gdb_wants_lwp_stopped): New.
8062 (gdb_wants_all_stopped): New.
8063 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8064 single-step traps here. Store the thread's last reported target
8065 wait status.
8066 (send_sigstop): Don't clear stop_expected. Always set it,
8067 instead.
8068 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8069 (cancel_finished_single_step): New.
8070 (cancel_finished_single_steps): New.
8071 (wait_for_sigstop): Don't cancel finished single-step traps here.
8072 (linux_resume_one_lwp): Don't check for removed breakpoints.
8073 Don't set `step' on non-hardware step archs.
8074 (linux_set_resume_request): Ignore resume_stop requests if already
8075 stopping or stopped. Set the lwp's last_resume_kind.
8076 (resume_status_pending_p): Don't check for removed breakpoints.
8077 (need_step_over_p): New.
8078 (start_step_over): New.
8079 (finish_step_over): New.
8080 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8081 requests. Clear the thread's last reported target waitstatus.
8082 Don't use the `suspended' flag. Don't consider pending breakpoints.
8083 (linux_resume): Start a step-over if necessary.
8084 (proceed_one_lwp): New.
8085 (proceed_all_lwps): New.
8086 (unstop_all_lwps): New.
8087 * linux-low.h (struct lwp_info): Rewrite comment for the
8088 `suspended' flag. Add the `stop_pc' field. Delete the
8089 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8090 Add `'last_resume_kind' and `need_step_over' fields.
8091 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8092 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8093 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8094 (set_raw_breakpoint_at): New.
8095 (set_breakpoint_at): Rewrite to use it.
8096 (reinsert_breakpoint_handler): Delete.
8097 (set_reinsert_breakpoint): New.
8098 (reinsert_breakpoint_by_bp): Delete.
8099 (delete_reinsert_breakpoints): New.
8100 (uninsert_breakpoint): Rewrite.
8101 (uninsert_breakpoints_at): New.
8102 (reinsert_breakpoint): Rewrite.
8103 (reinsert_breakpoints_at): New.
8104 (check_breakpoints): Rewrite.
8105 (breakpoint_here): New.
8106 (breakpoint_inserted_here): New.
8107 (check_mem_read): Adjust.
8108 * mem-break.h (breakpoints_supported, breakpoint_here)
8109 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8110 (reinsert_breakpoint_by_bp): Delete declaration.
8111 (delete_reinsert_breakpoints): Declare.
8112 (reinsert_breakpoint): Delete declaration.
8113 (reinsert_breakpoints_at): Declare.
8114 (uninsert_breakpoint): Delete declaration.
8115 (uninsert_breakpoints_at): Declare.
8116 (check_breakpoints): Adjust prototype.
8117 * server.h: Adjust include order.
8118 (struct thread_info): Declare here. Add a `last_status' field.
8119
8120 2010-03-23 Michael Snyder <msnyder@vmware.com>
8121
8122 * server.c (crc32): New function.
8123 (handle_query): Add handling for 'qCRC:' request.
8124
8125 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8126
8127 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8128 lwp had been stopped by a watchpoint.
8129
8130 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8131
8132 * server.h (internal_error): Declare.
8133 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8134 * utils.c (internal_error): New function.
8135
8136 2010-03-15 Andreas Schwab <schwab@redhat.com>
8137
8138 * configure.srv: Fix typo setting srv_regobj.
8139
8140 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8141
8142 * linux-low.c (fetch_register): Avoid passing a non string literal
8143 format to `error'.
8144 (usr_store_inferior_registers): Ditto.
8145
8146 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8147
8148 * linux-low.c (linux_write_memory): Bail out early if peeking
8149 memory failed.
8150
8151 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8152
8153 * linux-low.h (struct lwp_info): New fields
8154 `stopped_by_watchpoint' and `stopped_data_address'.
8155 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8156 here, and cache them in the lwp object.
8157 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8158 directly.
8159 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8160 field.
8161 (linux_stopped_by_watchpoint): Rewrite.
8162 (linux_stopped_data_address): Rewrite.
8163
8164 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8165
8166 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8167 switching the current inferior, not before.
8168
8169 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8170
8171 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8172 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8173 i386-linux.c and amd64-linux.c.
8174 (reg-i386.o): Removed.
8175 (reg-i386.c): Likewise.
8176 (reg-i386-linux.o): Likewise.
8177 (reg-i386-linux.c): Likewise.
8178 (reg-x86-64.o): Likewise.
8179 (reg-x86-64.c): Likewise.
8180 (reg-x86-64-linux.o): Likewise.
8181 (reg-x86-64-linux.c): Likewise.
8182 (i386.o): New.
8183 (i386.c): Likewise.
8184 (i386-linux.o): Likewise.
8185 (i386-linux.c): Likewise.
8186 (amd64.o): Likewise.
8187 (amd64.c): Likewise.
8188 (amd64-linux.o): Likewise.
8189 (amd64-linux.c): Likewise.
8190
8191 * configure.srv (srv_i386_regobj): New.
8192 (srv_i386_linux_regobj): Likewise.
8193 (srv_amd64_regobj): Likewise.
8194 (srv_amd64_linux_regobj): Likewise.
8195 (srv_i386_32bit_xmlfiles): Likewise.
8196 (srv_i386_64bit_xmlfiles): Likewise.
8197 (srv_i386_xmlfiles): Likewise.
8198 (srv_amd64_xmlfiles): Likewise.
8199 (srv_i386_linux_xmlfiles): Likewise.
8200 (srv_amd64_linux_xmlfiles): Likewise.
8201 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8202 srv_xmlfiles to $srv_i386_xmlfiles.
8203 (i[34567]86-*-mingw32ce*): Likewise.
8204 (i[34567]86-*-mingw*): Likewise.
8205 (i[34567]86-*-nto*): Likewise.
8206 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8207 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8208 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8209 (x86_64-*-linux*): Likewise.
8210
8211 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8212 (init_registers_amd64_linux): New.
8213 (x86_arch_setup): Replace init_registers_x86_64_linux with
8214 init_registers_amd64_linux.
8215
8216 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8217
8218 * configure.ac: Check for libdl. If it is not available link against
8219 static libthread_db.
8220 * configure: Regenerate.
8221
8222 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8223
8224 PR9605
8225
8226 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8227 handing a read watchpoint.
8228 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8229
8230 2010-02-12 Doug Evans <dje@google.com>
8231
8232 * linux-low.c (linux_supports_tracefork_flag): Document.
8233 (linux_look_up_symbols): Add comment.
8234
8235 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8236
8237 * regcache.c (supply_register): Clear regcache if buf is NULL.
8238
8239 2010-02-02 Nicolas Roche <roche@sourceware.org>
8240 Joel Brobecker <brobecker@adacore.com>
8241
8242 * inferiors.c (find_inferior): Add function documentation.
8243 (unloaded_dll): Handle the case where the unloaded dll has not
8244 been previously registered in the dll list.
8245
8246 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8247
8248 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8249 (thumb2_breakpoint): New.
8250 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8251
8252 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8253
8254 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8255 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8256 breakpoints.
8257
8258 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8259
8260 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8261
8262 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8263
8264 * linux-s390-low.c (s390_collect_ptrace_register)
8265 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8266
8267 2010-01-21 Doug Evans <dje@google.com>
8268
8269 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8270 (PTRACE_ARG4_TYPE): New macro.
8271 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8272 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8273 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8274 (usr_store_inferior_registers): Ditto.
8275 (linux_read_memory, linux_write_memory): Ditto.
8276 (linux_test_for_tracefork): Ditto.
8277
8278 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8279 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8280
8281 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8282
8283 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8284 target.
8285
8286 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8287
8288 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8289 prototype to take a regcache. Adjust.
8290
8291 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8292
8293 * regcache.h (struct thread_info): Forward declare.
8294 (struct regcache): New.
8295 (new_register_cache): Adjust prototype.
8296 (get_thread_regcache): Declare.
8297 (free_register_cache): Adjust prototype.
8298 (registers_to_string, registers_from_string): Ditto.
8299 (supply_register, supply_register_by_name, collect_register)
8300 (collect_register_as_string, collect_register_by_name): Ditto.
8301 * regcache.c (struct inferior_regcache_data): Delete.
8302 (get_regcache): Rename to ...
8303 (get_thread_regcache): ... this. Adjust. Switch inferior before
8304 fetching registers.
8305 (regcache_invalidate_one): Adjust.
8306 (regcache_invalidate): Fix prototype.
8307 (new_register_cache): Return the new register cache.
8308 (free_register_cache): Change prototype.
8309 (realloc_register_cache): Adjust.
8310 (registers_to_string): Change prototype to take a regcache. Adjust.
8311 (registers_from_string): Ditto.
8312 (register_data): Ditto.
8313 (supply_register): Ditto.
8314 (supply_register_by_name): Ditto.
8315 (collect_register): Ditto.
8316 (collect_register_as_string): Ditto.
8317 (collect_register_by_name): Ditto.
8318 * server.c (process_serial_event): Adjust.
8319 * linux-low.h (regset_fill_func, regset_store_func): Change
8320 prototype.
8321 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8322 Change prototype.
8323 * linux-low.c (get_stop_pc): Adjust.
8324 (check_removed_breakpoint): Adjust.
8325 (linux_wait_for_event): Adjust.
8326 (linux_resume_one_lwp): Adjust.
8327 (fetch_register): Add regcache parameter. Adjust.
8328 (usr_store_inferior_registers): Ditto.
8329 (regsets_fetch_inferior_registers): Ditto.
8330 (regsets_store_inferior_registers): Ditto.
8331 (linux_fetch_registers, linux_store_registers): Ditto.
8332 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8333 regcache. Adjust.
8334 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8335 Ditto.
8336 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8337 prototype to take a regcache.
8338 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8339 * remote-utils.c (convert_ascii_to_int, outreg)
8340 (prepare_resume_reply): Change prototype to take a regcache.
8341 Adjust.
8342 * target.h (struct target_ops) <fetch_registers, store_registers>:
8343 Change prototype to take a regcache.
8344 (fetch_inferior_registers, store_inferior_registers): Change
8345 prototype to take a regcache. Adjust.
8346 * proc-service.c (ps_lgetregs): Adjust.
8347 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8348 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8349 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8350 take a regcache. Adjust.
8351 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8352 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8353 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8354 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8355 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8356 (cris_cannot_fetch_register):
8357 (cris_breakpoint_at): Change prototype to take a regcache.
8358 Adjust.
8359 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8360 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8361 to take a regcache. Adjust.
8362 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8363 Adjust.
8364 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8365 take a regcache. Adjust.
8366 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8367 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8368 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8369 * linux-mips-low.c (mips_get_pc):
8370 (mips_set_pc): Change prototype to take a regcache. Adjust.
8371 (mips_reinsert_addr): Adjust.
8372 (mips_collect_register): Change prototype to take a regcache.
8373 Adjust.
8374 (mips_supply_register):
8375 (mips_collect_register_32bit, mips_supply_register_32bit)
8376 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8377 (mips_store_fpregset): Ditto.
8378 * linux-ppc-low.c (ppc_supply_ptrace_register)
8379 (ppc_supply_ptrace_register): Ditto.
8380 (parse_spufs_run): Adjust.
8381 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8382 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8383 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8384 take a regcache. Adjust.
8385 * linux-s390-low.c (s390_collect_ptrace_register)
8386 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8387 (s390_set_pc): Change prototype to take a regcache. Adjust.
8388 (s390_arch_setup): Adjust.
8389 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8390 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8391 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8392 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8393 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8394 regcache. Adjust.
8395 (sparc_breakpoint_at): Adjust.
8396 * linux-xtensa-low.c (xtensa_fill_gregset):
8397 (xtensa_store_gregset):
8398 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8399 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8400 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8401 prototype to take a regcache. Adjust.
8402 * win32-arm-low.c (arm_fetch_inferior_register)
8403 (arm_store_inferior_register): Change prototype to take a
8404 regcache. Adjust.
8405 * win32-i386-low.c (i386_fetch_inferior_register)
8406 (i386_store_inferior_register): Change prototype to take a
8407 regcache. Adjust.
8408 * win32-low.c (child_fetch_inferior_registers)
8409 (child_store_inferior_registers): Change prototype to take a
8410 regcache. Adjust.
8411 (win32_wait): Adjust.
8412 (win32_fetch_inferior_registers): Change prototype to take a
8413 regcache. Adjust.
8414 (win32_store_inferior_registers): Adjust.
8415 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8416 store_inferior_register>: Change prototype to take a regcache.
8417
8418 2010-01-20 Doug Evans <dje@google.com>
8419
8420 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8421 #ifdef.
8422 (linux_wait_for_event1, linux_init_signals): Ditto.
8423 (W_STOPCODE): Provide definition if missing.
8424
8425 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8426
8427 * linux-low.c (linux_core_of_thread): New.
8428 (compare_ints, show_process, list_threads): New.
8429 (linux_qxfer_osdata): Report threads and cores.
8430 (linux_target_op): Register linux_core_of_thread.
8431 * remote-utils.c (prepare_resume_reply): Report the core.
8432 (buffer_xml_printf): Support %d specifier.
8433 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8434 New.
8435 (handle_query): Handle qXfer:threads. Announce availability
8436 thereof.
8437 * target.h (struct target_ops): New field core_of_thread.
8438
8439 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8440
8441 * Makefile.in (clean): Remove new generated files.
8442 (reg-s390.o, reg-s390.c): Remove rules.
8443 (reg-s390x.o, reg-s390x.c): Likewise.
8444 (s390-linux32.o, s390-linux32.c): Add rules.
8445 (s390-linux64.o, s390-linux64.c): Likewise.
8446 (s390x-linux64.o, s390x-linux64.c): Likewise.
8447 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8448 * linux-s390-low.c: Include <elf.h>.
8449 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8450 (init_registers_s390): Remove prototype.
8451 (init_registers_s390x): Likewise.
8452 (init_registers_s390_linux32): Add prototype.
8453 (init_registers_s390_linux64): Likewise.
8454 (init_registers_s390x_linux64): Likewise.
8455 (s390_num_regs_3264): New define.
8456 (s390_regmap_3264): New global variable.
8457 (s390_cannot_fetch_register): Remove obsolete check.
8458 (s390_cannot_store_register): Likewise.
8459 (s390_collect_ptrace_register): Handle upper/lower register halves.
8460 (s390_supply_ptrace_register): Likewise.
8461 (s390_fill_gregset): Update to register number changes.
8462 (s390_get_hwcap): New routine.
8463 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8464 Install appropriate regmap and register set.
8465
8466 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8467
8468 * server.c (gdbserver_version): Update copyright year to 2010.
8469 * gdbreplay.c (gdbreplay_version): Likewise.
8470
8471 2009-12-28 Doug Evans <dje@google.com>
8472
8473 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8474 elf/external.h. Include <elf.h> instead but only if necessary.
8475
8476 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8477
8478 * linux-low.c (linux_remove_process): Remove `detaching'
8479 parameter. Don't release/detach from thread_db here.
8480 (linux_kill): Release/detach from thread_db here, ...
8481 (linux_detach): ... and here, before actually detaching.
8482 (linux_wait_1): ... and here, when a process exits.
8483 * thread-db.c (any_thread_of): New.
8484 (thread_db_free): Switch the current inferior to a thread of the
8485 passed in process.
8486
8487 2009-12-21 Doug Evans <dje@google.com>
8488
8489 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8490
8491 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8492 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8493 warning ifndef __NR_tkill. Move setting of errno there too.
8494 Delete unnecessary resetting of errno after syscall.
8495 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8496
8497 * configure.ac: Check for dladdr.
8498 * config.in: Regenerate.
8499 * configure: Regenerate.
8500 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8501 (try_thread_db_load): Update.
8502
8503 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8504
8505 2009-12-18 Doug Evans <dje@google.com>
8506
8507 * event-loop.c: Include unistd.h if it exists.
8508
8509 * linux-low.c (my_waitpid): Move definition away from being in
8510 between linux_tracefork_child/linux_test_for_tracefork.
8511
8512 * gdb_proc_service.h (psaddr_t): Fix type.
8513 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8514 signature to match glibc.
8515
8516 2009-12-16 Doug Evans <dje@google.com>
8517
8518 * linux-low.c (linux_read_memory): Fix argument to read.
8519
8520 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8521
8522 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8523 events, don't leave current_inferior pointing at null.
8524
8525 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8526
8527 * win32-low.c (LOG): Delete.
8528 (OUTMSG): Output to stderr.
8529 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8530 on compile time LOG macro.
8531 (win32_wait): Fix debug output.
8532
8533 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8534
8535 * win32-low.c (win32_add_one_solib): If the dll name is
8536 "ntdll.dll", prepend the system directory to the dll path.
8537
8538 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8539
8540 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8541
8542 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8543 Vladimir Prus <vladimir@codesourcery.com>
8544
8545 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8546 * configure.ac: Check for __mcoldfire__ and set
8547 gdb_cv_m68k_is_coldfire.
8548 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8549 reg-cf.o and reg-m68k.o.
8550 * configure: Regenerated.
8551
8552 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8553
8554 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8555 Pass it to thread_db_free.
8556 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8557 proper `detaching' argument to linux_remove_process.
8558 * linux-low.h (thread_db_free): Add `detaching' parameter.
8559 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8560 to thread_db_free.
8561 (thread_db_free): Add `detaching' parameter. Only
8562 call td_ta_clear_event if detaching from process.
8563
8564 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8565
8566 * thread-db.c (thread_db_free): Fix typo.
8567
8568 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8569
8570 PR gdb/10838
8571 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8572
8573 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8574
8575 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8576 with an i686 compiler.
8577 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8578 needed.
8579 * configure: Rebuilt.
8580
8581 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8582
8583 PR gdb/10783
8584
8585 * server.c (handle_search_memory_1): Correct read_addr initialization
8586 in loop for searching subsequent chunks.
8587
8588 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8589
8590 * configure.ac: New --with-libthread-db option.
8591 * thread-db.c: Allow direct dependence on libthread_db.
8592 (thread_db_free): Adjust.
8593 * config.in: Regenerate.
8594 * configure: Likewise.
8595
8596 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8597
8598 PR gdb/10757
8599 * thread-db.c (attach_thread): New function.
8600 (maybe_attach_thread): Return success/failure.
8601 (find_new_threads_callback): Adjust.
8602 (thread_db_find_new_threads): Loop until no new threads.
8603
8604 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8605
8606 * proc-service.c (ps_lgetregs): Formatting.
8607
8608 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8609
8610 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8611 * configure.ac: Adjust.
8612 * linux-low.h (struct process_info_private): Move members to struct
8613 thread_db.
8614 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8615 * linux-low.c (linux_remove_process): Adjust.
8616 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8617 * server.c (handle_query): Move code ...
8618 (handle_monitor_command): ... here. New function.
8619 * target.h (struct target_ops): New member.
8620 * thread-db.c (struct thread_db): New.
8621 (libthread_db_search_path): New variable.
8622 (thread_db_create_event, thread_db_enable_reporting)
8623 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8624 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8625 (try_thread_db_load_1, dladdr_to_soname): New functions.
8626 (try_thread_db_load, thread_db_load_search): New functions.
8627 (thread_db_init): Search for libthread_db.
8628 (thread_db_free): New function.
8629 (thread_db_handle_monitor_command): Likewise.
8630 * config.in: Regenerate.
8631 * configure: Regenerate.
8632
8633 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8634
8635 * spu-low.c (spu_kill): Wait for inferior to terminate.
8636 Call clear_inferiors.
8637 (spu_detach): Call clear_inferiors.
8638
8639 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8640
8641 * aclocal.m4: Regenerate.
8642 * config.in: Likewise.
8643 * configure: Likewise.
8644
8645 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8646
8647 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8648 (parse_spufs_run): New function.
8649 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8650 (ppc_breakpoint_at): Handle SPU breakpoints.
8651
8652 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8653
8654 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8655 (SPUFS_MAGIC): Define.
8656 (spu_enumerate_spu_ids): New function.
8657 (linux_qxfer_spu): New function.
8658 (linux_target_ops): Install linux_qxfer_spu.
8659
8660 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8661
8662 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8663 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8664 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8665 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8666 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8667 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8668 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8669 (init_registers_powerpc_cell32l): Add prototype.
8670 (init_registers_powerpc_cell64l): Likewise.
8671 (ppc_arch_setup): Detect Cell/B.E. architecture.
8672
8673 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8674
8675 * Makefile.in (datarootdir): New variable.
8676
8677 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8678
8679 * linux-low.c (linux_write_memory): Update debugging output.
8680 * Makefile.in (clean): Add new descriptions.
8681 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8682 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8683 * configure.srv: Add new files for arm*-*-linux*.
8684 * linux-arm-low.c: Add new declarations.
8685 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8686 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8687 (HWCAP_VFPv3D16): New.
8688 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8689 instead of __IWMMXT__.
8690 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8691 (arm_arch_setup): New.
8692 (target_regsets): Remove #ifdef. Add VFP regset.
8693 (the_low_target): Use arm_arch_setup.
8694
8695 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8696
8697 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8698 the main thread again.
8699
8700 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8701
8702 Adding Neutrino gdbserver.
8703 * configure: Regenerated.
8704 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8705 * configure.srv (i[34567]86-*-nto*): New target.
8706 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8707 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8708 (nto_comctrl) [__QNX__]: New function.
8709 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8710
8711 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8712
8713 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8714 srv_tgtobj.
8715
8716 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8717 Pedro Alves <pedro@codesourcery.com>
8718
8719 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8720 don't support CONTEXT_EXTENDED_REGISTERS.
8721 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8722 (the_low_target): Install them.
8723 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8724 failing with ERROR_PIPE_NOT_CONNECTED.
8725
8726 2009-06-30 Doug Evans <dje@google.com>
8727 Pierre Muller <muller@ics.u-strasbg.fr>
8728
8729 Add h/w watchpoint support to x86-linux, win32-i386.
8730 * Makefile.in (SFILES): Add i386-low.c
8731 (i386_low_h): Define.
8732 (i386-low.o): Add dependencies.
8733 (linux-x86-low.o): Add i386-low.h dependency.
8734 (win32-i386-low.o): Ditto.
8735 * i386-low.c: New file.
8736 * i386-low.h: New file.
8737 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8738 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8739 * linux-low.c (linux_add_process): Initialize arch_private.
8740 (linux_remove_process): Free arch_private.
8741 (add_lwp): Initialize arch_private.
8742 (delete_lwp): Free arch_private.
8743 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8744 provided.
8745 * linux-low.h (process_info_private): New member arch_private.
8746 (lwp_info): New member arch_private.
8747 (linux_target_ops): New members new_process, new_thread,
8748 prepare_to_resume.
8749 (ptid_of): New macro.
8750 * linux-x86-low.c: Include stddef.h, i386-low.h.
8751 (arch_process_info): New struct.
8752 (arch_lwp_info): New struct.
8753 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8754 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8755 (i386_dr_low_get_status): New function.
8756 (x86_insert_point, x86_remove_point): New functions.
8757 (x86_stopped_by_watchpoint): New function.
8758 (x86_stopped_data_address): New function.
8759 (x86_linux_new_process, x86_linux_new_thread): New functions.
8760 (x86_linux_prepare_to_resume): New function.
8761 (the_low_target): Add entries for insert_point, remove_point,
8762 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8763 prepare_to_resume.
8764 * server.c (debug_hw_points): New global.
8765 (monitor_show_help): Document set debug-hw-points.
8766 (handle_query): Process "set debug-hw-points".
8767 * server.h (debug_hw_points): Declare.
8768 (paddress): Declare.
8769 * utils.c (NUMCELLS, CELLSIZE): New macros.
8770 (get_sell, xsnprintf, paddress): New functions.
8771 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8772 remove_point, stopped_by_watchpoint, stopped_data_address.
8773 * win32-i386-low.c: Include i386-low.h.
8774 (debug_reg_state): Replaces dr.
8775 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8776 (i386_dr_low_get_status): New function.
8777 (i386_insert_point, i386_remove_point): New functions.
8778 (i386_stopped_by_watchpoint): New function.
8779 (i386_stopped_data_address): New function.
8780 (i386_initial_stuff): Update.
8781 (get_thread_context,set_thread_context,i386_thread_added): Update.
8782 (the_low_target): Add entries for insert_point,
8783 remove_point, stopped_by_watchpoint, stopped_data_address.
8784 * win32-low.c (win32_insert_watchpoint): New function.
8785 (win32_remove_watchpoint): New function.
8786 (win32_stopped_by_watchpoint): New function.
8787 (win32_stopped_data_address): New function.
8788 (win32_target_ops): Add entries for insert_watchpoint,
8789 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8790 * win32-low.h (win32_target_ops): New members insert_point,
8791 remove_point, stopped_by_watchpoint, stopped_data_address.
8792
8793 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8794
8795 * server.c (process_serial_event): Re-return unsupported, not
8796 error, if the type isn't recognized. Re-allow supporting only
8797 insert or remove packets. Also call require_running for
8798 breakpoints. Add missing break statement to default case. Tidy.
8799 * target.h (struct target_ops): Rename insert_watchpoint to
8800 insert_point, and remove_watchpoint to remove_point.
8801
8802 * linux-low.h (struct linux_target_ops): Likewise.
8803 * linux-low.c (linux_insert_watchpoint): Rename to ...
8804 (linux_insert_point): ... this. Adjust.
8805 (linux_remove_watchpoint): Rename to ...
8806 (linux_remove_point): ... this. Adjust.
8807 (linux_target_ops): Adjust.
8808 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8809 (cris_insert_point): ... this.
8810 (cris_remove_watchpoint): Rename to ...
8811 (cris_remove_point): ... this.
8812 (the_low_target): Adjust.
8813
8814 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8815
8816 * server.c (handle_v_kill): Pass signal_pid to
8817 kill_inferior if multi_process is zero.
8818
8819 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8820
8821 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8822 * target.h (target_ops): Comment for *_watchpoint to make it clear
8823 the functions can get types '0' and '1'.
8824
8825 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8826
8827 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8828 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8829 * regcache.c (get_regcache): Likewise.
8830 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8831 * win32-low.c (child_fetch_inferior_registers): Remove check for
8832 regno 0.
8833
8834 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8835 Pedro Alves <pedro@codesourcery.com>
8836
8837 * target.h (struct target_ops) <supports_multi_process>: New
8838 callback.
8839 (target_supports_multi_process): New.
8840 * server.c (handle_query): Even if GDB reports support, only
8841 enable multi-process if the target also supports it. Report
8842 multi-process support only if the target backend supports it.
8843 * linux-low.c (linux_supports_multi_process): New function.
8844 (linux_target_ops): Install it as target_supports_multi_process
8845 callback.
8846
8847 2009-05-24 Doug Evans <dje@google.com>
8848
8849 Global renaming of find_thread_pid to find_thread_ptid.
8850 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8851 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8852 All callers updated.
8853
8854 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8855 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8856 directly.
8857
8858 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8859 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8860 (linux_resume_one_lwp): Ditto.
8861
8862 2009-05-23 Doug Evans <dje@google.com>
8863
8864 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8865 from struct inferior_list_entry * to struct lwp_info *.
8866 All callers updated.
8867
8868 2009-05-13 Doug Evans <dje@google.com>
8869
8870 * linux-x86-low.c: Don't include assert.h.
8871 (x86_siginfo_fixup): Use fatal, not assert.
8872 (x86_arch_setup): Fix comment.
8873
8874 2009-05-12 Doug Evans <dje@google.com>
8875
8876 Biarch support for i386/amd64 gdbserver.
8877 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8878 Add linux-x86-low.c.
8879 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8880 (linux-x86-low.o): Add.
8881 * linux-x86-64-low.c: Delete.
8882 * linux-i386-low.c: Delete.
8883 * linux-x86-low.c: New file.
8884 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8885 linux-x86-low.o.
8886 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8887 linux-x86-low.o.
8888 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8889 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8890 (linux_child_pid_to_exec_file): New function.
8891 (elf_64_header_p, elf_64_file_p): New functions.
8892 (siginfo_fixup): New function.
8893 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8894 give target a chance to convert layout.
8895 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8896 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8897
8898 2009-05-07 Doug Evans <dje@google.com>
8899
8900 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8901 (regsets_store_inferior_registers): Ditto.
8902
8903 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8904
8905 PR server/10048
8906
8907 * linux-low.c (must_set_ptrace_flags): Delete.
8908 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8909 of the global.
8910 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8911 `lwp->must_set_ptrace_flags' instead.
8912 (linux_wait_for_event_1): Set ptrace options here.
8913 (linux_wait_1): ... not here.
8914
8915 2009-04-30 Doug Evans <dje@google.com>
8916
8917 * inferiors.c (started_inferior_callback): New function.
8918 (attached_inferior_callback): New function.
8919 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8920 * server.c (print_started_pid, print_attached_pid): New functions.
8921 (detach_or_kill_for_exit): New function.
8922 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8923 * server.h (have_started_inferiors_p): Declare.
8924 (have_attached_inferiors_p): Declare.
8925
8926 * inferiors.c (remove_process): Fix memory leak, free process.
8927 * linux-low.c (linux_remove_process): New function.
8928 (linux_kill): Call it instead of remove_process.
8929 (linux_detach, linux_wait_1): Ditto.
8930
8931 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8932
8933 * configure.srv: Add x86 Windows CE target.
8934
8935 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8936
8937 * inferiors.c (get_thread_process): Make global.
8938 * server.h (get_thread_process): Add prototype.
8939 * thread-db.c (find_one_thread): Use get_thread_process
8940 instead of current_process.
8941 (thread_db_get_tls_address): Do not crash if called when
8942 thread layer is not yet initialized.
8943
8944 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8945
8946 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8947 * spu-low.c (current_tid): Rename to ...
8948 (current_ptid): ... this.
8949 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8950 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8951 ptid_get_lwp (current_ptid) instead of current_tid.
8952 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8953 instead of current_tid. Use find_process_pid to verify pid
8954 argument is valid. Pass proper argument to remove_process.
8955 (spu_thread_alive): Compare current_ptid instead of current_tid.
8956 (spu_resume): Likewise.
8957
8958 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8959
8960 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8961 variable.
8962
8963 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8964
8965 Implement the multiprocess extensions, and add linux multiprocess
8966 support.
8967
8968 * server.h (ULONGEST): Declare.
8969 (struct ptid, ptid_t): New.
8970 (minus_one_ptid, null_ptid): Declare.
8971 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8972 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8973 (struct inferior_list_entry): Change `id' type from unsigned from
8974 to ptid_t.
8975 (struct sym_cache, struct breakpoint, struct
8976 process_info_private): Forward declare.
8977 (struct process_info): Declare.
8978 (current_process): Declare.
8979 (all_processes): Declare.
8980 (initialize_inferiors): Declare.
8981 (add_thread): Adjust to use ptid_t.
8982 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8983 (add_process, remove_process, find_thread_pid): Declare.
8984 (find_inferior_id): Adjust to use ptid_t.
8985 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8986 (multi_process): Declare.
8987 (push_event): Adjust to use ptid_t.
8988 (read_ptid, write_ptid): Declare.
8989 (prepare_resume_reply): Adjust to use ptid_t.
8990 (clear_symbol_cache): Declare.
8991 * inferiors.c (all_processes): New.
8992 (null_ptid, minus_one_ptid): New.
8993 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8994 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8995 (add_thread): Change unsigned long to ptid. Remove gdb_id
8996 parameter. Adjust.
8997 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8998 (gdb_id_to_thread): Rename to ...
8999 (find_thread_pid): ... this. Change unsigned long to ptid.
9000 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9001 (loaded_dll, pull_pid_from_list): Adjust.
9002 (add_process, remove_process, find_process_pid)
9003 (get_thread_process, current_process, initialize_inferiors): New.
9004 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9005 (struct target_waitstatus) <related_pid>: Ditto.
9006 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9007 return type to int.
9008 (struct target_ops) <join>: Add `pid' argument.
9009 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9010 (struct target_ops) <wait>: Add `ptid' field. Change return type
9011 to ptid.
9012 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9013 (mywait): Add `ptid' argument. Change return type to ptid_t.
9014 (target_pid_to_str): Declare.
9015 * target.c (set_desired_inferior): Adjust to use ptids.
9016 (mywait): Add new `ptid' argument. Adjust.
9017 (target_pid_to_str): New.
9018 * mem-break.h (free_all_breakpoints): Declare.
9019 * mem-break.c (breakpoints): Delelete.
9020 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9021 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9022 to use per-process breakpoint list.
9023 (free_all_breakpoints): New.
9024 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9025 (symbol_cache, all_symbols_looked_up): Delete.
9026 (hexchars): New.
9027 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9028 read_ptid): New.
9029 (prepare_resume_reply): Change ptid argument's type from unsigned
9030 long to ptid_t. Adjust. Implement W;process and X;process.
9031 (free_sym_cache, clear_symbol_cache): New.
9032 (look_up_one_symbol): Adjust to per-process symbol cache. *
9033 * server.c (cont_thread, general_thread, step_thread): Change type
9034 to ptid_t.
9035 (attached): Delete.
9036 (multi_process): New.
9037 (last_ptid): Change type to ptid_t.
9038 (struct vstop_notif) <ptid>: Change type to ptid_t.
9039 (queue_stop_reply, push_event): Change `ptid' argument's type to
9040 ptid_t.
9041 (discard_queued_stop_replies): Add `pid' argument.
9042 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9043 changes. Don't reference the `attached' global.
9044 (attach_inferior): Adjust to mywait interface changes.
9045 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9046 features. Handle and report "multiprocess+". Handle
9047 "qAttached:PID".
9048 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9049 changes.
9050 (handle_v_kill): New.
9051 (handle_v_stopped): Adjust to use target_pid_to_str.
9052 (handle_v_requests): Allow multiple attaches and runs when
9053 multiprocess extensions are in effect. Handle "vKill".
9054 (myresume): Adjust to use ptids.
9055 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9056 (handle_status): Adjust to discard_queued_stop_replies interface
9057 change.
9058 (first_thread_of, kill_inferior_callback)
9059 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9060 (main): Call initialize_inferiors. Adjust to use ptids, killing
9061 and detaching from all inferiors. Handle multiprocess packet
9062 variants.
9063 * linux-low.h: Include gdb_proc_service.h.
9064 (struct process_info_private): New.
9065 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9066 <lwpid_of>: Use ptid_get_lwp.
9067 (get_lwp_thread): Adjust.
9068 (struct lwp_info): Add `dead' member.
9069 (find_lwp_pid): Declare.
9070 * linux-low.c (thread_db_active): Delete.
9071 (new_inferior): Adjust comment.
9072 (inferior_pid): Delete.
9073 (linux_add_process): New.
9074 (handle_extended_wait): Adjust.
9075 (add_lwp): Change unsigned long to ptid.
9076 (linux_create_inferior): Add process to processes table. Adjust
9077 to use ptids. Don't set new_inferior here.
9078 (linux_attach_lwp): Rename to ...
9079 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9080 it. Adjust to use ptids.
9081 (linux_attach_lwp): New.
9082 (linux_attach): Add process to processes table. Don't set
9083 new_inferior here.
9084 (struct counter): New.
9085 (second_thread_of_pid_p, last_thread_of_process_p): New.
9086 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9087 multiple processes.
9088 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9089 processes. Remove process from process table.
9090 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9091 to multiple processes.
9092 (any_thread_of): New.
9093 (linux_detach): Add `pid' argument, and handle it. Remove process
9094 from processes table.
9095 (linux_join): Add `pid' argument. Handle it.
9096 (linux_thread_alive): Change unsighed long argument to ptid_t.
9097 Consider dead lwps as not being alive.
9098 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9099 threads we're not interested in.
9100 (same_lwp, find_lwp_pid): New.
9101 (linux_wait_for_lwp): Change `pid' argument's type from int to
9102 ptid_t. Adjust.
9103 (linux_wait_for_event): Rename to ...
9104 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9105 from int to ptid_t. Adjust.
9106 (linux_wait_for_event): New.
9107 (linux_wait_1): Add `ptid' argument. Change return type to
9108 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9109 that exit from the process table.
9110 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9111 Adjust.
9112 (mark_lwp_dead): New.
9113 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9114 stopping all threads, mark its main lwp as dead.
9115 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9116 ptids.
9117 (fetch_register, usr_store_inferior_registers)
9118 (regsets_fetch_inferior_registers)
9119 (regsets_store_inferior_registers, linux_read_memory)
9120 (linux_write_memory): Inline `inferior_pid'.
9121 (linux_look_up_symbols): Adjust to use per-process
9122 `thread_db_active'.
9123 (linux_request_interrupt): Adjust to use ptids.
9124 (linux_read_auxv): Inline `inferior_pid'.
9125 (initialize_low): Don't reference thread_db_active.
9126 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9127 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9128 (ps_getpid): Return the pid of the current inferior.
9129 * thread-db.c (proc_handle, thread_agent): Delete.
9130 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9131 per-process data.
9132 (find_one_thread): Change argument type to ptid_t. Adjust to
9133 per-process data.
9134 (maybe_attach_thread): Adjust to per-process data and ptids.
9135 (thread_db_find_new_threads): Ditto.
9136 (thread_db_init): Ditto.
9137 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9138 processes table. Adjust to use ptids.
9139 (spu_kill, spu_detach): Adjust interface. Remove process from
9140 processes table.
9141 (spu_join, spu_thread_alive): Adjust interface.
9142 (spu_wait): Adjust interface. Remove process from processes
9143 table. Adjust to use ptids.
9144 * win32-low.c (current_inferior_tid): Delete.
9145 (current_inferior_ptid): New.
9146 (debug_event_ptid): New.
9147 (thread_rec): Take a ptid. Adjust.
9148 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9149 (child_delete_thread): Ditto.
9150 (do_initial_child_stuff): Add `attached' argument. Add process to
9151 processes table.
9152 (child_fetch_inferior_registers, child_store_inferior_registers):
9153 Adjust.
9154 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9155 (win32_attach): Pass 1 to do_initial_child_stuff.
9156 (win32_kill): Adjust interface. Remove process from processes
9157 table.
9158 (win32_detach): Ditto.
9159 (win32_join): Adjust interface.
9160 (win32_thread_alive): Take a ptid.
9161 (win32_resume): Adjust to use ptids.
9162 (get_child_debug_event): Ditto.
9163 (win32_wait): Adjust interface. Remove exiting process from
9164 processes table.
9165
9166 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9167
9168 Non-stop mode support.
9169
9170 * server.h (non_stop): Declare.
9171 (gdb_client_data, handler_func): Declare.
9172 (delete_file_handler, add_file_handler, start_event_loop):
9173 Declare.
9174 (handle_serial_event, handle_target_event, push_event)
9175 (putpkt_notif): Declare.
9176 * target.h (enum resume_kind): New.
9177 (struct thread_resume): Replace `step' field by `kind' field.
9178 (TARGET_WNOHANG): Define.
9179 (struct target_ops) <wait>: Add `options' argument.
9180 <supports_non_stop, async, start_non_stop>: New fields.
9181 (target_supports_non_stop, target_async): New.
9182 (start_non_stop): Declare.
9183 (mywait): Add `options' argument.
9184 * target.c (mywait): Add `options' argument. Print child exit
9185 notifications here.
9186 (start_non_stop): New.
9187 * server.c (non_stop, own_buf, mem_buf): New globals.
9188 (struct vstop_notif): New.
9189 (notif_queue): New global.
9190 (queue_stop_reply, push_event, discard_queued_stop_replies)
9191 (send_next_stop_reply): New.
9192 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9193 interface changes.
9194 (attach_inferior): In non-stop mode, don't wait for the target
9195 here.
9196 (handle_general_set): Handle QNonStop.
9197 (handle_query): When handling qC, return the current general
9198 thread, instead of the first thread of the list.
9199 (handle_query): If the backend supports non-stop mode, include
9200 QNonStop+ in the qSupported query response.
9201 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9202 and non-stop mode.
9203 (handle_v_attach, handle_v_run): Handle non-stop mode.
9204 (handle_v_stopped): New.
9205 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9206 (myresume): Adjust to use resume_kind. Handle non-stop.
9207 (queue_stop_reply_callback): New.
9208 (handle_status): Handle non-stop mode.
9209 (main): Clear non_stop flag on reconnection. Use the event-loop.
9210 Refactor serial protocol handling from here ...
9211 (process_serial_event): ... to this new function. When GDB
9212 selects any thread, select one here. In non-stop mode, wait until
9213 GDB acks all pending events before exiting.
9214 (handle_serial_event, handle_target_event): New.
9215 * remote-utils.c (remote_open): Install remote_desc in the event
9216 loop.
9217 (remote_close): Remove remote_desc from the event loop.
9218 (putpkt_binary): Rename to...
9219 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9220 (putpkt_binary): New as wrapper around putpkt_binary_1.
9221 (putpkt_notif): New.
9222 (prepare_resume_reply): In non-stop mode, don't change the
9223 general_thread.
9224 * event-loop.c: New.
9225 * Makefile.in (OBJ): Add event-loop.o.
9226 (event-loop.o): New rule.
9227
9228 * linux-low.h (pid_of): Moved here.
9229 (lwpid_of): New.
9230 (get_lwp_thread): Use lwpid_of.
9231 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9232 * linux-low.c (pid_of): Delete.
9233 (inferior_pid): Use lwpid_of.
9234 (linux_event_pipe): New.
9235 (target_is_async_p): New.
9236 (delete_lwp): New.
9237 (handle_extended_wait): Use lwpid_of.
9238 (add_lwp): Don't set lwpid field.
9239 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9240 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9241 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9242 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9243 first. Adjust to linux_wait_for_event interface changes. Use
9244 lwpid_of.
9245 (linux_detach): Don't delete the main lwp here.
9246 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9247 (status_pending_p): Don't consider explicitly suspended lwps.
9248 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9249 pointer. Add OPTIONS argument. Change return type to int. Use
9250 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9251 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9252 pointer. Add status pointer argument. Return a pid instead of a
9253 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9254 changes. In non-stop mode, don't switch to a random thread.
9255 (linux_wait): Rename to...
9256 (linux_wait_1): ... this. Add target_options argument, and handle
9257 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9258 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9259 clean exit and signal exit code. Don't stop all threads in
9260 non-stop mode. In all-stop mode, only stop all threads when
9261 reporting a stop to GDB. Handle explicit thread stop requests.
9262 (async_file_flush, async_file_mark): New.
9263 (linux_wait): New.
9264 (send_sigstop): Use lwpid_of.
9265 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9266 interface changes. In non-stop mode, don't switch to a random
9267 thread.
9268 (linux_resume_one_lwp): Use lwpid_of.
9269 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9270 (linux_resume_one_thread): ... this. Handle resume_stop. In
9271 non-stop mode, don't look for pending flag in all threads.
9272 (resume_status_pending_p): Don't consider explicitly suspended
9273 threads.
9274 (my_waitpid): Reimplement. Emulate __WALL.
9275 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9276 Use lwpid_of.
9277 (sigchld_handler, linux_supports_non_stop, linux_async)
9278 (linux_start_non_stop): New.
9279 (linux_target_ops): Register linux_supports_non_stop, linux_async
9280 and linux_start_non_stop.
9281 (initialize_low): Install SIGCHLD handler.
9282 * thread-db.c (thread_db_create_event, find_one_thread)
9283 (thread_db_get_tls_address): Use lwpid_of.
9284 * win32-low.c (win32_detach): Adjust to use resume_kind.
9285 (win32_wait): Add `options' argument.
9286 * spu-low.c (spu_resume): Adjust to use resume_kind.
9287 (spu_wait): Add `options' argument.
9288
9289 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9290
9291 Decouple target code from remote protocol.
9292
9293 * target.h (enum target_waitkind): New.
9294 (struct target_waitstatus): New.
9295 (struct target_ops) <wait>: Return an unsigned long. Take a
9296 target_waitstatus pointer instead of a char pointer.
9297 (mywait): Likewise.
9298 * target.c (mywait): Change prototype to return an unsigned long.
9299 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9300 * server.h (thread_from_wait, old_thread_from_wait): Delete
9301 declarations.
9302 (prepare_resume_reply): Change prototype to take a
9303 target_waitstatus.
9304 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9305 (last_status, last_ptid): New.
9306 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9307 pid instead of a signal.
9308 (attach_inferior): Remove "status" and "signal" parameters.
9309 Adjust.
9310 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9311 not as an address.
9312 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9313 (handle_v_requests, myresume): Remove "status" and "signal"
9314 parameters. Adjust.
9315 (handle_status): New.
9316 (main): Delete local `status'. Adjust.
9317 * remote-utils.c: Include target.h.
9318 (prepare_resume_reply): Change prototype to take a
9319 target_waitstatus. Adjust.
9320
9321 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9322 interface.
9323 * spu-low.c (spu_wait): Adjust.
9324 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9325 Delete.
9326 (win32_wait): Adjust.
9327
9328 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9329
9330 * target.h (struct thread_resume): Delete leave_stopped member.
9331 (struct target_ops): Add a `n' argument to the `resume' callback.
9332 * server.c (start_inferior): Adjust.
9333 (handle_v_cont, myresume): Adjust.
9334 * linux-low.c (check_removed_breakpoint): Adjust to resume
9335 interface change, and to removed leave_stopped field.
9336 (resume_ptr): Delete.
9337 (struct thread_resume_array): New.
9338 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9339 resume interface change.
9340 (linux_continue_one_thread, linux_queue_one_thread)
9341 (resume_status_pending_p): Check if the resume field is NULL
9342 instead of checking the leave_stopped member.
9343 (linux_resume): Adjust to the target resume interface change.
9344 * spu-low.c (spu_resume): Adjust to the target resume interface
9345 change.
9346 * win32-low.c (win32_detach, win32_resume): Ditto.
9347
9348 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9349
9350 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9351 flag.
9352 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9353 pending.
9354 (linux_continue_one_thread): Only preserve the stepping flag if
9355 there's a pending breakpoint.
9356
9357 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9358
9359 * server.c (main): After the inferior having exited, call
9360 remote_close before exiting gdbserver.
9361
9362 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9363
9364 Fix size of FPSCR in Power 7 processors.
9365 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9366 (PPC_FEATURE_HAS_DFP): New #define.
9367 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9368 size of the FPSCR.
9369
9370 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9371
9372 * server.c (handle_query) Whitespace and formatting.
9373
9374 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9375
9376 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9377 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9378 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9379 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9380 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9381 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9382 Makefile.in, configure.ac: Fix whitespace throughout.
9383 * configure: Regenerate.
9384
9385 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9386
9387 * inferiors.c (find_inferior): Make it safe for the callback
9388 function to delete the currently iterated inferior.
9389
9390 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9391
9392 * Makefile.in (linuw_low_h): Move higher.
9393 (thread-db.o): Depend on $(linux_low_h).
9394
9395 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9396
9397 Rename "process" to "lwp" throughout.
9398
9399 * linux-low.c (all_processes): Rename to...
9400 (all_lwps): ... this.
9401 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9402 (add_process): Rename to ...
9403 (add_lwp): ... this. Adjust.
9404 (linux_create_inferior): Adjust.
9405 (linux_attach_lwp): Adjust.
9406 (linux_attach): Adjust.
9407 (linux_kill_one_process): Rename to ...
9408 (linux_kill_one_lwp): ... this. Adjust.
9409 (linux_kill): Adjust.
9410 (linux_detach_one_process): Rename to ...
9411 (linux_detach_one_lwp): ... this. Adjust.
9412 (linux_detach): Adjust.
9413 (check_removed_breakpoint): Adjust.
9414 (status_pending_p): Adjust.
9415 (linux_wait_for_process): Rename to ...
9416 (linux_wait_for_lwp): ... this. Adjust.
9417 (linux_wait_for_event): Adjust.
9418 (send_sigstop): Adjust.
9419 (wait_for_sigstop): Adjust.
9420 (stop_all_processes): Rename to ...
9421 (stop_all_lwps): ... this.
9422 (linux_resume_one_process): Rename to ...
9423 (linux_resume_one_lwp): ... this. Adjust.
9424 (linux_set_resume_request, linux_continue_one_thread)
9425 (linux_queue_one_thread, resume_status_pending_p)
9426 (usr_store_inferior_registers, regsets_store_inferior_registers)
9427 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9428 Adjust.
9429 * linux-low.h (get_process): Rename to ...
9430 (get_lwp): ... this. Adjust.
9431 (get_thread_process): Rename to ...
9432 (get_thread_lwp): ... this. Adjust.
9433 (get_process_thread): Rename to ...
9434 (get_lwp_thread): ... this. Adjust.
9435 (struct process_info): Rename to ...
9436 (struct lwp_info): ... this.
9437 (all_processes): Rename to ...
9438 (all_lwps): ... this.
9439 * proc-service.c (ps_lgetregs): Adjust.
9440 * thread-db.c (thread_db_create_event, find_one_thread)
9441 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9442
9443 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9444
9445 * server.c (handle_query): Handle "qAttached".
9446
9447 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9448
9449 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9450 GPLv3, update license URL.
9451
9452 2009-03-01 Doug Evans <dje@google.com>
9453
9454 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9455 (server_h): Add gdb_signals.h.
9456 (signals.o): Update.
9457 * server.h (target_signal_from_host,target_signal_to_host_p)
9458 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9459
9460 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9461
9462 * remote-utils.c (getpkt): Also generate remote-debug
9463 information if noack_mode is set.
9464
9465 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9466
9467 * server.c (handle_query): Report qXfer:siginfo:read and
9468 qXfer:siginfo:write as supported and handle them.
9469 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9470 * linux-low.c (linux_xfer_siginfo): New.
9471 (linux_target_ops): Set it.
9472
9473 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9474
9475 * server.c (gdbserver_usage): Mention --remote-debug.
9476 (main): Accept '--remote-debug' switch.
9477
9478 2009-01-18 Doug Evans <dje@google.com>
9479
9480 * regcache.c (new_register_cache): No need to check result of xcalloc.
9481 * server.c (handle_search_memory): Back out calls to xmalloc,
9482 result is checked and error is returned to user upon failure.
9483 (handle_query): Ditto. Add more checks for result of malloc.
9484 (handle_v_cont): Check result of malloc, report error back to
9485 user upon failure.
9486 (handle_v_run): Ditto. Call freeargv.
9487 * server.h (freeargv): Declare.
9488 * utils.c (freeargv): New fn.
9489
9490 2009-01-15 Doug Evans <dje@google.com>
9491
9492 * gdbreplay.c (perror_with_name): Make arg const char *.
9493 * server.h (target_signal_to_name): Make return type const char *.
9494 * thread-db.c (thread_db_err_str): Make return type const char *.
9495 * utils.c (perror_with_name): Make arg const char *.
9496
9497 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9498
9499 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9500 when handling a EXIT_PROCESS_DEBUG_EVENT.
9501
9502 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9503
9504 * gdbreplay.c (gdbreplay_version): Update copyright year.
9505 * server.c (gdbserver_version): Likewise.
9506
9507 2009-01-05 Doug Evans <dje@google.com>
9508
9509 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9510 (handle_extended_wait): Improve comment.
9511
9512 2008-12-13 Doug Evans <dje@google.com>
9513
9514 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9515 * server.h (ATTR_MALLOC): New macro.
9516 (xmalloc,xcalloc,xstrdup): Declare.
9517 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9518 * inferiors.c: Ditto.
9519 * linux-low.c: Ditto.
9520 * mem-break.c: Ditto.
9521 * regcache.c: Ditto.
9522 * remote-utils.c: Ditto.
9523 * server.c: Ditto.
9524 * target.c: Ditto.
9525 * win32-low.c: Ditto.
9526
9527 2008-12-12 Doug Evans <dje@google.com>
9528
9529 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9530 in debugging printf.
9531
9532 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9533
9534 2008-12-09 Doug Evans <dje@google.com>
9535
9536 * linux-low.h (struct process_info): Delete member tid, unused.
9537 * thread-db.c (find_one_thread): Update.
9538 (maybe_attach_thread): Update.
9539
9540 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9541
9542 * target.h (struct target_ops): Add qxfer_osdata member.
9543 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9544 and dirent.h.
9545 (linux_qxfer_osdata): New functions.
9546 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9547 callback.
9548 * server.c (handle_query): Handle "qXfer:osdata:read:".
9549 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9550 (buffer_xml_printf): New functions.
9551 * server.h (struct buffer): New.
9552 (buffer_grow_str, buffer_grow_str0): New macros.
9553 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9554 (buffer_xml_printf): Declare.
9555
9556 2008-11-24 Doug Evans <dje@google.com>
9557
9558 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9559
9560 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9561
9562 * server.c (handle_v_run): Always use the supplied argument list.
9563
9564 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9565
9566 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9567 (xtensa_regmap_table): Add entry for scompare1.
9568
9569 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9570
9571 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9572 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9573 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9574 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9575 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9576 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9577 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9578 XML target descriptions.
9579 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9580 when inferior is running on an ISA 2.05 or later processor. Add
9581 special case to return offset for full 64-bit slot of FPSCR when
9582 in 32-bits.
9583
9584 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9585
9586 * Makefile.in (SFILES, clean): Added sparc64 files.
9587 (reg-sparc64.o, reg-sparc64.c): New.
9588 * configure.srv (sparc*-*-linux*): New configuration.
9589 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9590 syscall arguments for SPARC.
9591 (regsets_store_inferior_registers): Likewise.
9592 * linux-sparc-low.c: New file.
9593
9594 2008-10-21 Doug Evans <dje@google.com>
9595
9596 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9597 (READLINE_DIR,READLINE_DEP): Delete.
9598 (INTERNAL_CFLAGS): Update.
9599 (LINTFLAGS): Update.
9600
9601 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9602
9603 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9604 whole argv from the last run, not just argv[0].
9605
9606 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9607
9608 * regcache.c (new_register_cache): Return NULL if the register
9609 cache size isn't known yet.
9610 (free_register_cache): Avoid dereferencing a NULL regcache.
9611
9612 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * configure.srv: Merge MIPS and MIPS64.
9615
9616 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9617
9618 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9619
9620 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9621
9622 * Makefile.in: Add required vsx dependencies.
9623
9624 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9625 Declare init_registers_powerpc_vsx32l.
9626 Declare init_registers_powerpc_vsx64l.
9627 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9628 (ppc_arch_setup): Check for VSX in hwcap.
9629 (ppc_fill_vsxregset): New function.
9630 (ppc_store_vsxregset): New function.
9631 Add new VSX entry in regset_info target_regsets.
9632
9633 * configure.srv: Add new VSX dependencies.
9634
9635 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9636
9637 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9638 (remote_open): Set or clear transport_is_reliable.
9639 (putpkt_binary): Don't expect acks in noack mode.
9640 (getpkt): Don't send ack/nac in noack mode.
9641 * server.c (handle_general_set): Handle QStartNoAckMode.
9642 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9643 qSupported.
9644 (main): Reset noack_mode on every connection.
9645 * server.h (noack_mode): Declare.
9646
9647 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9648
9649 * Makefile.in (GDBREPLAY_OBS): New variable.
9650 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9651
9652 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9653 Daniel Jacobowitz <dan@codesourcery.com>
9654
9655 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9656 (usr_store_inferior_registers): Likewise.
9657 (regsets_store_inferior_registers): Likewise.
9658
9659 2008-07-31 Rolf Jansen <rj@surtec.com>
9660 Pedro Alves <pedro@codesourcery.com>
9661
9662 * configure.ac: Check for memmem declaration.
9663 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9664 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9665 (disable_packet_qfThreadInfo): Unconditionally compile.
9666 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9667 * configure, config.in: Regenerate.
9668
9669 2008-07-28 Doug Kwan <dougkwan@google.com>
9670
9671 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9672 (linux_write_memory): Remove declaration of errno.
9673
9674 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9675
9676 * linux-low.c (handle_extended_wait): Do not use "status"
9677 variable uninitialized.
9678
9679 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9680
9681 * server.c (handle_v_attach): Inhibit reporting dll changes.
9682
9683 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9684
9685 * remote-utils.c (prepare_resume_reply): If requested, don't
9686 output "thread:TID" in the T stop reply.
9687
9688 * server.c (disable_packet_vCont, disable_packet_Tthread)
9689 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9690 (handle_query): If requested, disable support for qC, qfThreadInfo
9691 and qsThreadInfo.
9692 (handle_v_requests): If requested, disable support for vCont.
9693 (gdbserver_show_disableable): New.
9694 (main): Handle --disable-packet and --disable-packet=LIST.
9695
9696 * server.h (disable_packet_vCont, disable_packet_Tthread)
9697 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9698
9699 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9700
9701 * server.c (gdbserver_usage): Mention --version.
9702
9703 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9704
9705 * Makefile.in (gdbreplay.o): New rule.
9706
9707 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9708
9709 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9710 message, not gdbserver.
9711
9712 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9713 Nathan Sidwell <nathan@codesourcery.com>
9714 Joseph Myers <joseph@codesourcery.com>
9715
9716 * acinclude.m4: Include ../../config/acx.m4.
9717 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9718 * configure, config.in: Regenerate.
9719 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9720 * server.c (gdbserver_version): Print PKGVERSION.
9721 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9722 (main): Adjust gdbserver_usage calls.
9723 * gdbreplay.c (version, host_name): Add declarations.
9724 (gdbreplay_version, gdbreplay_usage): New.
9725 (main): Accept --version and --help options.
9726
9727 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9728
9729 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9730 (arm_breakpoint_at): Handle Thumb.
9731 (the_low_target): Add comment.
9732
9733 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9734
9735 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9736
9737 2008-05-09 Doug Evans <dje@google.com>
9738
9739 * server.h (decode_search_memory_packet): Declare.
9740 * remote-utils.c (decode_search_memory_packet): New fn.
9741 * server.c (handle_search_memory_1): New fn.
9742 (handle_search_memory): New fn.
9743 (handle_query): Process qSearch:memory packets.
9744
9745 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9746
9747 * regcache.c (registers_length): Remove.
9748 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9749 full register packet.
9750 * regcache.h (registers_length): Remove prototype.
9751 * server.h (PBUFSIZ): Define to 16384.
9752
9753 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9754
9755 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9756 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9757 powerpc-64l.o, and powerpc-altivec64l.o.
9758 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9759 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9760 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9761 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9762 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9763 to srv_xmlfiles.
9764
9765 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9766 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9767 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9768 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9769 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9770 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9771 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9772 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9773 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9774 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9775 (clean): Update.
9776
9777 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9778 (init_registers_powerpc_32l): ... this new prototype.
9779 (init_registers_powerpc_32): Remove, replace by ...
9780 (init_registers_powerpc_altivec32l): ... this new prototype.
9781 (init_registers_powerpc_e500): Remove, replace by ...
9782 (init_registers_powerpc_e500l): ... this new prototype.
9783 (init_registers_ppc64): Remove, replace by ...
9784 (init_registers_powerpc_64l): ... this new prototype.
9785 (init_registers_powerpc_64): Remove, replace by ...
9786 (init_registers_powerpc_altivec64l): ... this new prototype.
9787 (ppc_num_regs): Set to 73.
9788 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9789 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9790 (ppc_cannot_store_register): Handle orig_r3 and trap.
9791 (ppc_arch_setup): Update init_registers_... calls.
9792 (ppc_fill_gregset): Handle orig_r3 and trap.
9793
9794 * inferiors.c (clear_inferiors): Reset current_inferior.
9795
9796 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9797
9798 * acinclude.m4: Add override.m4.
9799 * configure: Regenerate.
9800
9801 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9802
9803 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9804 initial call to init_register_ppc64.
9805
9806 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9807
9808 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9809 single powerpc*-*-linux* case.
9810 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9811
9812 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9813
9814 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9815 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9816 from reg_xmlfiles.
9817 * linux-ppc-low.c: Include <elf.h>.
9818 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9819 (ppc_hwcap): New global variable.
9820 (ppc_regmap): Remove __SPE__ #ifdef sections.
9821 (ppc_regmap_e500): New global variable.
9822 (ppc_cannot_store_register): Update __SPE__ special case.
9823 (ppc_get_hwcap): New function.
9824 (ppc_arch_setup): Use it to determine whether inferior supports
9825 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9826 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9827 Do not access registers if target does not support AltiVec.
9828 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9829 Do not access registers if target does not support SPE.
9830 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9831
9832 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * linux-low.c (disabled_regsets, num_regsets): New.
9835 (use_regsets_p): Delete.
9836 (linux_wait_for_process): Clear disabled_regsets.
9837 (regsets_fetch_inferior_registers): Check and set it.
9838 (regsets_store_inferior_registers): Likewise.
9839 (linux_fetch_registers, linux_store_registers): Do not use
9840 use_regsets_p.
9841 (initialize_low): Allocate disabled_regsets.
9842
9843 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * Makefile.in (LIBOBJS): New.
9846 (OBS): Use LIBOBJS.
9847 (memmem.o): New rule.
9848 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9849 * configure: Regenerated.
9850
9851 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9852
9853 * server.c (handle_query): Never return "unsupported" for
9854 qXfer:features:read queries.
9855
9856 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9857
9858 * server.c (get_features_xml): Fix inverted condition.
9859 (handle_query): Always support qXfer:feature:read.
9860
9861 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9862
9863 * server.c (wrapper_argv): New.
9864 (start_inferior): Handle wrapper_argv. If set, expect an extra
9865 trap.
9866 (gdbserver_usage): Document --wrapper.
9867 (main): Parse --wrapper.
9868
9869 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9870
9871 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9872 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9873 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9874 (ppc_set_pc): Likewise.
9875 (ppc_arch_setup): New function.
9876 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9877 of collect_register.
9878 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9879
9880 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9881
9882 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9883 instead of linux-ppc64-low.o.
9884 * linux-ppc64-low.c: Remove file.
9885 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9886 (linux-ppc64-low.o): Remove rule.
9887
9888 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9889 (init_registers_powerpc_64): Likewise.
9890 (ppc_regmap): Conditionally define depending on __powerpc64__.
9891 (ppc_cannot_store_register): Do not special-case "fpscr" when
9892 compiled on __powerpc64__.
9893 (ppc_collect_ptrace_register): New function.
9894 (ppc_supply_ptrace_register): New function.
9895 (ppc_breakpoint): Change type to "unsigned int".
9896 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9897 (the_low_target): Conditionally provide initializers for the
9898 arch_setup member depending on __powerpc64__. Install
9899 collect_ptrace_register and supply_ptrace_register members.
9900
9901 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9902
9903 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9904 * server.c (gdbserver_xmltarget): Define.
9905 (get_features_xml): Use it to replace "target.xml" and arch_string.
9906
9907 * configure.srv: Remove srv_xmltarget. Add XML files that were
9908 mentioned there to srv_xmlfiles instead. Remove conditional tests
9909 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9910 srv_xmlfiles and srv_regobj to include all possible choices.
9911 * configure.ac (srv_xmltarget): Remove.
9912 (srv_xmlfiles): Do not add "target.xml".
9913 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9914 checks for supplementary target information.
9915 * configure: Regenerate.
9916 * Makefile.in (XML_TARGET): Remove.
9917 (target.xml): Remove rule.
9918 (clean): Do not clean up target.xml.
9919 (.PRECIOUS): Do not mention target.xml.
9920
9921 * target.h (struct target_ops): Remove arch_string member.
9922 * linux-low.c (linux_arch_string): Remove.
9923 (linux_target_ops): Remove arch_string initializer.
9924 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9925 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9926 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9927 * spu-low.c (spu_arch_string): Remove.
9928 (spu_target_ops): Remove arch_string initializer.
9929 * win32-low.c (win32_arch_string): Remove.
9930 (win32_target_ops): Remove arch_string initializer.
9931 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9932 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9933 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9934
9935 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9936
9937 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9938 by collect_ptrace_register and supply_ptrace_register hooks.
9939 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9940 instead of checking for the_low_target.left_pad_xfer.
9941 (usr_store_inferior_registers): Use collect_ptrace_register callback
9942 instead of checking for the_low_target.left_pad_xfer.
9943
9944 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9945 (s390_supply_ptrace_register): Likewise.
9946 (s390_fill_gregset): Call s390_collect_ptrace_register.
9947 (the_low_target): Update.
9948
9949 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9950 (ppc_supply_ptrace_register): Likewise.
9951 (the_low_target): Update.
9952
9953 * linux-i386-low.c (the_low_target): Update.
9954 * linux-x86-64-low.c (the_low_target): Update.
9955
9956 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9957
9958 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9959 reg-s390.o and reg-s390x.o.
9960
9961 * linux-low.c (new_inferior): New global variable.
9962 (linux_create_inferior, linux_attach): Set it.
9963 (linux_wait_for_process): Call the_low_target.arch_setup after the
9964 target has stopped for the first time.
9965 (initialize_low): Do not call the_low_target.arch_setup.
9966
9967 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9968 (s390_set_pc): Likewise.
9969 (s390_arch_setup): New function.
9970 (the_low_target): Use s390_arch_setup as arch_setup routine.
9971
9972 * regcache.c (realloc_register_cache): New function.
9973 (set_register_cache): Call it for each existing regcache.
9974
9975 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9976
9977 * server.h (init_registers): Remove prototype.
9978
9979 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9980 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9981 instead of init_registers ().
9982 * linux-arm-low.c (init_registers_arm): Add prototype.
9983 (init_registers_arm_with_iwmmxt): Likewise.
9984 (the_low_target): Add initializer for arch_setup field.
9985 * linux-cris-low.c (init_registers_cris): Add prototype.
9986 (the_low_target): Add initializer for arch_setup field.
9987 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9988 (the_low_target): Add initializer for arch_setup field.
9989 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9990 (the_low_target): Add initializer for arch_setup field.
9991 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9992 (the_low_target): Add initializer for arch_setup field.
9993 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9994 (the_low_target): Add initializer for arch_setup field.
9995 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9996 (the_low_target): Add initializer for arch_setup field.
9997 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9998 (init_registers_mips64_linux): Likewise.
9999 (the_low_target): Add initializer for arch_setup field.
10000 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10001 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10002 (the_low_target): Add initializer for arch_setup field.
10003 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10004 (init_registers_powerpc_64): Likewise.
10005 (the_low_target): Add initializer for arch_setup field.
10006 * linux-s390-low.c (init_registers_s390): Add prototype.
10007 (init_registers_s390x): Likewise.
10008 (the_low_target): Add initializer for arch_setup field.
10009 * linux-sh-low.c (init_registers_sh): Add prototype.
10010 (the_low_target): Add initializer for arch_setup field.
10011 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10012 (the_low_target): Add initializer for arch_setup field.
10013 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10014 (the_low_target): Add initializer for arch_setup field.
10015
10016 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10017 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10018 instead of init_registers ().
10019 * win32-arm-low.c (init_registers_arm): Add prototype.
10020 (the_low_target): Add initializer for arch_setup field.
10021 * win32-i386-low.c (init_registers_i386): Add prototype.
10022 (the_low_target): Add initializer for arch_setup field.
10023
10024 * spu-low.c (init_registers_spu): Add prototype.
10025 (initialize_low): Call initialie_registers_spu () instead of
10026 initialize_registers ().
10027
10028 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10029
10030 * server.c (handle_v_requests): When handling the vRun and vAttach
10031 packets, if already debugging a process, don't kill it. Return an
10032 error instead.
10033
10034 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10035
10036 * server.c (handle_query): Correct length check.
10037
10038 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10039
10040 * win32-low.c (do_initial_child_stuff): Add process handle
10041 parameter. Set current_process_handle and current_process_id from the
10042 parameters. Clear globals.
10043 (win32_create_inferior): Don't set current_process_handle and
10044 current_process_id here. Instead pass them on the call to
10045 do_initial_child_stuff.
10046 (win32_attach): Likewise.
10047 (win32_clear_inferiors): New.
10048 (win32_kill): Don't close the current process handle or the
10049 current thread handle here. Instead call win32_clear_inferiors.
10050 (win32_detach): Don't open a new handle to the process. Call
10051 win32_clear_inferiors.
10052 (win32_join): Don't rely on current_process_handle; open a new
10053 handle using the process id.
10054 (win32_wait): Call win32_clear_inferiors when the inferior process
10055 has exited.
10056
10057 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10058
10059 * server.c (monitor_show_help): Add "exit".
10060
10061 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10062
10063 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10064 (clean): Add reg-xtensa.c.
10065 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10066 * configure.srv (xtensa*-*-linux*) New target.
10067 * linux-xtensa-low.c: New.
10068 * xtensa-xtregs.c: New.
10069
10070 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10071
10072 * hostio.c: Don't include errno.h.
10073 (errno_to_fileio_errno): Move to hostio-errno.
10074 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10075 error number outputting to the target->hostio_last_error callback.
10076 (hostio_packet_error): Use FILEIO_EINVAL directly.
10077 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10078 calls to hostio_error.
10079 * hostio-errno.c: New.
10080 * server.h (hostio_last_error_from_errno): Declare.
10081 * target.h (target_ops): Add hostio_last_error member.
10082 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10083 as hostio_last_error handler.
10084 * spu-low.c (spu_target_ops): Likewise.
10085 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10086 (wince_hostio_last_error): New functions.
10087 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10088 as hostio_last_error handler.
10089 (win32_target_ops) [!_WIN32_WCE]: Register
10090 hostio_last_error_from_errno as hostio_last_error handler.
10091 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10092 (hostio-errno.o): New rule.
10093 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10094 * configure.srv (srv_hostio_err_objs): New variable. Default to
10095 hostio-errno.o.
10096 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10097 * configure: Regenerate.
10098
10099 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10100
10101 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10102 (linux_kill, linux_detach): Clean up the process list.
10103 * remote-utils.c (remote_open): Improve port number parsing.
10104 (putpkt_binary, input_interrupt): Only send interrupts if the target
10105 is running.
10106 * server.c (extended_protocol): Make static.
10107 (attached): Define earlier.
10108 (exit_requested, response_needed, program_argv): New variables.
10109 (target_running): New.
10110 (start_inferior): Clear attached here.
10111 (attach_inferior): Set attached here.
10112 (require_running): Define.
10113 (handle_query): Use require_running and target_running. Implement
10114 "monitor exit".
10115 (handle_v_attach, handle_v_run): New.
10116 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10117 (gdbserver_usage): Update.
10118 (main): Redo argument parsing. Handle --debug and --multi. Handle
10119 --attach along with other options or after the port. Save
10120 program_argv. Support no initial program. Resynchronize
10121 communication with GDB after an error. Handle "monitor exit".
10122 Use require_running and target_running. Always allow the extended
10123 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10124 restart in extended mode.
10125 * README: Refer to the GDB manual. Update --attach usage.
10126
10127 2007-12-20 Andreas Schwab <schwab@suse.de>
10128
10129 * linux-low.c (STACK_SIZE): Define.
10130 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10131 (linux_test_for_tracefork): Likewise.
10132
10133 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10134
10135 * linux-low.c (linux_wait_for_event): Update messages. Do not
10136 reinsert auto-delete breakpoints.
10137 * mem-break.c (struct breakpoint): Change return type of handler to
10138 int.
10139 (set_breakpoint_at): Update handler type.
10140 (reinsert_breakpoint_handler): Return 1 instead of calling
10141 delete_breakpoint.
10142 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10143 setting a new one.
10144 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10145 * mem-break.h (set_breakpoint_at): Update handler type.
10146 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10147 * win32-low.c (auto_delete_breakpoint): New.
10148 (get_child_debug_event): Use it.
10149
10150 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10151
10152 * configure.ac: Check for pread and pwrite.
10153 * hostio.c (handle_pread): Fall back to lseek and read.
10154 (handle_pwrite): Fall back to lseek and write.
10155 * config.in, configure: Regenerated.
10156
10157 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10158
10159 * server.c (myresume): Add own_buf argument.
10160 (main): Update calls.
10161
10162 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10163
10164 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10165 * remote-utils.c (remote_open): Do not call disable_async_io.
10166 (block_async_io): Delete.
10167 (unblock_async_io): Make static.
10168 (initialize_async_io): New.
10169 * server.c (handle_v_cont): Handle async I/O here.
10170 (myresume): Likewise. Move other common resume tasks here...
10171 (main): ... from here. Call initialize_async_io. Disable async
10172 I/O before the main loop.
10173 * server.h (initialize_async_io): Declare.
10174 (block_async_io, unblock_async_io): Delete prototypes.
10175 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10176
10177 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10178
10179 * remote-utils.c (readchar): Allow binary data in received messages.
10180
10181 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10182
10183 * win32-low.c (attaching): New global.
10184 (win32_create_inferior): Clear the `attaching' global.
10185 (win32_attach): Set the `attaching' global.
10186 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10187 attaching. Only set a breakpoint at the entry point if not
10188 attaching.
10189
10190 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10191
10192 * server.c (main): Don't report dll events on the initial
10193 connection on attaches.
10194
10195 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10196
10197 * server.c (main): Relax numerical bases supported for the pid of
10198 the --attach command line argument.
10199
10200 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10201
10202 * win32-low.c (win32_attach): Call OpenProcess before
10203 DebugActiveProcess, not after. Add last error output to error
10204 call.
10205
10206 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10207
10208 * win32-low.c (win32_get_thread_context)
10209 (win32_set_thread_context): New functions.
10210 (thread_rec): Use win32_get_thread_context.
10211 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10212 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10213 field.
10214
10215 2007-12-03 Leo Zayas
10216 Pedro Alves <pedro_alves@portugalmail.pt>
10217
10218 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10219 global variables.
10220 (child_add_thread): Minor cleanup.
10221 (child_continue): Resume artificially suspended threads before
10222 calling ContinueDebugEvent.
10223 (suspend_one_thread): New.
10224 (fake_breakpoint_event): New.
10225 (get_child_debug_event): Change return type to int. Check here if
10226 gdb sent an interrupt request. If a soft interrupt was requested,
10227 fake a breakpoint event. Return 0 if there is no event to handle,
10228 and 1 otherwise.
10229 (win32_wait): Don't check here if gdb sent an interrupt request.
10230 Ensure there is a valid event to handle.
10231 (win32_request_interrupt): Add soft interruption method as last
10232 resort.
10233
10234 2007-12-03 Leo Zayas
10235 Pedro Alves <pedro_alves@portugalmail.pt>
10236
10237 * win32-low.h (win32_thread_info): Add descriptions to the
10238 structure members. Replace `suspend_count' counter by a
10239 `suspended' flag.
10240 * win32-low.c (thread_rec): Update condition of when to get the
10241 context from the inferior. Rely on ContextFlags being set if it
10242 has already been retrieved. Only suspend the inferior thread if
10243 we haven't already. Warn if that fails.
10244 (continue_one_thread): s/suspend_count/suspended/. Only call
10245 ResumeThread once. Warn if that fails.
10246
10247 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10248
10249 * win32-low.c (win32_wait): Don't read from the inferior when it
10250 has already exited.
10251
10252 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10253
10254 * Makefile.in (win32_low_h): New variable.
10255 (win32-low.o): Add dependency on $(win32_low_h).
10256 (win32-arm-low.o, win32-i386-low.o): New rules.
10257
10258 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * hostio.c: Correct copyright year.
10261
10262 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10263
10264 * Makefile.in (OBS): Add hostio.o.
10265 (hostio.o): New rule.
10266 * server.h (handle_vFile): Declare.
10267 * hostio.c: New file.
10268 * server.c (handle_v_requests): Take packet_len and new_packet_len
10269 for binary packets. Call handle_vFile.
10270 (main): Update call to handle_v_requests.
10271
10272 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * linux-low.c: Include <sched.h>.
10275
10276 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * linux-low.c (linux_tracefork_grandchild): New.
10279 (linux_tracefork_child): Use clone.
10280 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10281
10282 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10283
10284 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10285
10286 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10287
10288 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10289
10290 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10291
10292 * inferiors.c (change_inferior_id): Delete.
10293 (add_pid_to_list, pull_pid_from_list): New.
10294 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10295 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10296 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10297 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10298 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10299 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10300 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10301 (using_threads): Always set to 1.
10302 (handle_extended_wait): New.
10303 (add_process): Do not set TID.
10304 (linux_create_inferior): Set must_set_ptrace_flags.
10305 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10306 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10307 (linux_thread_alive): Rename TID argument to LWPID.
10308 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10309 (linux_wait_for_event): Do not use TID or check using_threads. Update
10310 call to dead_thread_notify. Call handle_extended_wait.
10311 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10312 (send_sigstop): Delete sigstop_sent.
10313 (wait_for_sigstop): Avoid TID.
10314 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10315 (linux_test_for_tracefork): New.
10316 (linux_lookup_signals): Use thread_db_active and
10317 linux_supports_tracefork_flag.
10318 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10319 * linux-low.h (get_process_thread): Avoid TID.
10320 (struct process_ifo): Move thread_known and tid to the end. Remove
10321 sigstop_sent.
10322 (linux_attach_lwp, thread_db_init): Update prototypes.
10323 * server.h (change_inferior_id): Delete prototype.
10324 (add_pid_to_list, pull_pid_from_list): New prototypes.
10325 * thread-db.c (thread_db_use_events): New.
10326 (find_first_thread): Rename to...
10327 (find_one_thread): ...this. Update callers and messages. Do not
10328 call fatal. Check thread_db_use_events. Do not call
10329 change_inferior_id or new_thread_notify.
10330 (maybe_attach_thread): Update. Do not call new_thread_notify.
10331 (thread_db_init): Set thread_db_use_events. Check use_events.
10332 * utils.c (fatal, warning): Correct message prefix.
10333
10334 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * Makefile.in (clean): Remove new files.
10337 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10338 (powerpc-64.o, powerpc-64.c): New rules.
10339 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10340 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10341 with SPE.
10342 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10343 SPE targets.
10344 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10345 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10346 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10347 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10348 (target_regsets): Add AltiVec and SPE register sets.
10349 * configure.ac: Check for AltiVec and SPE.
10350 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10351 (ppc_fill_vrregset, ppc_store_vrregset): New.
10352 (target_regsets): Add AltiVec register set.
10353 * configure: Regenerated.
10354
10355 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10356
10357 * linux-low.c (O_LARGEFILE): Define.
10358 (linux_read_memory): Use /proc/PID/mem.
10359 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10360 * configure, config.in: Regenerated.
10361
10362 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10363
10364 * linux-low.c (linux_wait_for_event): Do not pass signals while
10365 single-stepping.
10366
10367 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10368
10369 * win32-low.c (create_process): New.
10370 (win32_create_inferior): Use create_process instead of
10371 CreateProcess. If create_process failed retry appending an ".exe"
10372 suffix. Store the GetLastError result immediatelly after
10373 create_process calls and use it on the call to error.
10374
10375 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10376
10377 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10378
10379 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10380
10381 * configure.ac: Switch license to GPLv3.
10382
10383 2007-08-01 Michael Snyder <msnyder@access-company.com>
10384
10385 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10386
10387 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10388
10389 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10390 typedef.
10391 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10392 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10393 CloseToolhelp32Snapshot.
10394 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10395 CloseToolhelp32Snapshot.
10396
10397 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10398
10399 * server.c (main): Check for inferior exit before main loop.
10400
10401 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10402
10403 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10404 instead of on tmp_desc.
10405
10406 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10407 Daniel Jacobowitz <dan@codesourcery.com>
10408
10409 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10410 (add_thread): Minor cleanups.
10411 (clear_inferiors): Move lower in the file. Clear the DLL
10412 list.
10413 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10414 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10415 (xml_escape_text): New.
10416 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10417 for qSupported.
10418 (handle_v_cont): Report errors.
10419 (gdbserver_version): Update.
10420 (main): Correct size of own_buf. Do not report initial DLL events.
10421 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10422 (unloaded_dll, xml_escape_text): New.
10423 * win32-low.c (enum target_waitkind): Update comments.
10424 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10425 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10426 (win32_EnumProcessModules, win32_GetModuleInformation)
10427 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10428 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10429 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10430 (win32_Module32First, win32_Module32Next, load_toolhelp)
10431 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10432 (get_child_debug_event): Handle DLL events.
10433 (win32_wait): Likewise.
10434
10435 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10438 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10439
10440 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10441
10442 * win32-low.c (handle_output_debug_string): Ignore event if not
10443 waiting.
10444
10445 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10446
10447 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10448
10449 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10450
10451 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10452
10453 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10454
10455 * inferiors.c (change_inferior_id): Add comment.
10456 * linux-low.c (check_removed_breakpoint): Add an early
10457 prototype. Improve debug output.
10458 (linux_attach): Doc update.
10459 (linux_detach_one_process, linux_detach): Clean up before releasing
10460 each process.
10461 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10462 * linux-low.h (struct process_info): Doc improvement.
10463 * mem-break.c (delete_all_breakpoints): New.
10464 * mem-break.h (delete_all_breakpoints): New prototype.
10465 * thread-db.c (find_first_thread): New.
10466 (thread_db_create_event): Call it instead of
10467 thread_db_find_new_threads. Clean up unused variables.
10468 (maybe_attach_thread): Remove first thread handling.
10469 (thread_db_find_new_threads): Use find_first_thread.
10470 (thread_db_get_tls_address): Likewise.
10471
10472 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10473
10474 * thread-db.c (thread_db_find_new_threads): Add prototype.
10475 (thread_db_create_event): Check for the main thread before adding
10476 a new thread.
10477 (maybe_attach_thread): Only enable event reporting if TID == 0.
10478 (thread_db_get_tls_address): Check for new threads.
10479
10480 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10481
10482 * linux-low.c (linux_create_inferior): Try execv before execvp.
10483 * spu-low.c (spu_create_inferior): Likewise.
10484
10485 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10486
10487 * linux-low.c (linux_create_inferior): Change execv to execvp.
10488 * spu-low.c (spu_create_inferior): Likewies.
10489
10490 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10491
10492 * Makefile.in (clean): Clean new files instead of deleted ones.
10493 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10494 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10495 rules.
10496 * configure.srv: Specify XML files and new regformats for MIPS and
10497 MIPS64 GNU/Linux.
10498 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10499 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10500 an entry for the restart register.
10501 (mips_cannot_fetch_register, mips_cannot_store_register)
10502 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10503 register names to match the XML descriptions.
10504 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10505 restart register instead of $0.
10506
10507 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10508 Markus Deuling <deuling@de.ibm.com>
10509
10510 * remote-utils.c (decode_xfer_write): New function.
10511 * server.h (decode_xfer_write): Add prototype.
10512 * server.c (handle_query): Add PACKET_LEN argument. Support
10513 qXfer:spu:read and qXfer:spu:write packets.
10514 (main): Pass packet_len to handle_query.
10515 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10516 * target.h (target_ops): Add qxfer_spu.
10517
10518 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10519
10520 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10521 accessing non-seekable spufs files.
10522
10523 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10524
10525 * server.c (handle_query): Add reply for qC packet.
10526
10527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10528 Leo Zayas <lerele@champenstudios@com>
10529
10530 * server.h (check_remote_input_interrupt_request): New function.
10531 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10532 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10533 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10534 (check_remote_input_interrupt_request): New function.
10535 * server.h (check_remote_input_interrupt_request): Declare.
10536 * win32-low.c (winapi_DebugBreakProcess,
10537 winapi_GenerateConsoleCtrlEvent): New typedefs.
10538 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10539 to 250 ms.
10540 (win32_wait): Check for remote interrupt request
10541 with check_remote_input_interrupt_request.
10542 (win32_request_interrupt): New function.
10543 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10544
10545 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10546
10547 * win32-low.c (debug_registers_changed,
10548 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10549 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10550 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10551 (thread_rec): Get context using the low target.
10552 (child_add_thread): Call thread_added on the low target,
10553 which does the same thing.
10554 (regptr): Delete.
10555 (do_initial_child_stuff): Remove debug registers references.
10556 Set context using the low target. Resume threads after
10557 setting the contexts.
10558 (child_continue): Remove dead variable. Remove debug
10559 registers references.
10560 (child_fetch_inferior_registers): Go through the low target.
10561 (do_child_store_inferior_registers): Remove.
10562 (child_store_inferior_registers): Go through the low target.
10563 (win32_resume): Remove debug registers references.
10564 Set context using the low target.
10565 (handle_exception): Change return type to void. Don't record
10566 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10567 first chance exception.
10568 (get_child_debug_event): Change return type to void. Remove
10569 goto loop. Always return after waiting for debug event.
10570 (win32_wait): Convert to switch statement. Handle spurious
10571 events.
10572
10573 * win32-i386-low.c (debug_registers_changed,
10574 debug_registers_used): New.
10575 (initial_stuff): Rename to ...
10576 (i386_initial_stuff): ... this. Clear debug registers
10577 state variables.
10578 (store_debug_registers): Delete.
10579 (i386_get_thread_context): New.
10580 (load_debug_registers): Delete.
10581 (i386_set_thread_context): New.
10582 (i386_thread_added): New.
10583 (single_step): Rename to ...
10584 (i386_single_step): ... this.
10585 (do_fetch_inferior_registers): Rename to ...
10586 (i386_fetch_inferior_register): ... this.
10587 (i386_store_inferior_register): New.
10588 (the_low_target): Adapt to new interface.
10589
10590 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10591 (arm_get_thread_context): New.
10592 (arm_set_thread_context): New.
10593 (regptr): New.
10594 (do_fetch_inferior_registers): Rename to ...
10595 (arm_fetch_inferior_register): ... this.
10596 (arm_store_inferior_register): New.
10597 (arm_wince_breakpoint): Reimplement as unsigned long.
10598 (arm_wince_breakpoint_len): Define.
10599 (the_low_target): Adapt to new interface.
10600
10601 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10602 load_debug_registers. Add get_thread_context, set_thread_context,
10603 thread_added and store_inferior_register. Rename
10604 fetch_inferior_registers to fetch_inferior_register.
10605 (regptr): Remove declaration.
10606
10607 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10608
10609 * linux-low.c (linux_detach): Change return type to int. Return 0.
10610 * spu-low.c (spu_detach): Likewise.
10611
10612 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10613
10614 * target.h (target_ops): Change return type of detach to int.
10615 Add join.
10616 (join_inferior): New.
10617 * server.c (main): Don't skip detach support on mingw32.
10618 If the inferior doesn't support detaching return error.
10619 Call join_inferior instead of using waitpid.
10620 * linux-low.c (linux_join): New.
10621 (linux_target_op): Add linux_join.
10622 * spu-low.c (spu_join): New.
10623 (spu_target_ops): Add spu_join.
10624 * win32-low.c (win32_detach): Adapt to new interface.
10625 Reopen current_process_handle before detaching. Issue a child
10626 resume before detaching.
10627 (win32_join): New.
10628 (win32_target_op): Add win32_join.
10629
10630 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10631
10632 * win32-low.c (win32-attach): Fix return value.
10633 * target.h (target_ops): Describe ATTACH return values.
10634
10635 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10636
10637 * win32-low.c (GETPROCADDRESS): Define.
10638 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10639 (winapi_DebugSetProcessKillOnExit): Likewise.
10640 (win32_create_inferior): Force usage of ansi CreateProcessA.
10641 (win32_attach): Use GETPROCADDRESS.
10642 (win32_detach): Likewise.
10643
10644 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10645
10646 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10647
10648 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10649
10650 * win32-low.c: Commit leftover changes from 2007-03-29.
10651
10652 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10653
10654 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10655 fields short instead of int. Add explicit padding.
10656 (i387_cache_to_fsave): Remove unnecessary casts.
10657 (i387_fsave_to_cache): Doc fix.
10658 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10659
10660 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10661
10662 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10663 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10664
10665 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10666
10667 * configure.srv (arm*-*-mingw32ce*): Move near the other
10668 arm targets.
10669
10670 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10671
10672 * configure.ac: Add errno checking.
10673 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10674 sys/file.h and malloc.h.
10675 (AC_CHECK_DECLS): Add perror.
10676 (srv_mingwce): Handle.
10677 * configure.srv (i[34567]86-*-cygwin*): Add
10678 win32-i386-low.o to srv_tgtobj.
10679 (i[34567]86-*-mingw*): Likewise.
10680 (arm*-*-mingw32ce*): Add case.
10681 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10682 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10683 [__MINGW32CE__] (strerror): New function.
10684 [__MINGW32CE__] (errno): Define to GetLastError.
10685 [__MINGW32CE__] (COUNTOF): New macro.
10686 (remote_open): Remove extra close call.
10687 * mem-break.c (delete_breakpoint_at): New function.
10688 * mem-break.h (delete_breakpoint_at): Declare.
10689 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10690 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10691 [USE_WIN32API] (read, write): Add char* casts.
10692 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10693 * server.h: Include wincecompat.h on Windows CE.
10694 [HAVE_ERRNO_H]: Check.
10695 (perror): Declare if not declared.
10696 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10697 (perror_with_name): Remove errno declaration.
10698 * wincecompat.h: New.
10699 * wincecompat.c: New.
10700 * win32-low.h: New.
10701 * win32-arm-low.c: New.
10702 * win32-i386-low.c: New.
10703 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10704 (OUTMSG2): Make it safe.
10705 (_T): New macro.
10706 (COUNTOF): New macro.
10707 (NUM_REGS): Get it from the low target.
10708 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10709 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10710 (thread_rec): Let low target handle debug registers.
10711 (child_add_thread): Likewise.
10712 (child_init_thread_list): Likewise.
10713 (continue_one_thread): Likewise.
10714 (regptr): New.
10715 (do_child_fetch_inferior_registers): Move to ...
10716 * win32-i386-low.c: ... here, and rename to ...
10717 (do_fetch_inferior_registers): ... this.
10718 * win32-low.c (child_fetch_inferior_registers):
10719 Go through the low target.
10720 (do_child_store_inferior_registers): Use regptr.
10721 (strwinerror): New function.
10722 (win32_create_inferior): Handle Windows CE.
10723 Use strwinerror instead of strerror on Windows error
10724 codes. Add program to the error output.
10725 Don't close the main thread handle on Windows CE.
10726 (win32_attach): Use coredll.dll on Windows CE.
10727 (win32_kill): Close current process and current
10728 thread handles.
10729 (win32_detach): Use coredll.dll on Windows CE.
10730 (win32_resume): Let low target handle debug registers, and
10731 step request.
10732 (handle_exception): Add/Remove initial breakpoint. Avoid
10733 non-existant WSTOPSIG on Windows CE.
10734 (win32_read_inferior_memory): Cast to remove warning.
10735 (win32_arch_string): Go through the low target.
10736 (initialize_low): Call set_breakpoint_data with the low
10737 target's breakpoint.
10738 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10739 FOP_REGNUM, mappings): Move to ...
10740 * win32-i386-low.c: ... here.
10741 * win32-low.c (win32_thread_info): Move to ...
10742 * win32-low.h: ... here.
10743 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10744 win32-arm-low.c and wincecompat.c.
10745 (all:): Add $EXEEXT.
10746 (install-only:): Likewise.
10747 (gdbserver:): Likewise.
10748 (gdbreplay:): Likewise.
10749 * config.in: Regenerate.
10750 * configure: Regenerate.
10751
10752 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10753
10754 * win32-low.c: Rename typedef thread_info to
10755 win32_thread_info throughout.
10756
10757 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10758
10759 * win32-i386-low.c: Rename to ...
10760 * win32-low.c: ... this.
10761 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10762 * Makefile.in: Likewise.
10763
10764 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10765
10766 * remote-utils.c (monitor_output): Constify msg parameter.
10767 * server.h (monitor_output): Likewise.
10768 * win32-i386-low.c (handle_output_debug_string): New.
10769 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10770 handle_output_debug_string.
10771 (get_child_debug_event): Likewise.
10772
10773 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10774
10775 * server.c (main): Correct strtoul check.
10776
10777 2007-03-27 Jon Ringle <jon@ringle.org>
10778
10779 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10780
10781 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10782
10783 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10784
10785 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10786
10787 * terminal.h: Check HAVE_SGTTY_H.
10788
10789 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10790
10791 * remote-utils.c (remote_open): Print out the assigned port number.
10792
10793 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10794
10795 * remote-utils.c (monitor_output): New function.
10796 * server.c (debug_threads): Define here.
10797 (monitor_show_help): New function.
10798 (handle_query): Handle qRcmd.
10799 (main): Do not handle 'd' packet.
10800 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10801 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10802 of debug_threads.
10803
10804 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10805
10806 * Makefile.in (EXEEXT): New.
10807 (clean): Use $(EXEEXT).
10808
10809 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10810
10811 * target.h (target_ops): Rename send_signal to request_interrupt,
10812 and remove enum target_signal parameter.
10813 * linux-low.c (linux_request_interrupt): Rename from
10814 linux_send_signal, and always send SIGINT.
10815 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10816 and always send SIGINT.
10817 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10818 of send_signal.
10819 (input_interrupt): Likewise.
10820
10821 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10822
10823 * server.c (get_features_xml): Check if target implemented
10824 arch_string.
10825 * win32-i386-low.c (win32_arch_string): New.
10826 (win32_target_ops): Add win32_arch_string as arch_string member.
10827
10828 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10829
10830 * spu-low.c (spu_arch_string): New.
10831 (spu_target_ops): Add spu_arch_string.
10832
10833 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10834
10835 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10836 * configure.ac: Do not check for terminal.h.
10837 * configure, config.in: Regenerated.
10838
10839 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10840
10841 * Makefile.in (OBS): Add $(XML_BUILTIN).
10842 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10843 (clean): Update.
10844 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10845 (arm-with-iwmmxt.c): New.
10846 * config.in, configure: Regenerate.
10847 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10848 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10849 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10850 (arm*-*-linux*): Add iWMMXt and regset support.
10851 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10852 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10853 (arm_store_wmmxregset, target_regsets): New.
10854 * server.c (get_features_xml): Take annex argument. Check builtin
10855 XML documents.
10856 (handle_query): Handle multiple annexes.
10857
10858 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10859
10860 * remote-utils.c [USE_WIN32API] (read, write): Define.
10861 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10862 write.
10863
10864 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10865
10866 * linux-i386-low.c (the_low_target): Set arch_string.
10867 * linux-x86-64-low.c (the_low_target): Likewise.
10868 * linux-low.c (linux_arch_string): New.
10869 (linux_target_ops): Add it.
10870 * linux-low.h (struct linux_target_ops): Add arch_string.
10871 * server.c (write_qxfer_response): Use const void * for DATA.
10872 (get_features_xml): New.
10873 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10874 * target.h (struct target_ops): Add arch_string method.
10875
10876 2007-01-03 Denis Pilat <denis.pilat@st.com>
10877 Daniel Jacobowitz <dan@codesourcery.com>
10878
10879 * linux-low.c (linux_kill): Handle being called with no threads.
10880 * win32-i386-low.c (win32_kill): Likewise.
10881 (get_child_debug_event): Clear current_process_handle.
10882
10883 2006-12-30 Denis PILAT <denis.pilat@st.com>
10884 Daniel Jacobowitz <dan@codesourcery.com>
10885
10886 * remote-utils.c (remote_open): Check the type of specified
10887 serial port devices before opening them.
10888 * server.c (main): Kill the inferior if an error occurs during
10889 the first remote_open.
10890
10891 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10892
10893 * README: Update supported targets.
10894
10895 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10896
10897 * Makefile.in (clean): Remove reg-mips64.c.
10898 (reg-mips64.c, reg-mips64.o): New rules.
10899 * configure.srv: Handle mips64. Include regset support for mips.
10900 * linux-mips-low.c (union mips_register): New.
10901 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10902 (mips_breakpoint, mips_breakpoint_at): Use int.
10903 (mips_collect_register, mips_supply_register)
10904 (mips_collect_register_32bit, mips_supply_register_32bit)
10905 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10906 (mips_store_fpregset, target_regsets): New.
10907 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10908
10909 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10910
10911 * configure.srv: Add target "spu*-*-*".
10912 * Makefile.in (clean): Remove reg-spu.c.
10913 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10914 * spu-low.c: New file.
10915
10916 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * configure.ac: Correct td_thr_tls_get_addr test.
10919 * configure: Regenerated.
10920
10921 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10922
10923 * linux-low.c (linux_wait_for_event): Reformat. Use the
10924 pass_signals array.
10925 * remote-utils.c (decode_address_to_semicolon): New.
10926 * server.c (pass_signals, handle_general_set): New.
10927 (handle_query): Mention QPassSignals for qSupported.
10928 (main): Call handle_general_set.
10929 * server.h (pass_signals, decode_address_to_semicolon): New.
10930
10931 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10932
10933 * server.c (handle_query): Correct error handling for read_auxv.
10934
10935 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10936
10937 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10938 and srv_linux_thread_db to yes.
10939 * linux-s390-low.c (s390_fill_gregset): New function.
10940 (target_regsets): Define data structure.
10941
10942 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10943
10944 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10945 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10946 * config.in, configure: Regenerated.
10947 * inferiors.c (gdb_id_to_thread): New function.
10948 (gdb_id_to_thread_id): Use it.
10949 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10950 * linux-low.h (struct process_info): Add th member.
10951 (thread_db_get_tls_address): New prototype.
10952 * remote-utils.c (decode_address): Make non-static.
10953 * server.c (handle_query): Handle qGetTLSAddr.
10954 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10955 * target.h (struct target_ops): Add get_tls_address.
10956 * thread-db.c (maybe_attach_thread): Save the thread handle.
10957 (thread_db_get_tls_address): New.
10958
10959 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10960
10961 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10962 (linux_resume_one_process): Take a siginfo_t *. Update all
10963 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10964 (struct pending_signals): Add a siginfo_t.
10965 (linux_wait_for_process): Always set last_status.
10966 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10967 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10968 * linux-low.h (struct process_info): Add last_status.
10969
10970 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10971
10972 * remote-utils.c (try_rle): New function.
10973 (putpkt_binary): Use it.
10974
10975 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10976
10977 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10978 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10979 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10980 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10981 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10982 point registers.
10983
10984 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10985
10986 * server.c (terminal_fd): New variable.
10987 (old_foreground_pgrp): Likewise.
10988 (restore_old_foreground_pgrp): New function.
10989 (start_inferior): Record the terminal file descriptor in terminal_fd
10990 and its original foreground group in old_foreground_pgrp. Register
10991 restore_old_foreground_pgrp with atexit().
10992
10993 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10994
10995 * server.c (handle_query): Correct qPart to qXfer.
10996
10997 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10998
10999 * configure.ac: Check for more headers which are missing on
11000 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11001 * configure.srv: Add Cygwin and mingw32.
11002 * remote-utils.c: Don't include headers unconditionally which
11003 are missing on mingw32. Include <winsock.h> for mingw32.
11004 (remote_open): Adjust for mingw32 support. Flush
11005 standard error after writing to it.
11006 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11007 (unblock_async_io, enable_async_io, disable_async_io)
11008 (readchar, getpkt): Update for Winsock support.
11009 (prepare_resume_reply): Expect a protocol signal number.
11010 * server.c: Disable <sys/wait.h> on mingw32.
11011 (start_inferior): Adjust for mingw32 support. Flush
11012 standard error after writing to it.
11013 (attach_inferior): Likewise. Use protocol signal
11014 numbers.
11015 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11016 and names.
11017 * win32-i386-low.c: New file.
11018 * Makefile.in (XM_CLIBS): Set.
11019 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11020 (win32-i386-low.o): New dependency rule.
11021 * linux-low.c (linux_wait): Use target signal numbers.
11022 * target.h (struct target_ops): Doc fix.
11023 * server.h (target_signal_to_name): New prototype.
11024 * gdbreplay.c: Don't include headers unconditionally which
11025 are missing on mingw32. Include <winsock.h> for mingw32.
11026 (remote_close, remote_open): Adjust for Winsock support.
11027 * configure, config.in: Regenerated.
11028
11029 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11030
11031 * server.c (decode_xfer_read, write_qxfer_response): New.
11032 (handle_query): Take a packet length argument. Handle
11033 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11034 the qSupported response.
11035 (main): Update call to handle_query.
11036
11037 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11038
11039 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11040 (putpkt_binary): Renamed from putpkt and adjusted for binary
11041 data.
11042 (putpkt): New wrapper for putpkt_binary.
11043 (readchar): Don't mask off the high bit.
11044 (decode_X_packet): New function.
11045 * server.c (main): Call putpkt_binary if a handler sets the packet
11046 length. Save the length of the incoming packet. Handle 'X'.
11047 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11048
11049 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11050
11051 * server.c (handle_query): Handle qSupported.
11052
11053 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11054
11055 * remote-utils.c (all_symbols_looked_up): New variable.
11056 (look_up_one_symbol): Check it.
11057 * server.h (look_up_one_symbol): New declaration.
11058 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11059
11060 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11061
11062 * Makefile.in (linux-arm-low.o): Update dependencies.
11063 * linux-arm-low.c: Include "gdb_proc_service.h".
11064 (PTRACE_GET_THREAD_AREA): Define.
11065 (ps_get_thread_area): New function.
11066
11067 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11068
11069 * configure.srv (m68k*-*-uclinux*): New target.
11070 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11071 (linux_resume_one_process): Remove extraneous cast.
11072 (linux_read_offsets): New.
11073 (linux_target_op): Add linux_read_offsets on mmuless systems.
11074 * server.c (handle_query): Add qOffsets logic.
11075 * target.h (struct target_ops): Add read_offsets.
11076
11077 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11078
11079 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11080 (PTRACE_GET_THREAD_AREA): Define.
11081 (ps_get_thread_area): New function.
11082 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11083 (linux-x86-64-low.o): Update.
11084
11085 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11086
11087 * configure.ac: Remove checks for prfpregset_t.
11088 * gdb_proc_service.h: New file.
11089 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11090 new "gdb_proc_service.h".
11091 * proc-service.c: Likewise.
11092 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11093 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11094 * Makefile.in (gdb_proc_service_h): Updated.
11095 * configure, config.in: Regenerated.
11096
11097 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11098
11099 * remote-utils.c (prepare_resume_reply): Move declaration
11100 of gdb_id_from_wait to the top of the block.
11101
11102 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11103
11104 * linux-low.c (regsets_store_inferior_registers): Read the regset
11105 from the target before filling it.
11106
11107 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * server.c (attach_inferior): Return SIGTRAP for a successful
11110 attach.
11111
11112 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11113
11114 * Makefile.in (OBS): Add version.o.
11115 (STAGESTUFF): Delete.
11116 (version.o): Add dependencies.
11117 (version.c): Replace rule.
11118 (clean): Remove version.c.
11119 * server.c (gdbserver_version): New.
11120 (gdbserver_usage): Use printf.
11121 (main): Handle --version and --help.
11122 * server.h (version, host_name): Add declarations.
11123
11124 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11125
11126 * linux-arm-low.c:
11127 * linux-arm-low.c:
11128 * inferiors.c:
11129 * i387-fp.h:
11130 * i387-fp.c:
11131 * gdbreplay.c:
11132 * regcache.c:
11133 * proc-service.c:
11134 * mem-break.h:
11135 * mem-break.c:
11136 * linux-x86-64-low.c:
11137 * linux-sh-low.c:
11138 * linux-s390-low.c:
11139 * linux-ppc64-low.c:
11140 * linux-ppc-low.c:
11141 * linux-mips-low.c:
11142 * linux-m68k-low.c:
11143 * linux-m32r-low.c:
11144 * linux-low.h:
11145 * linux-low.c:
11146 * linux-ia64-low.c:
11147 * linux-i386-low.c:
11148 * linux-crisv32-low.c:
11149 * thread-db.c:
11150 * terminal.h:
11151 * target.h:
11152 * target.c:
11153 * server.h:
11154 * server.c:
11155 * remote-utils.c:
11156 * regcache.h:
11157 * utils.c:
11158 * Makefile.in:
11159 * configure.ac:
11160 * gdbserver.1: Add (C) after Copyright. Update the FSF
11161 address.
11162
11163 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11164
11165 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11166 (arm_breakpoint_at): Recognize both breakpoints.
11167 (the_low_target): Use the correct breakpoint instruction.
11168
11169 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11170
11171 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11172 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11173 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11174 (the_low_target): Update.
11175
11176 2005-10-25 Andreas Schwab <schwab@suse.de>
11177
11178 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11179
11180 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11181 (ia64_num_regs): Reduce to 462.
11182
11183 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11184
11185 * acinclude.m4: Correct quoting.
11186 * aclocal.m4: Regenerated.
11187
11188 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11189 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11190 (thread_db_init): Call thread_db_err_str.
11191 * configure.ac: Check for TD_VERSION.
11192 * config.in, configure: Regenerated.
11193
11194 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11195
11196 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11197
11198 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11199
11200 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11201 is not available. Define HAVE_PTRACE_GETREGS if it is.
11202 * config.in, configure: Regenerated.
11203 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11204 * linux-i386-low.c, linux-m68k-low.c: Update to use
11205 HAVE_PTRACE_GETREGS.
11206 * linux-low.c (regsets_fetch_inferior_registers)
11207 (regsets_store_inferior_registers): Only return 0 if we processed
11208 GENERAL_REGS.
11209 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11210 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11211
11212 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11213
11214 * inferiors.c (struct thread_info): Add gdb_id.
11215 (add_thread): Add gdb_id argument.
11216 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11217 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11218 calls to add_thread.
11219 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11220 * server.c (handle_query): Use thread_to_gdb_id.
11221 (handle_v_cont, main): Use gdb_id_to_thread_id.
11222 * server.h (add_thread): Update prototype.
11223 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11224 prototypes.
11225
11226 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11227
11228 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11229 left-padded registers.
11230 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11231 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11232
11233 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11234
11235 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11236 * configure: Regenerate.
11237 * config.in: Regenerate.
11238 * server.h (NEED_DECLARATION_STRERROR):
11239 Replace with !HAVE_DECL_STRERROR.
11240
11241 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11242
11243 * linux-low.c (linux_wait, linux_send_signal): Don't test
11244 an unsigned long variable for > 0 if it could be MAX_ULONG.
11245 * server.c (myresume): Likewise.
11246 * target.c (set_desired_inferior): Likewise.
11247
11248 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11249
11250 * configure.ac: Simplify and improve check for socklen_t.
11251 * configure, config.in: Regenerate.
11252
11253 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11254
11255 * acconfig.h: Remove.
11256 * configure.ac: Add a test for socklen_t. Use three-argument
11257 AC_DEFINE throughout.
11258 * config.in: Regenerated using autoheader 2.59.
11259 * configure: Regenerated.
11260
11261 * gdbreplay.c (socklen_t): Provide a default.
11262 (remote_open): Use socklen_t.
11263 * remote-utils.c (socklen_t): Provide a default.
11264 (remote_open): Use socklen_t.
11265 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11266 unsigned char.
11267
11268 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11269 char for buffers.
11270 * linux-low.c (linux_read_memory, linux_write_memory)
11271 (linux_read_auxv): Likewise.
11272 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11273 (check_mem_write): Likewise.
11274 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11275 Likewise.
11276 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11277 (registers_from_string, register_data): Likewise.
11278 * server.c (handle_query, main): Likewise.
11279 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11280 (decode_M_packet): Likewise.
11281 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11282 * target.h (struct target_ops): Update read_memory, write_memory,
11283 and read_auxv.
11284 (read_inferior_memory, write_inferior_memory): Update.
11285 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11286 to unsigned char *.
11287 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11288 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11289 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11290 linux-s390-low.c, linux-sh-low.c: Update for changes in
11291 read_inferior_memory and the_low_target->breakpoint.
11292
11293 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11294
11295 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11296 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11297 * configure.srv: Add powerpc64-*-linux*.
11298 * linux-ppc64-low.c: New file.
11299
11300 2005-05-23 Orjan Friberg <orjanf@axis.com>
11301
11302 * linux-cris-low.c: New file with support for CRIS.
11303 * linux-crisv32-low.c: Ditto for CRISv32.
11304 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11305 (clean): Add reg-cris.c and reg-crisv32.c.
11306 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11307 reg-crisv32.o, and reg-crisv32.c to make rules.
11308 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11309 recognized targets.
11310
11311 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11312
11313 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11314 of sizeof (PTRACE_XFER_TYPE).
11315 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11316
11317 2005-05-12 Orjan Friberg <orjanf@axis.com>
11318
11319 * target.h (struct target_ops): Add insert_watchpoint,
11320 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11321 pointers for hardware watchpoint support.
11322 * linux-low.h (struct linux_target_ops): Ditto.
11323 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11324 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11325 to linux_target_ops.
11326 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11327 reply packet.
11328 * server.c (main): Recognize 'Z' and 'z' packets.
11329
11330 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11331
11332 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11333 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11334 (the_low_target): Add new members.
11335
11336 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11337
11338 * proc-service.c (ps_lgetregs): Search all_processes instead of
11339 all_threads.
11340
11341 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11342
11343 * server.c (start_inferior): Change return type to int.
11344 (attach_inferior): Change sigptr to int *.
11345 (handle_v_cont, handle_v_requests): Change signal to int *.
11346 (main): Change signal to int.
11347
11348 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11349
11350 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11351 * configure.srv: Add m32r*-*-linux*.
11352 * linux-m32r-low.c: New file.
11353
11354 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11355
11356 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11357
11358 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11359
11360 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11361 Take unsigned long arguments for PIDs.
11362 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11363 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11364 (wait_for_sigstop, linux_resume_one_process)
11365 (regsets_fetch_inferior_registers, linux_send_signal)
11366 (linux_read_auxv): Likewise. Update the types of variables holding
11367 PIDs. Update format string specifiers.
11368 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11369 * remote-utils.c (prepare_resume_reply): Likewise.
11370 * server.c (cont_thread, general_thread, step_thread)
11371 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11372 unsigned long.
11373 (handle_query): Update format specifiers.
11374 (handle_v_cont, main): Use strtoul for thread IDs.
11375 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11376 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11377 (general_thread, step_thread, thread_from_wait)
11378 (old_thread_from_wait): Update.
11379 * target.h (struct thread_resume): Use unsigned long for THREAD.
11380 (struct target_ops): Use unsigned long for arguments to attach and
11381 thread_alive.
11382
11383 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11384
11385 * acinclude.m4: Include bfd/bfd.m4 directly.
11386 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11387 <agriffis@toolchain.org>.
11388 * aclocal.m4, configure: Regenerated.
11389
11390 2005-01-07 Andrew Cagney <cagney@gnu.org>
11391
11392 * configure.ac: Rename configure.in, require autoconf 2.59.
11393 * configure: Re-generate.
11394
11395 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11396
11397 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11398 LIBS when finished.
11399 * aclocal.m4: Regenerated.
11400 * configure: Regenerated.
11401
11402 2004-11-21 Andreas Schwab <schwab@suse.de>
11403
11404 * linux-m68k-low.c (m68k_num_gregs): Define.
11405 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11406 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11407 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11408 (m68k_breakpoint_at): New. Add to the_low_target.
11409
11410 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11411 srv_linux_thread_db to yes.
11412
11413 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11414
11415 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11416 (ARCH_SET_FS): Likewise.
11417 (ARCH_GET_FS): Likewise.
11418 (ARCH_GET_GS): Likewise.
11419
11420 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11421
11422 * linux-i386-low.c (ps_get_thread_area): New.
11423 * linux-x86-64-low.c (ps_get_thread_area): New.
11424 * linux-low.c: Include <sys/syscall.h>.
11425 (linux_kill_one_process): Don't kill the first thread here.
11426 (linux_kill): Kill the first thread here.
11427 (kill_lwp): New function.
11428 (send_sigstop, linux_send_signal): Use it.
11429 * proc-service.c: Clean up #ifdefs.
11430 (fpregset_info): Delete.
11431 (ps_lgetregs): Update and enable implementation.
11432 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11433 implementations.
11434 * remote-utils.c (struct sym_cache, symbol_cache): New.
11435 (input_interrupt): Print a clearer message.
11436 (async_io_enabled): New variable.
11437 (enable_async_io, disable_async_io): Use it. Update comments.
11438 (look_up_one_symbol): Use the symbol cache.
11439 * thread-db.c (thread_db_look_up_symbols): New function.
11440 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11441
11442 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11443
11444 * configure.in: Test for -rdynamic.
11445 * configure: Regenerated.
11446 * Makefile (INTERNAL_LDFLAGS): New.
11447 (gdbserver, gdbreplay): Use it.
11448
11449 2004-09-02 Andrew Cagney <cagney@gnu.org>
11450
11451 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11452
11453 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11454
11455 * linux-low.c (linux_wait): Clear all_processes list also.
11456
11457 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11458
11459 * linux-low.c: Include <errno.h>. Remove extern declaration of
11460 errno.
11461
11462 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11463
11464 * gdbreplay.c, server.h, utils.c: Update copyright years.
11465
11466 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11467
11468 * server.c (main): Print child status or termination signal from
11469 variable 'signal', not 'sig'.
11470
11471 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11472
11473 * linux-low.c (linux_read_memory): Change return type to
11474 int. Check for and return error from ptrace().
11475 * target.c (read_inferior_memory): Change return type to int. Pass
11476 back return status from the_target->read_memory().
11477 * target.h (struct target_ops): Adapt *read_memory() prototype.
11478 Update comment.
11479 (read_inferior_memory): Adapt prototype.
11480 * server.c (main): Return an error packet if
11481 read_inferior_memory() returns an error.
11482
11483 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11484
11485 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11486 Unify with other clean targets.
11487
11488 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11489
11490 * server.c (handle_v_cont): Call set_desired_inferior.
11491
11492 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11493
11494 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11495
11496 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11497
11498 * linux-low.c (linux_wait): Unblock async I/O.
11499 (linux_resume): Block and enable async I/O.
11500 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11501 * server.h (block_async_io, unblock_async_io): Add prototypes.
11502
11503 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11504
11505 * remote-utils.c (remote_open): Print a status notice after
11506 opening a TCP port.
11507 * server.c (attach_inferior): Print a status notice after
11508 attaching.
11509
11510 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11511
11512 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11513
11514 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11515
11516 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11517 error packet.
11518 * server.c, target.h: Update copyright years.
11519
11520 2004-02-25 Roland McGrath <roland@redhat.com>
11521
11522 * target.h (struct target_ops): New member `read_auxv'.
11523 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11524 * linux-low.c (linux_read_auxv): New function.
11525 (linux_target_ops): Initialize `read_auxv' member to that.
11526
11527 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11528
11529 Committed by Jim Blandy <jimb@redhat.com>.
11530
11531 * linux-s390-low.c (s390_num_regs): Update.
11532 (s390_regmap): Remove control registers. Use __s390x__ predefine
11533 instead of GPR_SIZE to distiguish s390 and s390x targets.
11534
11535 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11536
11537 * linux-low.c: Update copyright year.
11538 (check_removed_breakpoint): Clear pending_is_breakpoint.
11539 (linux_set_resume_request, linux_queue_one_thread)
11540 (resume_status_pending_p): New functions.
11541 (linux_continue_one_thread): Use process->resume.
11542 (linux_resume): Only resume threads if there are no pending events.
11543 * linux-low.h (struct process_info): Add resume request
11544 pointer.
11545
11546 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11547
11548 * regcache.c (new_register_cache): Clear the allocated register
11549 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11550
11551 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11552
11553 * linux-low.c (linux_resume): Take a struct thread_resume *
11554 argument.
11555 (linux_wait): Update call.
11556 (resume_ptr): New static variable.
11557 (linux_continue_one_thread): Renamed from
11558 linux_continue_one_process. Use resume_ptr.
11559 (linux_resume): Use linux_continue_one_thread.
11560 * server.c (handle_v_cont, handle_v_requests): New functions.
11561 (myresume): New function.
11562 (main): Handle 'v' case.
11563 * target.h (struct thread_resume): New type.
11564 (struct target_ops): Change argument of "resume" to struct
11565 thread_resume *.
11566 (myresume): Delete macro.
11567
11568 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11569
11570 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11571 (uninstall): Support DESTDIR.
11572
11573 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11574
11575 * configure.srv: Add xscale*linux copy of arm*linux entry.
11576
11577 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11578
11579 * linux-arm-low.c (arm_reinsert_addr): New function.
11580 (the_low_target): Add arm_reinsert_addr.
11581
11582 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11583
11584 * mem-break.c: Remove whitespace at end of file.
11585
11586 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11587
11588 * configure.in: Check whether we need to prototype strerror.
11589 * server.h: Optionally prototype strerror.
11590 * gdbreplay.c (perror_with_name): Use strerror.
11591 * linux-low.c (linux_attach_lwp): Use strerror.
11592 * utils.c (perror_with_name): Use strerror.
11593 * config.in, configure: Regenerated.
11594
11595 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11596
11597 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11598 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11599
11600 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11601
11602 * Makefile.in (SFILES): Update.
11603 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11604 low-sun3.c: Remove files.
11605
11606 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11607
11608 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11609 (linux_detach_one_process, linux_detach): New functions.
11610 (linux_target_ops): Add linux_detach.
11611 * server.c (main): Handle 'D' packet.
11612 * target.h (struct target_ops): Add "detach" member.
11613 (detach_inferior): Define.
11614
11615 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11616
11617 From Kelley Cook <kelleycook@wideopenwest.com>:
11618 * configure.srv: Accept i[34567]86 variants.
11619
11620 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11621
11622 * linux-low.c (linux_wait_for_event): Correct comment typos.
11623 (linux_resume_one_process): Call check_removed_breakpoint.
11624 (linux_send_signal): New function.
11625 (linux_target_ops): Add linux_send_signal.
11626 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11627 of kill.
11628 * target.h (struct target_ops): Add send_signal.
11629
11630 2003-05-29 Jim Blandy <jimb@redhat.com>
11631
11632 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11633 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11634 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11635 away part of the register's value.
11636
11637 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11638
11639 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11640 (linux_wait_for_event, linux_init_signals): Likewise.
11641
11642 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11643
11644 * configure.in: Check for stdlib.h.
11645 * configure: Regenerated.
11646 * config.in: Regenerated.
11647
11648 2003-01-04 Andreas Schwab <schwab@suse.de>
11649
11650 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11651
11652 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11653
11654 * Makefile.in: Remove obsolete code.
11655
11656 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11657
11658 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11659 defined(PT_FPR0_HI).
11660
11661 2002-11-17 Stuart Hughes <seh@zee2.com>
11662
11663 * linux-arm-low.c (arm_num_regs): Increase.
11664 (arm_regmap): Include status register.
11665
11666 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11667
11668 * linux-low.c (register_addr): Remove incorrect -1 check.
11669
11670 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11671
11672 * linux-low.c (linux_create_inferior): Call setpgid. Return
11673 the new PID.
11674 (unstopped_p, linux_signal_pid): Remove.
11675 (linux_target_ops): Remove linux_signal_pid.
11676 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11677 global instead of target method.
11678 * target.h (struct target_ops): Remove signal_pid. Update comment
11679 for create_inferior.
11680 * server.c (signal_pid): New variable.
11681 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11682 gdbserver. Set the child to be the foreground process group.
11683 (attach_inferior): Set signal_pid.
11684
11685 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11686
11687 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11688
11689 2002-08-20 Jim Blandy <jimb@redhat.com>
11690
11691 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11692 default for this.
11693
11694 2002-08-01 Andrew Cagney <cagney@redhat.com>
11695
11696 * Makefile.in: Make chill references obsolete.
11697
11698 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11699
11700 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11701 * configure: Regenerate.
11702 * config.in: Regenerate.
11703
11704 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11705
11706 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11707 (perror_with_name, remote_close, remote_open, expect, play): Static.
11708
11709 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11710
11711 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11712 byte offsets instead of an array of indexes.
11713 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11714
11715 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11716
11717 * regcache.c: Add comment.
11718
11719 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11720
11721 * thread-db.c: New file.
11722 * proc-service.c: New file.
11723 * acinclude.m4: New file.
11724 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11725 proc-service.o, and thread-db.o.
11726 (linux-low.o): Add USE_THREAD_DB.
11727 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11728 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11729 * aclocal.m4: Regenerated.
11730 * config.in: Regenerated.
11731 * configure: Regenerated.
11732 * configure.in: Check for proc_service.h, sys/procfs.h,
11733 thread_db.h, and linux/elf.h headrs.
11734 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11735 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11736 Check for -lthread_db and thread support.
11737 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11738 PowerPC, and SuperH.
11739 * i387-fp.c: Constify arguments.
11740 * i387-fp.h: Likewise.
11741 * inferiors.c: (struct thread_info): Renamed from
11742 `struct inferior_info'. Remove PID member. Use generic inferior
11743 list header. All uses updated.
11744 (inferiors, signal_pid): Removed.
11745 (all_threads): New variable.
11746 (get_thread): Define.
11747 (add_inferior_to_list): New function.
11748 (for_each_inferior): New function.
11749 (change_inferior_id): New function.
11750 (add_inferior): Removed.
11751 (remove_inferior): New function.
11752 (add_thread): New function.
11753 (free_one_thread): New function.
11754 (remove_thread): New function.
11755 (clear_inferiors): Use for_each_inferior and free_one_thread.
11756 (find_inferior): New function.
11757 (find_inferior_id): New function.
11758 (inferior_target_data): Update argument type.
11759 (set_inferior_target_data): Likewise.
11760 (inferior_regcache_data): Likewise.
11761 (set_inferior_regcache_data): Likewise.
11762 * linux-low.c (linux_bp_reinsert): Remove.
11763 (all_processes, stopping_threads, using_thrads)
11764 (struct pending_signals, debug_threads, pid_of): New.
11765 (inferior_pid): Replace with macro.
11766 (struct inferior_linux_data): Remove.
11767 (get_stop_pc, add_process): New functions.
11768 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11769 Use add_process and add_thread.
11770 (linux_attach_lwp): New function, based on old linux_attach. Use
11771 add_process and add_thread. Set stop_expected for new threads.
11772 (linux_attach): New function.
11773 (linux_kill_one_process): New function.
11774 (linux_kill): Kill all LWPs.
11775 (linux_thread_alive): Use find_inferior_id.
11776 (check_removed_breakpoints, status_pending_p): New functions.
11777 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11778 Update. Use WNOHANG. Wait for cloned processes also. Update process
11779 struct for the found process.
11780 (linux_wait_for_event): New function.
11781 (linux_wait): Use it. Support LWPs.
11782 (send_sigstop, wait_for_sigstop, stop_all_processes)
11783 (linux_resume_one_process, linux_continue_one_process): New functions.
11784 (linux_resume): Support LWPs.
11785 (REGISTER_RAW_SIZE): Remove.
11786 (fetch_register): Use register_size instead. Call supply_register.
11787 (usr_store_inferior_registers): Likewise. Call collect_register.
11788 Fix recursive case.
11789 (regsets_fetch_inferior_registers): Improve error message.
11790 (regsets_store_inferior_registers): Add debugging.
11791 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11792 (unstopped_p, linux_signal_pid): New functions.
11793 (linux_target_ops): Add linux_signal_pid.
11794 (linux_init_signals): New function.
11795 (initialize_low): Call it. Initialize using_threads.
11796 * regcache.c (inferior_regcache_data): Add valid
11797 flag.
11798 (get_regcache): Fetch registers lazily. Add fetch argument
11799 and update all callers.
11800 (regcache_invalidate_one, regcache_invalidate): New
11801 functions.
11802 (new_register_cache): Renamed from create_register_cache.
11803 Return the new regcache.
11804 (free_register_cache): Change argument to a void *.
11805 (registers_to_string, registers_from_string): Call get_regcache
11806 with fetch flag set.
11807 (register_data): Make static. Pass fetch flag to get_regcache.
11808 (supply_register): Call get_regcache with fetch flag clear.
11809 (collect_register): Call get_regcache with fetch flag set.
11810 (collect_register_as_string): New function.
11811 * regcache.h: Update.
11812 * remote-utils.c (putpkt): Flush after debug output and use
11813 stderr.
11814 Handle input interrupts while waiting for an ACK.
11815 (input_interrupt): Use signal_pid method.
11816 (getpkt): Flush after debug output and use stderr.
11817 (outreg): Use collect_register_as_string.
11818 (new_thread_notify, dead_thread_notify): New functions.
11819 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11820 and general_thread.
11821 (look_up_one_symbol): Flush after debug output.
11822 * server.c (step_thread, server_waiting): New variables.
11823 (start_inferior): Don't use signal_pid. Update call to mywait.
11824 (attach_inferior): Update call to mywait.
11825 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11826 (main): Don't fetch/store registers explicitly. Use
11827 set_desired_inferior. Support proposed ``Hs'' packet. Update
11828 calls to mywait.
11829 * server.h: Update.
11830 (struct inferior_list, struct_inferior_list_entry): New.
11831 * target.c (set_desired_inferior): New.
11832 (write_inferior_memory): Constify.
11833 (mywait): New function.
11834 * target.h: Update.
11835 (struct target_ops): New signal_pid method.
11836 (mywait): Removed macro, added prototype.
11837
11838 * linux-low.h (regset_func): Removed.
11839 (regset_fill_func, regset_store_func): New.
11840 (enum regset_type): New.
11841 (struct regset_info): Add type field. Use new operation types.
11842 (struct linux_target_ops): stop_pc renamed to get_pc.
11843 Add decr_pc_after_break and breakpoint_at.
11844 (get_process, get_thread_proess, get_process_thread)
11845 (strut process_info, all_processes, linux_attach_lwp)
11846 (thread_db_init): New.
11847
11848 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11849 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11850 (the_low_target): Add new members.
11851 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11852 (i386_store_fpxregset): Constify.
11853 (target_regsets): Add new kind identifier.
11854 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11855 (i386_set_pc): Add debugging.
11856 (i386_breakpoint_at): New function.
11857 (the_low_target): Add new members.
11858 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11859 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11860 (mips_breakpoint_at): New.
11861 (the_low_target): Add new members.
11862 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11863 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11864 (the_low_target): Add new members.
11865 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11866 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11867 (the_low_target): Add new members.
11868 * linux-x86-64-low.c (target_regsets): Add new kind
11869 identifier.
11870
11871 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11872
11873 From Martin Pool <mbp@samba.org>:
11874 * server.c (gdbserver_usage): New function.
11875 (main): Call it.
11876
11877 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11878
11879 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11880 stop_at -> stop_pc.
11881
11882 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11883
11884 * Makefile.in: Remove obsolete code.
11885
11886 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11887
11888 * linux-low.c (regsets_fetch_inferior_registers),
11889 (regsets_store_inferior_registers): Removed cast to int from
11890 ptrace() calls.
11891 * regcache.h: Added declaration of struct inferior_info.
11892
11893 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11894
11895 * inferiors.c (struct inferior_info): Add regcache_data.
11896 (add_inferior): Call create_register_cache.
11897 (clear_inferiors): Call free_register_cache.
11898 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11899 * regcache.c (struct inferior_regcache_data): New.
11900 (registers): Remove.
11901 (get_regcache): New function.
11902 (create_register_cache, free_register_cache): New functions.
11903 (set_register_cache): Don't initialize the register cache here.
11904 (registers_to_string, registers_from_string, register_data): Call
11905 get_regcache.
11906 * regcache.h: Add prototypes.
11907 * server.h: Likewise.
11908
11909 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11910
11911 * mem-break.c: New file.
11912 * mem-break.h: New file.
11913 * Makefile.in: Add mem-break.o rule; update server.h
11914 dependencies.
11915 * inferiors.c (struct inferior_info): Add target_data
11916 member.
11917 (clear_inferiors): Free target_data member if set.
11918 (inferior_target_data, set_inferior_target_data): New functions.
11919 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11920 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11921 * linux-low.c (linux_bp_reinsert): New variable.
11922 (struct inferior_linux_data): New.
11923 (linux_create_inferior): Use set_inferior_target_data.
11924 (linux_attach): Likewise. Call add_inferior.
11925 (linux_wait_for_one_inferior): New function.
11926 (linux_wait): Call it.
11927 (linux_write_memory): Add const.
11928 (initialize_low): Call set_breakpoint_data.
11929 * linux-low.h (struct linux_target_ops): Add breakpoint
11930 handling members.
11931 * server.c (attach_inferior): Remove extra add_inferior
11932 call.
11933 * server.h: Include mem-break.h. Update inferior.c
11934 prototypes.
11935 * target.c (read_inferior_memory)
11936 (write_inferior_memory): New functions.
11937 * target.h (read_inferior_memory)
11938 (write_inferior_memory): Change macros to prototypes.
11939 (struct target_ops): Update comments. Add const to write_memory
11940 definition.
11941
11942 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11943
11944 * linux-low.c (usr_store_inferior_registers): Support
11945 registers which are allowed to fail to store.
11946 * linux-low.h (linux_target_ops): Likewise.
11947 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11948 (ppc_cannot_store_register): FPSCR may not be storable.
11949
11950 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11951
11952 * server.h: Include <string.h> if HAVE_STRING_H.
11953 * ChangeLog: Correct paths in last ChangeLog entry.
11954
11955 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11956
11957 * linux-low.h: Remove obsolete prototypes.
11958 (struct linux_target_ops): New.
11959 (extern the_low_target): New.
11960 * linux-low.c (num_regs, regmap): Remove declarations.
11961 (register_addr): Use the_low_target explicitly.
11962 (fetch_register): Likewise.
11963 (usr_fetch_inferior_registers): Likewise.
11964 (usr_store_inferior_registers): Likewise.
11965 * linux-arm-low.c (num_regs): Remove.
11966 (arm_num_regs): Define.
11967 (arm_regmap): Renamed from regmap, made static.
11968 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11969 made static.
11970 (arm_cannot_store_register): Renamed from cannot_store_register,
11971 made static.
11972 (the_low_target): New.
11973 * linux-i386-low.c (num_regs): Remove.
11974 (i386_num_regs): Define.
11975 (i386_regmap): Renamed from regmap, made static.
11976 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11977 made static.
11978 (i386_cannot_store_register): Renamed from cannot_store_register,
11979 made static.
11980 (the_low_target): New.
11981 * linux-ia64-low.c (num_regs): Remove.
11982 (ia64_num_regs): Define.
11983 (ia64_regmap): Renamed from regmap, made static.
11984 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11985 made static.
11986 (ia64_cannot_store_register): Renamed from cannot_store_register,
11987 made static.
11988 (the_low_target): New.
11989 * linux-m68k-low.c (num_regs): Remove.
11990 (m68k_num_regs): Define.
11991 (m68k_regmap): Renamed from regmap, made static.
11992 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11993 made static.
11994 (m68k_cannot_store_register): Renamed from cannot_store_register,
11995 made static.
11996 (the_low_target): New.
11997 * linux-mips-low.c (num_regs): Remove.
11998 (mips_num_regs): Define.
11999 (mips_regmap): Renamed from regmap, made static.
12000 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12001 made static.
12002 (mips_cannot_store_register): Renamed from cannot_store_register,
12003 made static.
12004 (the_low_target): New.
12005 * linux-ppc-low.c (num_regs): Remove.
12006 (ppc_num_regs): Define.
12007 (ppc_regmap): Renamed from regmap, made static.
12008 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12009 made static.
12010 (ppc_cannot_store_register): Renamed from cannot_store_register,
12011 made static.
12012 (the_low_target): New.
12013 * linux-s390-low.c (num_regs): Remove.
12014 (s390_num_regs): Define.
12015 (s390_regmap): Renamed from regmap, made static.
12016 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12017 made static.
12018 (s390_cannot_store_register): Renamed from cannot_store_register,
12019 made static.
12020 (the_low_target): New.
12021 * linux-sh-low.c (num_regs): Remove.
12022 (sh_num_regs): Define.
12023 (sh_regmap): Renamed from regmap, made static.
12024 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12025 made static.
12026 (sh_cannot_store_register): Renamed from cannot_store_register,
12027 made static.
12028 (the_low_target): New.
12029 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12030 (the_low_target): New.
12031
12032 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12033
12034 * Makefile.in: Add stamp-h target.
12035 * configure.in: Create stamp-h.
12036 * configure: Regenerated.
12037
12038 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12039
12040 * inferiors.c: New file.
12041 * target.c: New file.
12042 * target.h: New file.
12043 * Makefile.in: Add target.o and inferiors.o. Update
12044 dependencies.
12045 * linux-low.c (inferior_pid): New static variable,
12046 moved from server.c.
12047 (linux_create_inferior): Renamed from create_inferior.
12048 Call add_inferior. Return 0 on success instead of a PID.
12049 (linux_attach): Renamed from myattach.
12050 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12051 (linux_thread_alive): Renamed from mythread_alive.
12052 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12053 child dies.
12054 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12055 (regsets_store_inferior_registers): Correct error message.
12056 Add missing ``return 0''.
12057 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12058 (linux_store_registers): Renamed from store_inferior_registers.
12059 (linux_read_memory): Renamed from read_inferior_memory.
12060 (linux_write_memory): Renamed from write_inferior_memory.
12061 (linux_target_ops): New structure.
12062 (initialize_low): Call set_target_ops ().
12063 * remote-utils.c (unhexify): New function.
12064 (hexify): New function.
12065 (input_interrupt): Send signals to ``signal_pid''.
12066 * server.c (inferior_pid): Remove.
12067 (start_inferior): Update create_inferior call.
12068 (attach_inferior): Call add_inferior.
12069 (handle_query): New function.
12070 (main): Call handle_query for `q' packets.
12071 * server.h: Include "target.h". Remove obsolete prototypes.
12072 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12073
12074 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12075
12076 * Makefile.in: Add WARN_CFLAGS. Update configury
12077 dependencies.
12078 * configure.in: Check for <string.h>
12079 * configure: Regenerate.
12080 * config.in: Regenerate.
12081 * gdbreplay.c: Include needed system headers.
12082 (remote_open): Remove strchr prototype.
12083 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12084 * regcache.c (supply_register): Change buf argument to const void *.
12085 (supply_register_by_name): Likewise.
12086 (collect_register): Change buf argument to void *.
12087 (collect_register_by_name): Likewise.
12088 * regcache.h: Add missing prototypes.
12089 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12090 * server.c (handle_query): New function.
12091 (attached): New static variable, moved out of main.
12092 (main): Quiet longjmp clobber warnings.
12093 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12094 * utils.c (error): Remove NORETURN.
12095 (fatal): Likewise.
This page took 0.295026 seconds and 4 git commands to generate.