Move ChangeLog entry to proper place
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-15 Pedro Alves <palves@redhat.com>
2
3 PR remote/18965
4 * remote-utils.c (prepare_resume_reply): Merge
5 TARGET_WAITKIND_VFORK_DONE switch case with the
6 TARGET_WAITKIND_FORKED case.
7
8 2015-09-15 Yao Qi <yao.qi@linaro.org>
9
10 * server.c (handle_query): Check string comparison using
11 "else if" instead of "if".
12
13 2015-09-15 Yao Qi <yao.qi@linaro.org>
14
15 * server.c (vCont_supported): New global variable.
16 (handle_query): Set vCont_supported to 1 if "vContSupported+"
17 matches. Append ";vContSupported+" to own_buf.
18 (handle_v_requests): Append ";s;S" to own_buf if target supports
19 hardware single step or vCont_supported is false.
20 (capture_main): Set vCont_supported to zero.
21
22 2015-09-15 Yao Qi <yao.qi@linaro.org>
23
24 * linux-low.c (linux_supports_conditional_breakpoints): Rename
25 it to ...
26 (linux_supports_hardware_single_step): ... New function.
27 (linux_target_ops): Update.
28 * lynx-low.c (lynx_target_ops): Set field
29 supports_hardware_single_step to target_can_do_hardware_single_step.
30 * nto-low.c (nto_target_ops): Likewise.
31 * spu-low.c (spu_target_ops): Likewise.
32 * win32-low.c (win32_target_ops): Likewise.
33 * target.c (target_can_do_hardware_single_step): New function.
34 * target.h (struct target_ops) <supports_conditional_breakpoints>:
35 Remove. <supports_hardware_single_step>: New field.
36 (target_supports_conditional_breakpoints): Remove.
37 (target_supports_hardware_single_step): New macro.
38 (target_can_do_hardware_single_step): Declare.
39 * server.c (handle_query): Use target_supports_hardware_single_step
40 instead of target_supports_conditional_breakpoints.
41
42 2015-09-15 Yao Qi <yao.qi@linaro.org>
43
44 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
45 function.
46 (struct linux_target_ops the_low_target): Install
47 aarch64_linux_siginfo_fixup.
48
49 2015-09-11 Don Breazeal <donb@codesourcery.com>
50 Luis Machado <lgustavo@codesourcery.com>
51
52 * linux-low.c (linux_mourn): Static declaration.
53 (linux_arch_setup): Move in front of
54 handle_extended_wait.
55 (linux_arch_setup_thread): New function.
56 (handle_extended_wait): Handle exec events. Call
57 linux_arch_setup_thread. Make event_lwp argument a
58 pointer-to-a-pointer.
59 (check_zombie_leaders): Do not check stopped threads.
60 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
61 (linux_low_filter_event): Add lwp and thread for exec'ing
62 non-leader thread if leader thread has been deleted.
63 Refactor code into linux_arch_setup_thread and call it.
64 Pass child lwp pointer by reference to handle_extended_wait.
65 (linux_wait_for_event_filtered): Update comment.
66 (linux_wait_1): Prevent clobbering exec event status.
67 (linux_supports_exec_events): New function.
68 (linux_target_ops) <supports_exec_events>: Initialize new member.
69 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
70 new member.
71 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
72 * server.c (report_exec_events): New global variable.
73 (handle_query): Handle qSupported query for exec-events feature.
74 (captured_main): Initialize report_exec_events.
75 * server.h (report_exec_events): Declare new global variable.
76 * target.h (struct target_ops) <supports_exec_events>: New
77 member.
78 (target_supports_exec_events): New macro.
79 * win32-low.c (win32_target_ops) <supports_exec_events>:
80 Initialize new member.
81
82 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
83
84 * linux-low.c (linux_low_enable_btrace): Remove.
85 (linux_target_ops): Replace linux_low_enable_btrace with
86 linux_enable_btrace.
87
88 2015-09-03 Yao Qi <yao.qi@linaro.org>
89
90 * linux-aarch64-low.c (aarch64_insert_point): Call
91 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
92 returns true.
93
94 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
95
96 * linux-low.c (check_stopped_by_breakpoint): Use
97 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
98
99 2015-08-27 Pedro Alves <palves@redhat.com>
100
101 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
102
103 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
104
105 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
106 the XNEW-family equivalent.
107 (compile_bytecodes): Likewise.
108 * dll.c (loaded_dll): Likewise.
109 * event-loop.c (append_callback_event): Likewise.
110 (create_file_handler): Likewise.
111 (create_file_event): Likewise.
112 * hostio.c (handle_open): Likewise.
113 * inferiors.c (add_thread): Likewise.
114 (add_process): Likewise.
115 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
116 * linux-arm-low.c (arm_new_process): Likewise.
117 (arm_new_thread): Likewise.
118 * linux-low.c (add_to_pid_list): Likewise.
119 (linux_add_process): Likewise.
120 (handle_extended_wait): Likewise.
121 (add_lwp): Likewise.
122 (enqueue_one_deferred_signal): Likewise.
123 (enqueue_pending_signal): Likewise.
124 (linux_resume_one_lwp_throw): Likewise.
125 (linux_resume_one_thread): Likewise.
126 (linux_read_memory): Likewise.
127 (linux_write_memory): Likewise.
128 * linux-mips-low.c (mips_linux_new_process): Likewise.
129 (mips_linux_new_thread): Likewise.
130 (mips_add_watchpoint): Likewise.
131 * linux-x86-low.c (initialize_low_arch): Likewise.
132 * lynx-low.c (lynx_add_process): Likewise.
133 * mem-break.c (set_raw_breakpoint_at): Likewise.
134 (set_breakpoint): Likewise.
135 (add_condition_to_breakpoint): Likewise.
136 (add_commands_to_breakpoint): Likewise.
137 (clone_agent_expr): Likewise.
138 (clone_one_breakpoint): Likewise.
139 * regcache.c (new_register_cache): Likewise.
140 * remote-utils.c (look_up_one_symbol): Likewise.
141 * server.c (queue_stop_reply): Likewise.
142 (start_inferior): Likewise.
143 (queue_stop_reply_callback): Likewise.
144 (handle_target_event): Likewise.
145 * spu-low.c (fetch_ppc_memory): Likewise.
146 (store_ppc_memory): Likewise.
147 * target.c (set_target_ops): Likewise.
148 * thread-db.c (thread_db_load_search): Likewise.
149 (try_thread_db_load_1): Likewise.
150 * tracepoint.c (add_tracepoint): Likewise.
151 (add_tracepoint_action): Likewise.
152 (create_trace_state_variable): Likewise.
153 (cmd_qtdpsrc): Likewise.
154 (cmd_qtro): Likewise.
155 (add_while_stepping_state): Likewise.
156 * win32-low.c (child_add_thread): Likewise.
157 (get_image_name): Likewise.
158
159 2015-08-25 Yao Qi <yao.qi@linaro.org>
160
161 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
162
163 2015-08-25 Yao Qi <yao.qi@linaro.org>
164
165 * Makefile.in (aarch64-linux.o): New rule.
166 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
167 srv_tgtobj.
168 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
169 (aarch64_init_debug_reg_state): Make it extern.
170 (aarch64_linux_prepare_to_resume): Remove.
171
172 2015-08-25 Yao Qi <yao.qi@linaro.org>
173
174 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
175 lwp_arch_private_info and ptid_of_lwp.
176
177 2015-08-25 Yao Qi <yao.qi@linaro.org>
178
179 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
180 Find proc_info by find_process_pid. All callers updated.
181
182 2015-08-25 Yao Qi <yao.qi@linaro.org>
183
184 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
185 Remove.
186 (debug_reg_change_callback): Remove.
187 (aarch64_notify_debug_reg_change): Remove.
188
189 2015-08-25 Yao Qi <yao.qi@linaro.org>
190
191 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
192 Call current_lwp_ptid.
193
194 2015-08-25 Yao Qi <yao.qi@linaro.org>
195
196 * linux-aarch64-low.c (debug_reg_change_callback): Use
197 debug_printf.
198
199 2015-08-25 Yao Qi <yao.qi@linaro.org>
200
201 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
202
203 2015-08-25 Yao Qi <yao.qi@linaro.org>
204
205 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
206
207 2015-08-25 Yao Qi <yao.qi@linaro.org>
208
209 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
210 the code.
211
212 2015-08-25 Yao Qi <yao.qi@linaro.org>
213
214 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
215 Remove.
216 (debug_reg_change_callback): Remove argument entry and add argument
217 lwp. Remove local variable thread. Don't print thread id in the
218 debugging output. Don't check whether pid of thread equals to pid.
219 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
220 iterate_over_lwps instead find_inferior.
221
222 2015-08-24 Pedro Alves <palves@redhat.com>
223
224 * inferiors.c (get_first_process): New function.
225 * inferiors.h (get_first_process): New declaration.
226 * remote-utils.c (read_ptid): Default to the first process in the
227 list, instead of to the current thread's process.
228
229 2015-08-24 Pedro Alves <palves@redhat.com>
230
231 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
232 * event-loop.c: Likewise.
233 * remote-utils.c: Likewise.
234 * tracepoint.c: Likewise.
235
236 2015-08-24 Pedro Alves <palves@redhat.com>
237
238 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
239 ptid_get_lwp.
240
241 2015-08-21 Pedro Alves <palves@redhat.com>
242
243 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
244 instead of literal 1.
245
246 2015-08-21 Pedro Alves <palves@redhat.com>
247
248 * tdesc.c (default_description): Explicitly zero-initialize.
249
250 2015-08-21 Pedro Alves <palves@redhat.com>
251
252 PR gdb/18749
253 * inferiors.c (remove_thread): Discard any pending stop reply for
254 this thread.
255 * server.c (remove_all_on_match_pid): Rename to ...
256 (remove_all_on_match_ptid): ... this. Work with a filter ptid
257 instead of a pid.
258 (discard_queued_stop_replies): Change parameter to a ptid. Now
259 extern.
260 (handle_v_kill, kill_inferior_callback, captured_main)
261 (process_serial_event): Adjust.
262 * server.h (discard_queued_stop_replies): Declare.
263
264 2015-08-21 Pedro Alves <palves@redhat.com>
265
266 * linux-low.c (wait_for_sigstop): Always switch to no thread
267 selected if the previously current thread dies.
268 * lynx-low.c (lynx_request_interrupt): Use the first thread's
269 process instead of the current thread's.
270 * remote-utils.c (input_interrupt): Don't check if there's no
271 current thread.
272 * server.c (gdb_read_memory, gdb_write_memory): If setting the
273 current thread to the general thread fails, error out.
274 (handle_qxfer_auxv, handle_qxfer_libraries)
275 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
276 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
277 (handle_query): Check if there's a thread selected instead of
278 checking whether there's any thread in the thread list.
279 (handle_qxfer_threads, handle_qxfer_btrace)
280 (handle_qxfer_btrace_conf): Don't error out early if there's no
281 thread in the thread list.
282 (handle_v_cont, myresume): Don't set the current thread to the
283 continue thread.
284 (process_serial_event) <Hg handling>: Also set thread_id if the
285 previous general thread is still alive.
286 (process_serial_event) <g/G handling>: If setting the current
287 thread to the general thread fails, error out.
288 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
289 thread's lwp instead of the current thread's.
290 * target.c (set_desired_thread): If the desired thread was not
291 found, leave the current thread pointing to NULL. Return an int
292 (boolean) indicating success.
293 * target.h (set_desired_thread): Change return type to int.
294
295 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
296
297 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
298 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
299 #includes.
300 (ps_get_thread_area): New function.
301
302 2015-08-19 Gary Benson <gbenson@redhat.com>
303
304 * hostio.c (handle_pread): Do not attempt to read more data
305 than hostio_reply_with_data can fit in a packet.
306
307 2015-08-18 Joel Brobecker <brobecker@adacore.com>
308
309 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
310
311 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
312
313 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
314
315 2015-08-06 Pedro Alves <palves@redhat.com>
316
317 * tracepoint.c (expr_eval_result): Now an int.
318
319 2015-08-06 Pedro Alves <palves@redhat.com>
320
321 * gdbthread.h (struct regcache): Forward declare.
322 (struct thread_info) <regcache_data>: Now a struct regcache
323 pointer.
324 * inferiors.c (inferior_regcache_data)
325 (set_inferior_regcache_data): Now work with struct regcache
326 pointers.
327 * inferiors.h (struct regcache): Forward declare.
328 (inferior_regcache_data, set_inferior_regcache_data): Now work
329 with struct regcache pointers.
330 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
331 (free_register_cache_thread): Remove struct regcache pointer
332 casts.
333
334 2015-08-06 Pedro Alves <palves@redhat.com>
335
336 * server.c (captured_main): On error, print the exception message
337 to stderr, and if run_once is set, throw a quit.
338
339 2015-08-06 Pedro Alves <palves@redhat.com>
340
341 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
342 the current thread.
343
344 2015-08-06 Pedro Alves <palves@redhat.com>
345
346 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
347 reading beyond the passed in buffer length.
348
349 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
350
351 * tracepoint.c (symbol_list) <required>: Remove.
352
353 2015-08-06 Pedro Alves <palves@redhat.com>
354
355 * linux-low.c (handle_extended_wait): Set the fork child's suspend
356 count if stopping and suspending threads.
357 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
358 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
359 (linux_detach): Complete an ongoing step-over.
360 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
361 throughout.
362 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
363 (linux_wait_1): If passing a signal to the inferior after
364 finishing a step-over, unsuspend and re-resume all lwps. If we
365 see a single-step event but the thread should be continuing, don't
366 pass the trap to gdb.
367 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
368 internal_error instead of gdb_assert.
369 (enqueue_pending_signal): New function.
370 (check_ptrace_stopped_lwp_gone): Add debug output.
371 (start_step_over): Use internal_error instead of gdb_assert.
372 (complete_ongoing_step_over): New function.
373 (linux_resume_one_thread): Don't resume a suspended thread.
374 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
375 it stepping.
376
377 2015-08-06 Pedro Alves <palves@redhat.com>
378
379 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
380 (linux_thread_alive): Use lwp_is_marked_dead.
381 (extended_event_reported): Delete.
382 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
383 instead of extended_event_reported.
384 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
385 as well.
386 (lwp_is_marked_dead): New function.
387 (lwp_running): Use lwp_is_marked_dead.
388 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
389 comment.
390
391 2015-08-06 Pedro Alves <palves@redhat.com>
392
393 * linux-low.c (linux_wait_1): Move fork event output out of the
394 !report_to_gdb check. Pass event_child->waitstatus to
395 target_waitstatus_to_string instead of ourstatus.
396
397 2015-08-04 Yao Qi <yao.qi@linaro.org>
398
399 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
400 if current_thread is 32 bit.
401
402 2015-08-04 Yao Qi <yao.qi@linaro.org>
403
404 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
405 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
406 * server.c (extended_protocol): Remove "static".
407 * server.h (extended_protocol): Declare it.
408
409 2015-08-04 Yao Qi <yao.qi@linaro.org>
410
411 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
412 both aarch64 and aarch32.
413 (aarch64_set_pc): Likewise.
414
415 2015-08-04 Yao Qi <yao.qi@linaro.org>
416
417 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
418 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
419 arm-with-neon.xml to srv_xmlfiles.
420 * linux-aarch64-low.c: Include linux-aarch32-low.h.
421 (is_64bit_tdesc): New function.
422 (aarch64_linux_read_description): New function.
423 (aarch64_arch_setup): Call aarch64_linux_read_description.
424 (regs_info): Rename to regs_info_aarch64.
425 (aarch64_regs_info): Return right regs_info.
426 (initialize_low_arch): Call initialize_low_arch_aarch32.
427
428 2015-08-04 Yao Qi <yao.qi@linaro.org>
429
430 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
431 * linux-aarch32-low.c: New file.
432 * linux-aarch32-low.h: New file.
433 * linux-arm-low.c (arm_fill_gregset): Move it to
434 linux-aarch32-low.c.
435 (arm_store_gregset): Likewise.
436 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
437 (arm_store_vfpregset): Call arm_store_vfpregset_num.
438 (arm_arch_setup): Check if PTRACE_GETREGSET works.
439 (regs_info): Rename to regs_info_arm.
440 (arm_regs_info): Return regs_info_aarch32 if
441 have_ptrace_getregset is 1 and target description is
442 arm_with_neon or arm_with_vfpv3.
443 (initialize_low_arch): Don't call init_registers_arm_with_neon.
444 Call initialize_low_arch_aarch32 instead.
445
446 2015-08-04 Yao Qi <yao.qi@linaro.org>
447
448 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
449 * linux-low.c: ... here.
450 * linux-low.h (have_ptrace_getregset): Declare it.
451
452 2015-08-04 Pedro Alves <palves@redhat.com>
453
454 * thread-db.c (struct thread_db): Use new typedefs.
455 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
456 CHK calls.
457 (disable_thread_event_reporting): Cast result of dlsym to
458 destination function pointer type.
459 (thread_db_mourn): Use td_ta_delete_ftype.
460
461 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
462
463 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
464 arch variant.
465 (CDX_BREAKPOINT): Define for R2.
466 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
467 (the_low_target): Add comments.
468
469 2015-07-30 Yao Qi <yao.qi@linaro.org>
470
471 * linux-arm-low.c (arm_hwcap): Remove it.
472 (arm_read_description): New local variable arm_hwcap. Don't
473 set arm_hwcap to zero.
474
475 2015-07-30 Yao Qi <yao.qi@linaro.org>
476
477 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
478 Use regcache->tdesc instead.
479 (arm_store_wmmxregset): Likewise.
480 (arm_fill_vfpregset): Likewise.
481 (arm_store_vfpregset): Likewise.
482
483 2015-07-30 Yao Qi <yao.qi@linaro.org>
484
485 * linux-arm-low.c: Include arch/arm.h.
486 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
487 (arm_store_gregset): Likewise.
488
489 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
490
491 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
492 ptrace's 4th parameter.
493
494 2015-07-27 Yao Qi <yao.qi@linaro.org>
495
496 * configure.srv (case aarch64*-*-linux*): Don't set
497 srv_linux_usrregs.
498
499 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
500
501 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
502 sys/ptrace.h.
503 * linux-arm-low.c: Likewise.
504 * linux-cris-low.c: Likewise.
505 * linux-crisv32-low.c: Likewise.
506 * linux-low.c: Likewise.
507 * linux-m68k-low.c: Likewise.
508 * linux-mips-low.c: Likewise.
509 * linux-nios2-low.c: Likewise.
510 * linux-s390-low.c: Likewise.
511 * linux-sparc-low.c: Likewise.
512 * linux-tic6x-low.c: Likewise.
513 * linux-tile-low.c: Likewise.
514 * linux-x86-low.c: Likewise.
515
516 2015-07-24 Pedro Alves <palves@redhat.com>
517
518 * config.in: Regenerate.
519 * configure: Regenerate.
520
521 2015-07-24 Pedro Alves <palves@redhat.com>
522
523 * acinclude.m4: Include ../ptrace.m4.
524 * configure.ac: Call GDB_AC_PTRACE.
525 * config.in, configure: Regenerate.
526
527 2015-07-24 Yao Qi <yao.qi@linaro.org>
528
529 * linux-low.c (linux_create_inferior): Remove setting to
530 proc->priv->new_inferior.
531 (linux_attach): Likewise.
532 (linux_low_filter_event): Likewise.
533 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
534
535 2015-07-24 Yao Qi <yao.qi@linaro.org>
536
537 * linux-low.c (linux_arch_setup): New function.
538 (linux_low_filter_event): If proc->tdesc is NULL and
539 proc->attached is true, call the_low_target.arch_setup.
540 Otherwise, keep status pending, and return.
541 (linux_resume_one_lwp_throw): Don't call get_pc if
542 thread->while_stepping isn't NULL. Don't call
543 get_thread_regcache if proc->tdesc is NULL.
544 (need_step_over_p): Return 0 if proc->tdesc is NULL.
545 (linux_target_ops): Install arch_setup.
546 * server.c (start_inferior): Call the_target->arch_setup.
547 * target.h (struct target_ops) <arch_setup>: New field.
548 (target_arch_setup): New marco.
549 * lynx-low.c (lynx_target_ops): Update.
550 * nto-low.c (nto_target_ops): Update.
551 * spu-low.c (spu_target_ops): Update.
552 * win32-low.c (win32_target_ops): Update.
553
554 2015-07-24 Yao Qi <yao.qi@linaro.org>
555
556 * linux-low.c (linux_add_process): Don't set
557 proc->priv->new_inferior.
558 (linux_create_inferior): Set proc->priv->new_inferior to 1.
559 (linux_attach): Likewise.
560
561 2015-07-24 Yao Qi <yao.qi@linaro.org>
562
563 * server.c (start_inferior): Code refactor.
564
565 2015-07-24 Yao Qi <yao.qi@linaro.org>
566
567 * server.c (process_serial_event): Set general_thread.
568
569 2015-07-21 Yao Qi <yao.qi@linaro.org>
570
571 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
572 aarch64_linux_get_debug_reg_capacity.
573
574 2015-07-17 Yao Qi <yao.qi@linaro.org>
575
576 * Makefile.in (aarch64-linux-hw-point.o): New rule.
577 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
578 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
579 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
580 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
581 (AARCH64_HWP_ALIGNMENT): Likewise.
582 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
583 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
584 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
585 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
586 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
587 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
588 (struct aarch64_debug_reg_state): Likewise.
589 (struct arch_lwp_info): Likewise.
590 (aarch64_align_watchpoint): Likewise.
591 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
592 (aarch64_watchpoint_length): Likewise.
593 (aarch64_point_encode_ctrl_reg): Likewise
594 (aarch64_point_is_aligned): Likewise.
595 (aarch64_align_watchpoint): Likewise.
596 (aarch64_linux_set_debug_regs):
597 (aarch64_dr_state_insert_one_point): Likewise.
598 (aarch64_dr_state_remove_one_point): Likewise.
599 (aarch64_handle_breakpoint): Likewise.
600 (aarch64_handle_aligned_watchpoint): Likewise.
601 (aarch64_handle_unaligned_watchpoint): Likewise.
602 (aarch64_handle_watchpoint): Likewise.
603
604 2015-07-17 Yao Qi <yao.qi@linaro.org>
605
606 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
607 and don't aarch64_get_debug_reg_state. All callers update.
608 (aarch64_handle_aligned_watchpoint): Likewise.
609 (aarch64_handle_unaligned_watchpoint): Likewise.
610 (aarch64_handle_watchpoint): Likewise.
611 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
612 (aarch64_remove_point): Likewise.
613
614 2015-07-17 Yao Qi <yao.qi@linaro.org>
615
616 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
617 debug_printf.
618 (aarch64_handle_unaligned_watchpoint): Likewise.
619
620 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
621
622 Revert the previous 3 commits:
623 Move gdb_regex* to common/
624 Move linux_find_memory_regions_full & co.
625 gdbserver build-id attribute generator
626
627 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
628 Jan Kratochvil <jan.kratochvil@redhat.com>
629
630 gdbserver build-id attribute generator.
631 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
632 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
633 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
634 (find_phdr): New.
635 (get_dynamic): Use find_pdhr to traverse program headers.
636 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
637 (compare_mapping_entry_range, struct find_memory_region_callback_data)
638 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
639 (get_hex_build_id): New.
640 (linux_qxfer_libraries_svr4): Add optional build-id attribute
641 to reply XML document.
642
643 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
644 Jan Kratochvil <jan.kratochvil@redhat.com>
645
646 * target.c: Include target/target-utils.h and fcntl.h.
647 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
648 (target_fileio_read_stralloc): New functions.
649
650 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
651
652 * Makefile.in (OBS): Add gdb_regex.o.
653 (gdb_regex.o): New.
654 * config.in: Rebuilt.
655 * configure: Rebuilt.
656
657 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
658 Jan Kratochvil <jan.kratochvil@redhat.com>
659
660 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
661 * Makefile.in (OBS): Add target-utils.o.
662 (linux-maps.o, target-utils.o): New.
663 * configure.srv (srv_linux_obj): Add linux-maps.o.
664
665 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
666
667 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
668 function, return 1.
669 (the_low_target): Install it.
670
671 2015-07-14 Pedro Alves <palves@redhat.com>
672
673 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
674 Instead, ignore ECHILD, and throw an error for other errnos.
675
676 2015-07-10 Pedro Alves <palves@redhat.com>
677
678 * event-loop.c (struct callback_event) <data>: Change type to
679 gdb_client_data instance instead of gdb_client_data pointer.
680 (append_callback_event): Adjust.
681
682 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
683
684 * linux-aarch64-low.c: Add comments for each linux_target_ops
685 method. Remove comments already covered in target_ops and
686 linux_target_ops definitions.
687 (the_low_target): Add comments for each unimplemented method.
688
689 2015-07-09 Yao Qi <yao.qi@linaro.org>
690
691 * linux-aarch64-low.c (aarch64_regmap): Remove.
692 (aarch64_usrregs_info): Remove.
693 (regs_info): Set field usrregs to NULL.
694
695 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
696
697 * linux-low.c: Include "rsp-low.h"
698 (linux_low_encode_pt_config, linux_low_encode_raw): New.
699 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
700 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
701 (handle_btrace_enable_pt): New.
702 (handle_btrace_general_set): Support "pt".
703 (handle_btrace_conf_general_set): Support "pt:size".
704
705 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
706
707 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
708 Z_PACKET_SW_BP.
709
710 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
711
712 * linux-aarch64-low.c: Remove comment about endianness.
713 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
714 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
715 memcmp.
716
717 2015-06-24 Gary Benson <gbenson@redhat.com>
718
719 * linux-i386-ipa.c (stdint.h): Do not include.
720 * lynx-i386-low.c (stdint.h): Likewise.
721 * lynx-ppc-low.c (stdint.h): Likewise.
722 * mem-break.c (stdint.h): Likewise.
723 * thread-db.c (stdint.h): Likewise.
724 * tracepoint.c (stdint.h): Likewise.
725 * win32-low.c (stdint.h): Likewise.
726
727 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
728
729 * server.c (write_qxfer_response): Update call to
730 remote_escape_output.
731
732 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
733 Jan Kratochvil <jan.kratochvil@redhat.com>
734
735 Merge multiple hex conversions.
736 * gdbreplay.c (tohex): Rename to 'fromhex'.
737 (logchar): Use fromhex.
738
739 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
740
741 * server.c (handle_qxfer_libraries): Set `version' attribute for
742 <library-list>.
743
744 2015-06-10 Gary Benson <gbenson@redhat.com>
745
746 * target.h (struct target_ops) <multifs_open>: New field.
747 <multifs_unlink>: Likewise.
748 <multifs_readlink>: Likewise.
749 * linux-low.c (nat/linux-namespaces.h): New include.
750 (linux_target_ops): Initialize the_target->multifs_open,
751 the_target->multifs_unlink and the_target->multifs_readlink.
752 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
753 * hostio.c (hostio_fs_pid): New static variable.
754 (hostio_handle_new_gdb_connection): New function.
755 (handle_setfs): Likewise.
756 (handle_open): Use the_target->multifs_open as appropriate.
757 (handle_unlink): Use the_target->multifs_unlink as appropriate.
758 (handle_readlink): Use the_target->multifs_readlink as
759 appropriate.
760 (handle_vFile): Handle vFile:setfs packets.
761 * server.c (handle_query): Call hostio_handle_new_gdb_connection
762 after target_handle_new_gdb_connection.
763
764 2015-06-10 Gary Benson <gbenson@redhat.com>
765
766 * configure.ac (AC_CHECK_FUNCS): Add setns.
767 * config.in: Regenerate.
768 * configure: Likewise.
769 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
770 (linux-namespaces.o): New rule.
771 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
772
773 2015-06-09 Gary Benson <gbenson@redhat.com>
774
775 * hostio.c (handle_open): Process mode argument with
776 fileio_to_host_mode.
777
778 2015-06-01 Yao Qi <yao.qi@linaro.org>
779
780 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
781 * linux-x86-low.c: Likewise.
782
783 2015-05-28 Don Breazeal <donb@codesourcery.com>
784
785 * linux-low.c (handle_extended_wait): Initialize
786 thread_info.last_resume_kind for new fork children.
787
788 2015-05-15 Pedro Alves <palves@redhat.com>
789
790 * target.h (target_handle_new_gdb_connection): Rewrite using if
791 wrapped in do/while.
792
793 2015-05-14 Joel Brobecker <brobecker@adacore.com>
794
795 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
796 * configure, config.in: Regenerate.
797 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
798 Declare typedef.
799
800 2015-05-12 Don Breazeal <donb@codesourcery.com>
801
802 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
803 PTRACE_EVENT_VFORK_DONE.
804 (linux_low_ptrace_options, extended_event_reported): Add vfork
805 events.
806 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
807 and "vforkdone" for RSP 'T' Stop Reply Packet.
808 * server.h (report_vfork_events): Declare
809 global variable.
810
811 2015-05-12 Don Breazeal <donb@codesourcery.com>
812
813 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
814 (the_low_target) <new_fork>: Initialize new member.
815 * linux-arm-low.c (arm_new_fork): New function.
816 (the_low_target) <new_fork>: Initialize new member.
817 * linux-low.c (handle_extended_wait): Call new target function
818 new_fork.
819 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
820 * linux-mips-low.c (mips_add_watchpoint): New function
821 extracted from mips_insert_point.
822 (the_low_target) <new_fork>: Initialize new member.
823 (mips_linux_new_fork): New function.
824 (mips_insert_point): Call mips_add_watchpoint.
825 * linux-x86-low.c (x86_linux_new_fork): New function.
826 (the_low_target) <new_fork>: Initialize new member.
827
828 2015-05-12 Don Breazeal <donb@codesourcery.com>
829
830 * linux-low.c (handle_extended_wait): Implement return value,
831 rename argument 'event_child' to 'event_lwp', handle
832 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
833 (linux_low_ptrace_options): New function.
834 (linux_low_filter_event): Call linux_low_ptrace_options,
835 use different argument fo linux_enable_event_reporting,
836 use return value from handle_extended_wait.
837 (extended_event_reported): New function.
838 (linux_wait_1): Call extended_event_reported and set
839 status to report fork events.
840 (linux_write_memory): Add pid to debug message.
841 (reset_lwp_ptrace_options_callback): New function.
842 (linux_handle_new_gdb_connection): New function.
843 (linux_target_ops): Initialize new structure member.
844 * linux-low.h (struct lwp_info) <waitstatus>: New member.
845 * lynx-low.c: Initialize new structure member.
846 * remote-utils.c (prepare_resume_reply): Implement stop reason
847 "fork" for "T" stop message.
848 * server.c (handle_query): Call handle_new_gdb_connection.
849 * server.h (report_fork_events): Declare global flag.
850 * target.h (struct target_ops) <handle_new_gdb_connection>:
851 New member.
852 (target_handle_new_gdb_connection): New macro.
853 * win32-low.c: Initialize new structure member.
854
855 2015-05-12 Don Breazeal <donb@codesourcery.com>
856
857 * mem-break.c (APPEND_TO_LIST): Define macro.
858 (clone_agent_expr): New function.
859 (clone_one_breakpoint): New function.
860 (clone_all_breakpoints): New function.
861 * mem-break.h: Declare new functions.
862
863 2015-05-12 Don Breazeal <donb@codesourcery.com>
864
865 * linux-low.c (linux_supports_fork_events): New function.
866 (linux_supports_vfork_events): New function.
867 (linux_target_ops): Initialize new structure members.
868 (initialize_low): Call linux_check_ptrace_features.
869 * lynx-low.c (lynx_target_ops): Initialize new structure
870 members.
871 * server.c (report_fork_events, report_vfork_events):
872 New global flags.
873 (handle_query): Add new features to qSupported packet and
874 response.
875 (captured_main): Initialize new global variables.
876 * target.h (struct target_ops) <supports_fork_events>:
877 New member.
878 <supports_vfork_events>: New member.
879 (target_supports_fork_events): New macro.
880 (target_supports_vfork_events): New macro.
881 * win32-low.c (win32_target_ops): Initialize new structure
882 members.
883
884 2015-05-12 Gary Benson <gbenson@redhat.com>
885
886 * server.c (handle_qxfer_exec_file): Use current process
887 if annex is empty.
888
889 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
890
891 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
892 Remove HAVE_PTRACE_GETREGS conditionals.
893 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
894 instead of PTRACE_GETREGS and PTRACE_SETREGS.
895
896 2015-05-08 Yao Qi <yao.qi@linaro.org>
897
898 * linux-low.c (linux_supports_conditional_breakpoints): New
899 function.
900 (linux_target_ops): Install new target method.
901 * lynx-low.c (lynx_target_ops): Install NULL hook for
902 supports_conditional_breakpoints.
903 * nto-low.c (nto_target_ops): Likewise.
904 * spu-low.c (spu_target_ops): Likewise.
905 * win32-low.c (win32_target_ops): Likewise.
906 * server.c (handle_query): Check
907 target_supports_conditional_breakpoints.
908 * target.h (struct target_ops) <supports_conditional_breakpoints>:
909 New field.
910 (target_supports_conditional_breakpoints): New macro.
911
912 2015-05-06 Pedro Alves <palves@redhat.com>
913
914 PR server/18081
915 * server.c (start_inferior): If the process exits, mourn it.
916
917 2015-04-21 Gary Benson <gbenson@redhat.com>
918
919 * hostio.c (fileio_open_flags_to_host): Factored out to
920 fileio_to_host_openflags in common/fileio.c. Single use
921 updated.
922
923 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
924
925 * linux-xtensa-low.c (xtensa_fill_gregset)
926 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
927 XCHAL_HAVE_LOOP.
928
929 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
930
931 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
932 (regs_info): Replace usrregs pointer with NULL.
933
934 2015-04-17 Gary Benson <gbenson@redhat.com>
935
936 * target.h (struct target_ops) <pid_to_exec_file>: New field.
937 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
938 * server.c (handle_qxfer_exec_file): New function.
939 (qxfer_packets): Add exec-file entry.
940 (handle_query): Report qXfer:exec-file:read as supported packet.
941
942 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
943
944 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
945
946 2015-04-09 Gary Benson <gbenson@redhat.com>
947
948 * hostio-errno.c (errno_to_fileio_error): Remove function.
949 Update caller to use remote_fileio_to_fio_error.
950
951 2015-04-09 Yao Qi <yao.qi@linaro.org>
952
953 * linux-low.c (linux_insert_point): Call
954 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
955 (linux_remove_point): Call remove_memory_breakpoint if type is
956 raw_bkpt_type_sw.
957 * linux-x86-low.c (x86_insert_point): Don't call
958 insert_memory_breakpoint.
959 (x86_remove_point): Don't call remove_memory_breakpoint.
960
961 2015-04-01 Pedro Alves <palves@redhat.com>
962 Cleber Rosa <crosa@redhat.com>
963
964 * server.c (gdbserver_usage): Reorganize and extend the usage
965 message.
966
967 2015-03-24 Pedro Alves <palves@redhat.com>
968
969 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
970 output. Also dump TRAP_TRACE.
971 (linux_low_filter_event): In debug output, distinguish a
972 resume_stop SIGSTOP from a delayed SIGSTOP.
973
974 2015-03-24 Gary Benson <gbenson@redhat.com>
975
976 * linux-x86-low.c (x86_linux_new_thread): Moved to
977 nat/x86-linux.c.
978 (x86_linux_prepare_to_resume): Likewise.
979
980 2015-03-24 Gary Benson <gbenson@redhat.com>
981
982 * Makefile.in (x86-linux-dregs.o): New rule.
983 * configure.srv: Add x86-linux-dregs.o to relevant targets.
984 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
985 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
986 (x86_linux_dr_get): Likewise.
987 (x86_linux_dr_set): Likewise.
988 (update_debug_registers_callback): Likewise.
989 (x86_linux_dr_set_addr): Likewise.
990 (x86_linux_dr_get_addr): Likewise.
991 (x86_linux_dr_set_control): Likewise.
992 (x86_linux_dr_get_control): Likewise.
993 (x86_linux_dr_get_status): Likewise.
994 (x86_linux_update_debug_registers): Likewise.
995
996 2015-03-24 Gary Benson <gbenson@redhat.com>
997
998 * linux-x86-low.c (x86_linux_update_debug_registers):
999 New function, factored out from...
1000 (x86_linux_prepare_to_resume): ...this.
1001
1002 2015-03-24 Gary Benson <gbenson@redhat.com>
1003
1004 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1005 (x86_linux_dr_set): Likewise.
1006 (update_debug_registers_callback): Likewise.
1007 (x86_linux_dr_set_addr): Likewise.
1008 (x86_linux_dr_get_addr): Likewise.
1009 (x86_linux_dr_set_control): Likewise.
1010 (x86_linux_dr_get_control): Likewise.
1011 (x86_linux_dr_get_status): Likewise.
1012 (x86_linux_prepare_to_resume): Likewise.
1013
1014 2015-03-24 Gary Benson <gbenson@redhat.com>
1015
1016 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1017 Use perror_with_name. Pass string through gettext.
1018 (x86_linux_dr_set): Likewise.
1019
1020 2015-03-24 Gary Benson <gbenson@redhat.com>
1021
1022 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1023 (x86_linux_dr_set_addr): ...this.
1024 (x86_dr_low_get_addr): Rename to...
1025 (x86_linux_dr_get_addr): ...this.
1026 (x86_dr_low_set_control): Rename to...
1027 (x86_linux_dr_set_control): ...this.
1028 (x86_dr_low_get_control): Rename to...
1029 (x86_linux_dr_get_control): ...this.
1030 (x86_dr_low_get_status): Rename to...
1031 (x86_linux_dr_get_status): ...this.
1032 (x86_dr_low): Update with new function names.
1033
1034 2015-03-24 Gary Benson <gbenson@redhat.com>
1035
1036 * Makefile.in (x86-linux.o): New rule.
1037 * configure.srv: Add x86-linux.o to relevant targets.
1038 * linux-low.c (lwp_set_arch_private_info): New function.
1039 (lwp_arch_private_info): Likewise.
1040 * linux-x86-low.c: Include nat/x86-linux.h.
1041 (arch_lwp_info): Removed structure.
1042 (update_debug_registers_callback):
1043 Use lwp_set_debug_registers_changed.
1044 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1045 and lwp_set_debug_registers_changed.
1046 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1047
1048 2015-03-24 Gary Benson <gbenson@redhat.com>
1049
1050 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1051 * linux-arm-low.c (arm_new_thread): Likewise.
1052 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1053 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1054 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1055 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1056
1057 2015-03-24 Gary Benson <gbenson@redhat.com>
1058
1059 * linux-low.c (ptid_of_lwp): New function.
1060 (lwp_is_stopped): Likewise.
1061 (lwp_stop_reason): Likewise.
1062 * linux-x86-low.c (update_debug_registers_callback):
1063 Use lwp_is_stopped.
1064 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1065 lwp_stop_reason.
1066
1067 2015-03-24 Gary Benson <gbenson@redhat.com>
1068
1069 * linux-low.h (linux_stop_lwp): Remove declaration.
1070
1071 2015-03-24 Gary Benson <gbenson@redhat.com>
1072
1073 * linux-low.h: Include nat/linux-nat.h.
1074 * linux-low.c (iterate_over_lwps_args): New structure.
1075 (iterate_over_lwps_filter): New function.
1076 (iterate_over_lwps): Likewise.
1077 * linux-x86-low.c (update_debug_registers_callback):
1078 Update signature to what iterate_over_lwps expects.
1079 Remove PID check that iterate_over_lwps now performs.
1080 (x86_dr_low_set_addr): Use iterate_over_lwps.
1081 (x86_dr_low_set_control): Likewise.
1082
1083 2015-03-24 Gary Benson <gbenson@redhat.com>
1084
1085 * linux-x86-low.c (x86_debug_reg_state): New function.
1086 (x86_linux_prepare_to_resume): Use the above.
1087
1088 2015-03-24 Gary Benson <gbenson@redhat.com>
1089
1090 * linux-low.c (current_lwp_ptid): New function.
1091 * linux-x86-low.c: Include nat/linux-nat.h.
1092 (x86_dr_low_get_addr): Use current_lwp_ptid.
1093 (x86_dr_low_get_control): Likewise.
1094 (x86_dr_low_get_status): Likewise.
1095
1096 2015-03-20 Pedro Alves <palves@redhat.com>
1097
1098 * tracepoint.c (cmd_qtstatus): Make "str" const.
1099
1100 2015-03-20 Pedro Alves <palves@redhat.com>
1101
1102 * server.c (handle_general_set): Make "req_str" const.
1103
1104 2015-03-19 Pedro Alves <palves@redhat.com>
1105
1106 * linux-low.c (linux_resume_one_lwp): Rename to ...
1107 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1108 instead call perror_with_name.
1109 (check_ptrace_stopped_lwp_gone): New function.
1110 (linux_resume_one_lwp): Reimplement as wrapper around
1111 linux_resume_one_lwp_throw that swallows errors if the LWP is
1112 gone.
1113
1114 2015-03-19 Pedro Alves <palves@redhat.com>
1115
1116 * linux-low.c (count_events_callback, select_event_lwp_callback):
1117 No longer check whether the thread has resume_stop as last resume
1118 kind.
1119
1120 2015-03-19 Pedro Alves <palves@redhat.com>
1121
1122 * linux-low.c (count_events_callback, select_event_lwp_callback):
1123 Use the lwp's status_pending_p field, not the thread's.
1124
1125 2015-03-19 Pedro Alves <palves@redhat.com>
1126
1127 * linux-low.c (select_event_lwp_callback): Update comments to
1128 no longer mention SIGTRAP.
1129
1130 2015-03-18 Gary Benson <gbenson@redhat.com>
1131
1132 * server.c (handle_query): Do not report vFile:fstat as supported.
1133
1134 2015-03-11 Gary Benson <gbenson@redhat.com>
1135
1136 * hostio.c (sys/types.h): New include.
1137 (sys/stat.h): Likewise.
1138 (common-remote-fileio.h): Likewise.
1139 (handle_fstat): New function.
1140 (handle_vFile): Handle vFile:fstat packets.
1141
1142 2015-03-11 Gary Benson <gbenson@redhat.com>
1143
1144 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1145 struct stat.st_blocks and struct stat.st_blksize.
1146 * configure: Regenerate.
1147 * config.in: Likewise.
1148 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1149 (OBS): Add common-remote-fileio.o.
1150 (common-remote-fileio.o): New rule.
1151
1152 2015-03-09 Pedro Alves <palves@redhat.com>
1153
1154 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1155 'struct sockaddr' pointer in 'accept' call.
1156
1157 2015-03-09 Pedro Alves <palves@redhat.com>
1158
1159 Revert:
1160 2015-03-07 Pedro Alves <palves@redhat.com>
1161 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1162 or <winsock2.h> here. Instead include "gdb_socket.h".
1163 (remote_open): Use union gdb_sockaddr_u.
1164 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1165 or <winsock2.h> here. Instead include "gdb_socket.h".
1166 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1167 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1168 or <sys/un.h>.
1169 (init_named_socket, gdb_agent_helper_thread): Use union
1170 gdb_sockaddr_u.
1171
1172 2015-03-07 Pedro Alves <palves@redhat.com>
1173
1174 * configure.ac (build_warnings): Move
1175 -Wdeclaration-after-statement to the C-specific set.
1176 * configure: Regenerate.
1177
1178 2015-03-07 Pedro Alves <palves@redhat.com>
1179
1180 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1181 or <winsock2.h> here. Instead include "gdb_socket.h".
1182 (remote_open): Use union gdb_sockaddr_u.
1183 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1184 or <winsock2.h> here. Instead include "gdb_socket.h".
1185 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1186 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1187 or <sys/un.h>.
1188 (init_named_socket, gdb_agent_helper_thread): Use union
1189 gdb_sockaddr_u.
1190
1191 2015-03-07 Pedro Alves <palves@redhat.com>
1192
1193 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1194 instead.
1195
1196 2015-03-06 Yao Qi <yao.qi@linaro.org>
1197
1198 * linux-aarch64-low.c (aarch64_insert_point): Use
1199 show_debug_regs as a boolean.
1200 (aarch64_remove_point): Likewise.
1201
1202 2015-03-05 Pedro Alves <palves@redhat.com>
1203
1204 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1205 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1206 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1207 * nto-low.c (nto_target_ops): Likewise.
1208 * spu-low.c (spu_target_ops): Likewise.
1209 * win32-low.c (win32_target_ops): Likewise.
1210
1211 2015-03-04 Pedro Alves <palves@redhat.com>
1212
1213 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1214 Decide whether a breakpoint triggered based on the SIGTRAP's
1215 siginfo.si_code.
1216 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1217 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1218 (linux_low_filter_event): Check for breakpoints before checking
1219 watchpoints.
1220 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1221 siginfo.si_code.
1222 (linux_stopped_by_sw_breakpoint)
1223 (linux_supports_stopped_by_sw_breakpoint)
1224 (linux_stopped_by_hw_breakpoint)
1225 (linux_supports_stopped_by_hw_breakpoint): New functions.
1226 (linux_target_ops): Install new target methods.
1227
1228 2015-03-04 Pedro Alves <palves@redhat.com>
1229
1230 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1231 * server.c (swbreak_feature, hwbreak_feature): New globals.
1232 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1233 (captured_main): Clear swbreak_feature and hwbreak_feature.
1234 * server.h (swbreak_feature, hwbreak_feature): Declare.
1235 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1236 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1237 supports_stopped_by_hw_breakpoint>: New fields.
1238 (target_supports_stopped_by_sw_breakpoint)
1239 (target_stopped_by_sw_breakpoint)
1240 (target_supports_stopped_by_hw_breakpoint)
1241 (target_stopped_by_hw_breakpoint): Declare.
1242
1243 2015-03-04 Pedro Alves <palves@redhat.com>
1244
1245 enum lwp_stop_reason -> enum target_stop_reason
1246 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1247 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1248 (linux_wait_1, stuck_in_jump_pad_callback)
1249 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1250 (linux_stopped_by_watchpoint):
1251 * linux-low.h (enum lwp_stop_reason): Delete.
1252 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1253 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1254
1255 2015-03-04 Yao Qi <yao.qi@linaro.org>
1256
1257 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1258
1259 2015-03-03 Gary Benson <gbenson@redhat.com>
1260
1261 * hostio.c (handle_vFile): Fix prefix lengths.
1262
1263 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1264
1265 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1266 ptr_bits.
1267
1268 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1269
1270 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1271 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1272 (clean): Add "rm -f" for above C files.
1273 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1274 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1275 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1276 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1277 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1278 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1279 (init_registers_s390x_vx_linux64)
1280 (init_registers_s390x_tevx_linux64)
1281 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1282 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1283 declarations.
1284 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1285 (s390_store_vxrs_high): New functions.
1286 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1287 NT_S390_VXRS_HIGH.
1288 (s390_arch_setup): Add logic for selecting one of the new target
1289 descriptions. Activate the new vector regsets if applicable.
1290 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1291 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1292 and init_registers_s390x_tevx_linux64.
1293
1294 2015-03-01 Pedro Alves <palves@redhat.com>
1295
1296 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1297 parameter.
1298
1299 2015-02-27 Pedro Alves <palves@redhat.com>
1300
1301 * linux-x86-low.c (u_debugreg_offset): New function.
1302 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1303
1304 2015-02-27 Pedro Alves <palves@redhat.com>
1305
1306 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1307 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1308 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1309 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1310 (ps_lsetfpregs, ps_getpid)
1311 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1312 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1313 (ps_lsetxregs, ps_plog): Declare.
1314
1315 2015-02-27 Pedro Alves <palves@redhat.com>
1316
1317 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1318 IP_AGENT_EXPORT_FUNC.
1319 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1320 IP_AGENT_EXPORT_FUNC.
1321 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1322 (IP_AGENT_EXPORT): Delete.
1323 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1324 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1325 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1326 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1327 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1328 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1329 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1330 (traceframe_read_count, traceframe_write_count)
1331 (traceframes_created, trace_state_variables, get_raw_reg)
1332 (get_trace_state_variable_value, set_trace_state_variable_value)
1333 (ust_loaded, helper_thread_id, cmd_buf): Use
1334 IPA_SYM_EXPORTED_NAME.
1335 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1336 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1337 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1338 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1339 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1340 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1341 EXTERN_C_PUSH/EXTERN_C_POP.
1342 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1343 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1344 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1345 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1346 (traceframe_write_count, traceframe_read_count)
1347 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1348 (about_to_request_buffer_space, get_trace_state_variable_value)
1349 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1350 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1351 EXTERN_C_PUSH/EXTERN_C_POP.
1352 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1353 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1354 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1355 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1356 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1357 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1358 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1359 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1360 Define.
1361 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1362 (IP_AGENT_EXPORT_VAR_DECL): Define.
1363 (tracing): Declare.
1364 (gdb_agent_get_raw_reg): Declare.
1365
1366 2015-02-27 Tom Tromey <tromey@redhat.com>
1367 Pedro Alves <palves@redhat.com>
1368
1369 Rename symbols whose names are reserved C++ keywords throughout.
1370
1371 2015-02-27 Pedro Alves <palves@redhat.com>
1372
1373 * Makefile.in (COMPILER): New, get it from autoconf.
1374 (CXX): Get from autoconf instead.
1375 (COMPILE.pre): Use COMPILER.
1376 (CC-LD): Rename to ...
1377 (CC_LD): ... this. Use COMPILER.
1378 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1379 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1380 * acinclude.m4: Include build-with-cxx.m4.
1381 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1382 Disable -Werror by default if building in C++ mode.
1383 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1384 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1385 the C++ compiler. Save/restore CXXFLAGS too.
1386 * configure: Regenerate.
1387
1388 2015-02-27 Pedro Alves <palves@redhat.com>
1389
1390 * acinclude.m4: Include libiberty.m4.
1391 * configure.ac: Call libiberty_INIT.
1392 * config.in, configure: Regenerate.
1393
1394 2015-02-26 Pedro Alves <palves@redhat.com>
1395
1396 * linux-low.c (linux_wait_1): When incrementing the PC past a
1397 program breakpoint always use the_low_target.breakpoint_len as
1398 increment, rather than the maximum between that and
1399 the_low_target.decr_pc_after_break.
1400
1401 2015-02-23 Pedro Alves <palves@redhat.com>
1402
1403 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1404 thread was doing a step-over; always adjust the PC if
1405 we stepped over a permanent breakpoint.
1406 (linux_wait_1): If we stepped over breakpoint that was on top of a
1407 permanent breakpoint, manually advance the PC past it.
1408
1409 2015-02-23 Pedro Alves <palves@redhat.com>
1410
1411 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1412 modes.
1413 (x86_fill_gregset, x86_store_gregset): Use it when handling
1414 $orig_eax.
1415
1416 2015-02-20 Pedro Alves <palves@redhat.com>
1417
1418 * thread-db.c: Include "nat/linux-procfs.h".
1419 (thread_db_init): Skip listing new threads if the kernel supports
1420 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1421
1422 2015-02-20 Pedro Alves <palves@redhat.com>
1423
1424 * linux-low.c (status_pending_p_callback): Use ptid_match.
1425
1426 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1427
1428 PR breakpoints/16812
1429 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1430 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1431 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1432
1433 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1434
1435 PR breakpoints/15956
1436 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1437
1438 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1439
1440 * linux-low.c (linux_low_btrace_conf): Print size.
1441 * server.c (handle_btrace_conf_general_set): New.
1442 (hanle_general_set): Call handle_btrace_conf_general_set.
1443 (handle_query): Report Qbtrace-conf:bts:size as supported.
1444
1445 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1446
1447 * linux-low.c (linux_low_enable_btrace): Update parameters.
1448 (linux_low_btrace_conf): New.
1449 (linux_target_ops)<to_btrace_conf>: Initialize.
1450 * server.c (current_btrace_conf): New.
1451 (handle_btrace_enable): Rename to ...
1452 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1453 to target_enable_btrace. Update comment. Update users.
1454 (handle_qxfer_btrace_conf): New.
1455 (qxfer_packets): Add btrace-conf entry.
1456 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1457 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1458 (target_ops)<read_btrace_conf>: New.
1459 (target_enable_btrace): Update parameters.
1460 (target_read_btrace_conf): New.
1461
1462 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1463
1464 * server.c (handle_btrace_general_set): Remove call to
1465 target_supports_btrace.
1466 (supported_btrace_packets): New.
1467 (handle_query): Call supported_btrace_packets.
1468 * target.h: include btrace-common.h.
1469 (btrace_target_info): Removed.
1470 (supports_btrace, target_supports_btrace): Update parameters.
1471
1472 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1473
1474 * Makefile.in (SFILES): Add common/btrace-common.c.
1475 (OBS): Add common/btrace-common.o.
1476 (btrace-common.o): Add build rules.
1477 * linux-low: Include btrace-common.h.
1478 (linux_low_read_btrace): Use struct btrace_data. Call
1479 btrace_data_init and btrace_data_fini.
1480
1481 2015-02-06 Pedro Alves <palves@redhat.com>
1482
1483 * thread-db.c (find_new_threads_callback): Add debug output.
1484
1485 2015-02-04 Pedro Alves <palves@redhat.com>
1486
1487 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1488 (resume_stopped_resumed_lwps): New function.
1489 (linux_wait_for_event_filtered): Use it.
1490
1491 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1492
1493 * Makefile.in (SFILES): Add linux-personality.c.
1494 (linux-personality.o): New rule.
1495 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1496 list of objects to be built.
1497 * linux-low.c: Include nat/linux-personality.h.
1498 (linux_create_inferior): Remove code to disable address space
1499 randomization (moved to ../nat/linux-personality.c). Create
1500 cleanup to disable address space randomization.
1501
1502 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1503
1504 * Makefile.in (posix-strerror.o): New rule.
1505 (mingw-strerror.o): Likewise.
1506 * configure: Regenerated.
1507 * configure.ac: Source file ../common/common.host. Initialize new
1508 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1509
1510 2015-01-14 Yao Qi <yao@codesourcery.com>
1511
1512 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1513 (ppc-linux.o): New rule.
1514 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1515 * configure.ac: AC_CHECK_FUNCS(getauxval).
1516 * config.in: Re-generated.
1517 * configure: Re-generated.
1518 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1519 ppc64_64bit_inferior_p
1520
1521 2015-01-14 Yao Qi <yao@codesourcery.com>
1522
1523 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1524 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1525 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1526 (PT_ORIG_R3, PT_TRAP): Likewise.
1527 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1528 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1529 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1530
1531 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1532
1533 * i387-fp.c (i387_cache_to_xsave): In look over
1534 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1535 zmmh_low_space field by use of zmmh_high_space.
1536
1537 2015-01-09 Pedro Alves <palves@redhat.com>
1538
1539 * linux-low.c (step_over_bkpt): Move higher up in the file.
1540 (handle_extended_wait): Don't store the stop_pc here.
1541 (get_stop_pc): Adjust comments and rename to ...
1542 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1543 stopped for a software breakpoint or hardware breakpoint.
1544 (thread_still_has_status_pending_p): New function.
1545 (status_pending_p_callback): Use
1546 thread_still_has_status_pending_p. If the event is no longer
1547 interesting, resume the LWP.
1548 (handle_tracepoints): Add assert.
1549 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1550 (wstatus_maybe_breakpoint): New function.
1551 (cancel_breakpoint): Delete function.
1552 (check_stopped_by_watchpoint): New function, factored out from
1553 linux_low_filter_event.
1554 (lp_status_maybe_breakpoint): Delete function.
1555 (linux_low_filter_event): Remove filter_ptid argument.
1556 Leave thread group exits pending here. Store the LWP's stop PC.
1557 Always leave events pending.
1558 (linux_wait_for_event_filtered): Pull all events out of the
1559 kernel, and leave them all pending.
1560 (count_events_callback, select_event_lwp_callback): Consider all
1561 events.
1562 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1563 (select_event_lwp): Only give preference to the stepping LWP in
1564 all-stop mode. Adjust comments.
1565 (ignore_event): New function.
1566 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1567 references to cancel_breakpoints. Adjust to renames. Also give
1568 equal priority to all LWPs that have had events in non-stop mode.
1569 If reporting a software breakpoint event, unadjust the LWP's PC.
1570 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1571 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1572 Adjust.
1573 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1574 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1575 (linux_stopped_by_watchpoint): Adjust.
1576 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1577 * linux-low.h (enum lwp_stop_reason): New.
1578 (struct lwp_info) <stop_pc>: Adjust comment.
1579 <stopped_by_watchpoint>: Delete field.
1580 <stop_reason>: New field.
1581 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1582 * mem-break.c (software_breakpoint_inserted_here)
1583 (hardware_breakpoint_inserted_here): New function.
1584 * mem-break.h (software_breakpoint_inserted_here)
1585 (hardware_breakpoint_inserted_here): Declare.
1586 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1587 (cancel_breakpoints): Delete.
1588 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1589 (upload_fast_traceframes): Remove references to
1590 cancel_breakpoints.
1591
1592 2015-01-09 Pedro Alves <palves@redhat.com>
1593
1594 * thread-db.c (find_new_threads_callback): Ignore thread if the
1595 kernel thread ID is -1.
1596
1597 2015-01-09 Pedro Alves <palves@redhat.com>
1598
1599 * linux-low.c (linux_attach_fail_reason_string): Move to
1600 nat/linux-ptrace.c, and rename.
1601 (linux_attach_lwp): Update comment.
1602 (attach_proc_task_lwp_callback): New function.
1603 (linux_attach): Adjust to rename and use
1604 linux_proc_attach_tgid_threads.
1605 (linux_attach_fail_reason_string): Delete declaration.
1606
1607 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1608
1609 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1610 * server.c (gdbserver_version): Likewise.
1611
1612 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1613
1614 * remote-utils.c: Include ctype.h.
1615 (input_interrupt): Explicitly handle the case when the char
1616 received is the NUL byte. Improve the printing of non-ASCII
1617 characters.
1618
1619 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1620
1621 * linux-low.c (linux_low_filter_event): Update call to
1622 linux_enable_event_reporting following the addition of
1623 a new parameter to that function.
1624
1625 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1626
1627 PR server/17457
1628 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1629 (AARCH64_FPCR_REGNO): Likewise.
1630 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1631 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1632 (aarch64_store_fpregset): Likewise.
1633
1634 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1635
1636 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1637 Remove FIXME comment about assumption about N.
1638
1639 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1640
1641 * configure.ac: If large-file support is disabled in GDBserver,
1642 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1643 * configure: Regenerate.
1644
1645 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1646
1647 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1648 warning upon ENODATA from ptrace.
1649 * linux-s390-low.c (s390_store_tdb): New.
1650 (s390_regsets): Add regset for NT_S390_TDB.
1651
1652 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1653
1654 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1655 without a fill_function.
1656 * linux-s390-low.c (s390_fill_last_break): Remove.
1657 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1658 (s390_arch_setup): Use regset's size instead of fill_function for
1659 loop end condition.
1660
1661 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1662
1663 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1664 the regset's store function when ptrace returned an error.
1665 * regcache.c (get_thread_regcache): Invalidate register cache
1666 before fetching inferior's registers.
1667
1668 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1669
1670 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1671 while-loop as for-loop.
1672 (regsets_store_inferior_registers): Likewise.
1673
1674 2014-11-28 Yao Qi <yao@codesourcery.com>
1675
1676 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1677 * config.in, configure: Re-generate.
1678 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1679 is defined.
1680
1681 2014-11-21 Yao Qi <yao@codesourcery.com>
1682
1683 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1684 (AC_CHECK_HEADERS): Remove malloc.h.
1685 * configure: Re-generated.
1686 * config.in: Re-generated.
1687 * server.h: Don't include alloca.h and malloc.h.
1688 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1689 Don't include malloc.h.
1690
1691 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1692
1693 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1694 corresponding ERRNO check in same block.
1695
1696 2014-11-12 Pedro Alves <palves@redhat.com>
1697
1698 * server.c (cont_thread): Update comment.
1699 (start_inferior, attach_inferior): No longer clear cont_thread.
1700 (handle_v_cont): No longer set cont_thread.
1701 (captured_main): Clear cont_thread each time a GDB connects.
1702
1703 2014-11-12 Pedro Alves <palves@redhat.com>
1704
1705 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1706 thread, and don't resume all threads if the Hc thread has exited.
1707
1708 2014-11-12 Pedro Alves <palves@redhat.com>
1709
1710 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1711 the process group instead of to a specific LWP.
1712
1713 2014-10-15 Pedro Alves <palves@redhat.com>
1714
1715 PR server/17487
1716 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1717 parameter.
1718 (arm_set_thread_context): Delete.
1719 (the_low_target): Adjust.
1720 * win32-i386-low.c (debug_registers_changed)
1721 (debug_registers_used): Delete.
1722 (update_debug_registers_callback): New function.
1723 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1724 needing to update their debug registers.
1725 (win32_get_current_dr): New function.
1726 (x86_dr_low_get_addr, x86_dr_low_get_control)
1727 (x86_dr_low_get_status): Fetch the debug register from the thread
1728 record's context.
1729 (i386_initial_stuff): Adjust.
1730 (i386_get_thread_context): Remove current_event parameter. Don't
1731 clear debug_registers_changed nor copy DR values to
1732 debug_reg_state.
1733 (i386_set_thread_context): Delete.
1734 (i386_prepare_to_resume): New function.
1735 (i386_thread_added): Mark the thread as needing to update irs
1736 debug registers.
1737 (the_low_target): Remove i386_set_thread_context and install
1738 i386_prepare_to_resume.
1739 * win32-low.c (win32_get_thread_context): Adjust.
1740 (win32_set_thread_context): Use SetThreadContext
1741 directly.
1742 (win32_prepare_to_resume): New function.
1743 (win32_require_context): New function, factored out from ...
1744 (thread_rec): ... this.
1745 (continue_one_thread): Call win32_prepare_to_resume on each thread
1746 we're about to continue.
1747 (win32_resume): Call win32_prepare_to_resume on the event thread.
1748 * win32-low.h (struct win32_thread_info)
1749 <debug_registers_changed>: New field.
1750 (struct win32_target_ops): Change prototype of set_thread_context,
1751 delete set_thread_context and add prepare_to_resume.
1752 (win32_require_context): New declaration.
1753
1754 2014-10-08 Gary Benson <gbenson@redhat.com>
1755
1756 * server.h: Do not include common-exceptions.h.
1757
1758 2014-10-08 Gary Benson <gbenson@redhat.com>
1759
1760 * server.h: Do not include cleanups.h.
1761
1762 2014-09-30 James Hogan <james.hogan@imgtec.com>
1763
1764 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1765 mips64-dsp-linux.c.
1766
1767 2014-09-23 Yao Qi <yao@codesourcery.com>
1768
1769 * linux-low.c (lp_status_maybe_breakpoint): New function.
1770 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1771 (count_events_callback): Likewise.
1772 (select_event_lwp_callback): Likewise.
1773 (cancel_breakpoints_callback): Likewise.
1774
1775 2014-09-19 Don Breazeal <donb@codesourcery.com>
1776
1777 * linux-low.c (handle_extended_wait): Call
1778 linux_ptrace_get_extended_event.
1779 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1780 linux_is_extended_waitstatus.
1781
1782 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1783
1784 * Makefile.in (CPPFLAGS): Define.
1785 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1786 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1787
1788 2014-09-16 Gary Benson <gbenson@redhat.com>
1789
1790 * inferiors.h (current_inferior): Renamed as...
1791 (current_thread): New variable. All uses updated.
1792 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1793 (maybe_move_out_of_jump_pad): Likewise.
1794 (cancel_breakpoint): Likewise.
1795 (linux_low_filter_event): Likewise.
1796 (wait_for_sigstop): Likewise.
1797 (linux_resume_one_lwp): Likewise.
1798 (need_step_over_p): Likewise.
1799 (start_step_over): Likewise.
1800 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1801 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1802 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1803 and save_inferior as saved_thread.
1804 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1805 saved_thread.
1806 (regcache_invalidate_thread): Likewise.
1807 * remote-utils.c (prepare_resume_reply): Likewise.
1808 * thread-db.c (thread_db_get_tls_address): Likewise.
1809 (disable_thread_event_reporting): Likewise.
1810 (remove_thread_event_breakpoints): Likewise.
1811 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1812 as saved_thread.
1813 * target.h (set_desired_inferior): Renamed as...
1814 (set_desired_thread): New declaration. All uses updated.
1815 * server.c (myresume): Updated comment to reference thread instead
1816 of inferior.
1817 (handle_serial_event): Likewise.
1818 (handle_target_event): Likewise.
1819
1820 2014-09-12 Tom Tromey <tromey@redhat.com>
1821 Gary Benson <gbenson@redhat.com>
1822
1823 * regcache.h: Include common-regcache.h.
1824 (regcache_read_pc): Don't declare.
1825 * regcache.c (get_thread_regcache_for_ptid): New function.
1826
1827 2014-09-11 Tom Tromey <tromey@redhat.com>
1828 Gary Benson <gbenson@redhat.com>
1829
1830 * symbol.c: New file.
1831 * Makefile.in (SFILES): Add symbol.c.
1832 (OBS): Add symbol.o.
1833
1834 2014-09-11 Gary Benson <gbenson@redhat.com>
1835
1836 * target.c (target_stop_ptid, target_continue_ptid): New
1837 functions.
1838
1839 2014-09-11 Tom Tromey <tromey@redhat.com>
1840 Gary Benson <gbenson@redhat.com>
1841
1842 * target.h: Include target/target.h.
1843 * target.c (target_read_memory, target_read_uint32)
1844 (target_write_memory): New functions.
1845
1846 2014-09-11 Gary Benson <gbenson@redhat.com>
1847
1848 * server.h (debug_hw_points): Don't declare.
1849 * server.c (debug_hw_points): Don't define. Replace all uses
1850 with show_debug_regs.
1851 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1852 all uses with show_debug_regs.
1853
1854 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1855
1856 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1857 endianness into account.
1858 (ppc_supply_ptrace_register): Likewise.
1859
1860 2014-09-03 James Hogan <james.hogan@imgtec.com>
1861
1862 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1863 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1864
1865 2014-09-03 Gary Benson <gbenson@redhat.com>
1866
1867 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1868 ALL_DEBUG_ADDRESS_REGISTERS.
1869
1870 2014-09-02 Gary Benson <gbenson@redhat.com>
1871
1872 * i386-low.h: Renamed as...
1873 * x86-low.h: New file. All type, function and variable name
1874 prefixes changed from "i386_" to "x86_". All references updated.
1875 * i386-low.c: Renamed as...
1876 * x86-low.c: New file. All type, function and variable name
1877 prefixes changed from "i386_" to "x86_". All references updated.
1878
1879 2014-09-02 Gary Benson <gbenson@redhat.com>
1880
1881 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1882 (x86_linux_new_thread): Likewise.
1883
1884 2014-08-29 Gary Benson <gbenson@redhat.com>
1885
1886 * server.h (setjmp.h): Do not include.
1887 (toplevel): Do not declare.
1888 (common-exceptions.h): Include.
1889 (cleanups.h): Likewise.
1890 * server.c (toplevel): Do not define.
1891 (exit_code): New static global.
1892 (detach_or_kill_for_exit_cleanup): New function.
1893 (main): New function. Original main renamed to...
1894 (captured_main): New function.
1895 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1896
1897 2014-08-29 Gary Benson <gbenson@redhat.com>
1898
1899 * Makefile.in (SFILES): Add common/common-exceptions.c.
1900 (OBS): Add common-exceptions.o.
1901 (common-exceptions.o): New rule.
1902 * utils.c (prepare_to_throw_exception): New function.
1903
1904 2014-08-29 Gary Benson <gbenson@redhat.com>
1905
1906 * config.in: Regenerate.
1907 * configure: Likewise.
1908
1909 2014-08-29 Gary Benson <gbenson@redhat.com>
1910
1911 * Makefile.in (SFILES): Add common/cleanups.c.
1912 (OBS): cleanups.o.
1913 (cleanups.o): New rule.
1914
1915 2014-08-29 Gary Benson <gbenson@redhat.com>
1916
1917 * utils.c (internal_vwarning): New function.
1918
1919 2014-08-28 Gary Benson <gbenson@redhat.com>
1920
1921 * utils.h (fatal): Remove declaration.
1922 * utils.c (fatal): Remove function.
1923
1924 2014-08-28 Gary Benson <gbenson@redhat.com>
1925
1926 * tracepoint.c (gdb_agent_init): Replace fatal with
1927 perror_with_name.
1928 (initialize_tracepoint): Likewise.
1929
1930 2014-08-28 Gary Benson <gbenson@redhat.com>
1931
1932 * remote-utils.c (remote_prepare): Replace fatal with error.
1933
1934 2014-08-28 Gary Benson <gbenson@redhat.com>
1935
1936 * linux-low.c (linux_async): Replace fatal with warning.
1937 Tidy up and return.
1938 (linux_start_non_stop): Return -1 if linux_async failed.
1939
1940 2014-08-28 Gary Benson <gbenson@redhat.com>
1941
1942 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1943 gdb_assert.
1944 (i386_dr_low_get_addr): Remove vague comment.
1945 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1946 gdb_assert.
1947
1948 2014-08-28 Gary Benson <gbenson@redhat.com>
1949
1950 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1951 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1952 internal_error.
1953 (linux_resume_one_lwp): Likewise.
1954 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1955 gdb_assert.
1956 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1957 with internal_error.
1958 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1959 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1960 (find_register_by_name): Replace fatal with internal_error.
1961 (find_regno): Likewise.
1962 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1963 * thread-db.c (thread_db_create_event): Likewise.
1964 (thread_db_load_search): Likewise.
1965 (try_thread_db_load_1): Likewise.
1966 * tracepoint.c (get_jump_space_head): Replace fatal with
1967 internal_error.
1968 (claim_trampoline_space): Likewise.
1969 (have_fast_tracepoint_trampoline_buffer): Likewise.
1970 (cmd_qtstart): Likewise.
1971 (stop_tracing): Likewise.
1972 (fast_tracepoint_collecting): Likewise.
1973 (target_malloc): Likewise.
1974 (download_tracepoint): Likewise.
1975 (download_trace_state_variables): Replace check with gdb_assert.
1976 (upload_fast_traceframes): Replace fatal with internal_error.
1977
1978 2014-08-19 Tom Tromey <tromey@redhat.com>
1979 Gary Benson <gbenson@redhat.com>
1980
1981 * Makefile.in (SFILES): Add common/common-debug.c.
1982 (OBS): Add common-debug.o.
1983 (common-debug.o): New rule.
1984 * debug.h (debug_printf): Don't declare.
1985 * debug.c (debug_printf): Renamed and rewritten as...
1986 (debug_vprintf): New function.
1987
1988 2014-08-19 Gary Benson <gbenson@redhat.com>
1989
1990 * utils.h: Do not include print-utils.h.
1991
1992 2014-08-19 Tom Tromey <tromey@redhat.com>
1993 Gary Benson <gbenson@redhat.com>
1994
1995 * server.h: Add static assertion.
1996 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1997
1998 2014-08-19 Tom Tromey <tromey@redhat.com>
1999 Gary Benson <gbenson@redhat.com>
2000
2001 * Makefile.in (SFILES): Add common/errors.c.
2002 (OBS): Add errors.o.
2003 (IPA_OBS): Add errors-ipa.o.
2004 (errors.o): New rule.
2005 (errors-ipa.o): Likewise.
2006 * utils.h (perror_with_name, error, warning): Don't declare.
2007 * utils.c (warning): Renamed and rewritten as...
2008 (vwarning): New function.
2009 (error): Renamed and rewritten as...
2010 (verror): New function.
2011 (internal_error): Renamed and rewritten as...
2012 (internal_verror): New function.
2013
2014 2014-08-07 Gary Benson <gbenson@redhat.com>
2015
2016 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2017 * configure: Regenerate.
2018 * config.in: Likewise.
2019 * server.h: Do not include errno.h.
2020 * event-loop.c: Likewise.
2021 * hostio-errno.c: Likewise.
2022 * linux-low.c: Likewise.
2023 * remote-utils.c: Likewise.
2024 * spu-low.c: Likewise.
2025 * utils.c: Likewise.
2026 * gdbreplay.c: Unconditionally include errno.h.
2027
2028 2014-08-07 Gary Benson <gbenson@redhat.com>
2029
2030 * server.h: Do not include string.h.
2031 * event-loop.c: Likewise.
2032 * linux-low.c: Likewise.
2033 * regcache.c: Likewise.
2034 * remote-utils.c: Likewise.
2035 * spu-low.c: Likewise.
2036 * utils.c: Likewise.
2037
2038 2014-08-07 Gary Benson <gbenson@redhat.com>
2039
2040 * server.h: Do not include gdb_assert.h.
2041
2042 2014-08-07 Gary Benson <gbenson@redhat.com>
2043
2044 * server.h: Do not include common-utils.h.
2045
2046 2014-08-07 Gary Benson <gbenson@redhat.com>
2047
2048 * server.h: Do not include ptid.h.
2049 * notif.h: Likewise.
2050
2051 2014-08-07 Gary Benson <gbenson@redhat.com>
2052
2053 * server.h: Do not include gdb_locale.h.
2054
2055 2014-08-07 Gary Benson <gbenson@redhat.com>
2056
2057 * server.h: Do not include gdb/signals.h.
2058 * win32-low.c: Likewise.
2059
2060 2014-08-07 Gary Benson <gbenson@redhat.com>
2061
2062 * server.h: Do not include pathmax.h.
2063
2064 2014-08-07 Gary Benson <gbenson@redhat.com>
2065
2066 * server.h: Do not include libiberty.h.
2067 * linux-bfin-low.c: Likewise.
2068
2069 2014-08-07 Gary Benson <gbenson@redhat.com>
2070
2071 * server.h: Do not include ansidecl.h.
2072
2073 2014-08-07 Gary Benson <gbenson@redhat.com>
2074
2075 * linux-x86-low.c: Do not include stddef.h.
2076 * lynx-ppc-low.c: Likewise.
2077 * tracepoint.c: Likewise.
2078
2079 2014-08-07 Gary Benson <gbenson@redhat.com>
2080
2081 * server.h: Do not include stdarg.h.
2082 * nto-low.c: Likewise.
2083
2084 2014-08-07 Gary Benson <gbenson@redhat.com>
2085
2086 * server.h: Do not include stdlib.h.
2087 * inferiors.c: Likewise.
2088 * linux-low.c: Likewise.
2089 * regcache.c: Likewise.
2090 * spu-low.c: Likewise.
2091 * tracepoint.c: Likewise.
2092 * utils.c: Likewise.
2093
2094 2014-08-07 Gary Benson <gbenson@redhat.com>
2095
2096 * server.h: Do not include stdio.h.
2097 * linux-low.c: Likewise.
2098 * remote-utils.c: Likewise.
2099 * spu-low.c: Likewise.
2100 * utils.c: Likewise.
2101 * wincecompat.c: Likewise.
2102
2103 2014-08-06 Gary Benson <gbenson@redhat.com>
2104
2105 * regcache.c (init_register_cache): Move conditionals inside if.
2106
2107 2014-08-06 Gary Benson <gbenson@redhat.com>
2108
2109 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2110
2111 2014-07-31 Gary Benson <gbenson@redhat.com>
2112
2113 * ax.h: Do not include server.h.
2114 * gdbthread.h: Likewise.
2115 * lynx-low.h: Likewise.
2116 * notif.h: Likewise.
2117
2118 2014-07-30 Gary Benson <gbenson@redhat.com>
2119
2120 * server.h: Include common-defs.h.
2121 Do not include config.h or build-gnulib-gdbserver/config.h.
2122
2123 2014-07-30 Gary Benson <gbenson@redhat.com>
2124
2125 * hostio-errno.c: Move server.h to top of includes list.
2126 * inferiors.c: Likewise.
2127 * linux-x86-low.c: Likewise.
2128 * notif.c: Include server.h.
2129
2130 2014-07-24 Tom Tromey <tromey@redhat.com>
2131 Gary Benson <gbenson@redhat.com>
2132
2133 * server.h (CORE_ADDR): Now unsigned.
2134
2135 2014-07-16 Pedro Alves <palves@redhat.com>
2136
2137 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2138
2139 2014-07-15 Pedro Alves <palves@redhat.com>
2140
2141 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2142 copy.
2143
2144 2014-07-11 Pedro Alves <palves@redhat.com>
2145
2146 * linux-low.c (kill_wait_lwp): New function, based on
2147 kill_one_lwp_callback, but use my_waitpid directly.
2148 (kill_one_lwp_callback, linux_kill): Use it.
2149
2150 2014-06-23 Pedro Alves <palves@redhat.com>
2151
2152 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2153 before setting DR0..DR3.
2154
2155 2014-06-20 Gary Benson <gbenson@redhat.com>
2156
2157 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2158 * configure: Regenerated.
2159 * config.in: Likewise.
2160
2161 2014-06-20 Gary Benson <gbenson@redhat.com>
2162
2163 * Makefile.in (SFILES): Update locations for files moved
2164 from common to nat.
2165 (object file files): Reordered.
2166
2167 2014-06-20 Gary Benson <gbenson@redhat.com>
2168
2169 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2170 (i386_dr_low_set_addr): Likewise.
2171 (i386_dr_low_get_addr): Likewise.
2172 (i386_dr_low_can_set_control): Likewise.
2173 (i386_dr_low_set_control): Likewise.
2174 (i386_dr_low_get_control): Likewise.
2175 (i386_dr_low_get_status): Likewise.
2176 (i386_get_debug_register_length): Likewise.
2177 * linux-x86-low.c (i386_dr_low_set_addr):
2178 Changed signature. Made static.
2179 (i386_dr_low_get_addr): Likewise.
2180 (i386_dr_low_set_control): Likewise.
2181 (i386_dr_low_get_control): Likewise.
2182 (i386_dr_low_get_status): Likewise.
2183 (i386_dr_low): New global variable.
2184 * win32-i386-low.c (i386_dr_low_set_addr):
2185 Changed signature. Made static.
2186 (i386_dr_low_get_addr): Likewise.
2187 (i386_dr_low_set_control): Likewise.
2188 (i386_dr_low_get_control): Likewise.
2189 (i386_dr_low_get_status): Likewise.
2190 (i386_dr_low): New global variable.
2191
2192 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2193
2194 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2195 * Makefile.in (AR, AR_FLAGS): Define.
2196 * configure: Regenerate.
2197
2198 2014-06-19 Gary Benson <gbenson@redhat.com>
2199
2200 * Makefile.in (i386-dregs.o): New rule.
2201 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2202 * i386-low.c (target.h): Remove include.
2203 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2204 (DR_CONTROL_SHIFT): Likewise.
2205 (DR_CONTROL_SIZE): Likewise.
2206 (DR_RW_EXECUTE): Likewise.
2207 (DR_RW_WRITE): Likewise.
2208 (DR_RW_READ): Likewise.
2209 (DR_RW_IORW): Likewise.
2210 (DR_LEN_1): Likewise.
2211 (DR_LEN_2): Likewise.
2212 (DR_LEN_4): Likewise.
2213 (DR_LEN_8): Likewise.
2214 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2215 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2216 (DR_ENABLE_SIZE): Likewise.
2217 (DR_LOCAL_SLOWDOWN): Likewise.
2218 (DR_GLOBAL_SLOWDOWN): Likewise.
2219 (DR_CONTROL_RESERVED): Likewise.
2220 (I386_DR_CONTROL_MASK): Likewise.
2221 (I386_DR_VACANT): Likewise.
2222 (I386_DR_LOCAL_ENABLE): Likewise.
2223 (I386_DR_GLOBAL_ENABLE): Likewise.
2224 (I386_DR_DISABLE): Likewise.
2225 (I386_DR_SET_RW_LEN): Likewise.
2226 (I386_DR_GET_RW_LEN): Likewise.
2227 (I386_DR_WATCH_HIT): Likewise.
2228 (i386_wp_op_t): Likewise.
2229 (i386_show_dr): Likewise.
2230 (i386_length_and_rw_bits): Likewise.
2231 (i386_insert_aligned_watchpoint): Likewise.
2232 (i386_remove_aligned_watchpoint): Likewise.
2233 (i386_handle_nonaligned_watchpoint): Likewise.
2234 i386_update_inferior_debug_regs(): Likewise.
2235 (i386_dr_insert_watchpoint): Likewise.
2236 (i386_dr_remove_watchpoint): Likewise.
2237 (i386_dr_region_ok_for_watchpoint): Likewise.
2238 (i386_dr_stopped_data_address): Likewise.
2239 (i386_dr_stopped_by_watchpoint): Likewise.
2240
2241 2014-06-19 Gary Benson <gbenson@redhat.com>
2242
2243 * i386-low.c (i386_dr_show): Renamed to
2244 i386_show_dr and made static. All uses updated.
2245 (i386_dr_length_and_rw_bits): Renamed to
2246 i386_length_and_rw_bits and made static.
2247 All uses updated.
2248 (i386_dr_insert_aligned_watchpoint): Renamed to
2249 i386_insert_aligned_watchpoint and made static.
2250 All uses updated.
2251 (i386_dr_remove_aligned_watchpoint): Renamed to
2252 i386_remove_aligned_watchpoint and made static.
2253 All uses updated.
2254 (i386_dr_update_inferior_debug_regs): Renamed to
2255 i386_update_inferior_debug_regs and made static.
2256 All uses updated.
2257
2258 2014-06-18 Gary Benson <gbenson@redhat.com>
2259
2260 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2261 (i386_dr_low_can_set_control): Likewise.
2262 (i386_get_debug_register_length): Likewise.
2263 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2264 (i386_dr_low_can_set_control): Likewise.
2265 (i386_get_debug_register_length): Likewise.
2266
2267 2014-06-17 Gary Benson <gbenson@redhat.com>
2268
2269 * i386-low.h (i386-dregs.h): New include.
2270 (DR_FIRSTADDR): Now in i386-dregs.h.
2271 (DR_LASTADDR): Likewise.
2272 (DR_NADDR): Likewise.
2273 (DR_STATUS): Likewise.
2274 (DR_CONTROL): Likewise.
2275 (i386_debug_reg_state): Likewise.
2276 (i386_dr_insert_watchpoint): Likewise.
2277 (i386_dr_remove_watchpoint): Likewise.
2278 (i386_dr_region_ok_for_watchpoint): Likewise.
2279 (i386_dr_stopped_data_address): Likewise.
2280 (i386_dr_stopped_by_watchpoint): Likewise.
2281 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2282
2283 2014-06-18 Gary Benson <gbenson@redhat.com>
2284
2285 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2286 i386_dr_insert_watchpoint.
2287 (i386_low_remove_watchpoint): Renamed to
2288 i386_dr_remove_watchpoint.
2289 (i386_low_region_ok_for_watchpoint): Renamed to
2290 i386_dr_region_ok_for_watchpoint.
2291 (i386_low_stopped_data_address): Renamed to
2292 i386_dr_stopped_data_address.
2293 (i386_low_stopped_by_watchpoint): Renamed to
2294 i386_dr_stopped_by_watchpoint.
2295 * i386-low.c (i386_show_dr): Renamed to
2296 i386_dr_show and made nonstatic. All uses updated.
2297 (i386_length_and_rw_bits): Renamed to
2298 i386_dr_length_and_rw_bits and made nonstatic.
2299 All uses updated.
2300 (i386_insert_aligned_watchpoint): Renamed to
2301 i386_dr_insert_aligned_watchpoint and made nonstatic.
2302 All uses updated.
2303 (i386_remove_aligned_watchpoint): Renamed to
2304 i386_dr_remove_aligned_watchpoint and made nonstatic.
2305 All uses updated.
2306 (i386_update_inferior_debug_regs): Renamed to
2307 i386_dr_update_inferior_debug_regs and made nonstatic.
2308 All uses updated.
2309 (i386_low_insert_watchpoint): Renamed to
2310 i386_dr_insert_watchpoint. All uses updated.
2311 (i386_low_remove_watchpoint): Renamed to
2312 i386_dr_remove_watchpoint. All uses updated.
2313 (i386_low_region_ok_for_watchpoint): Renamed to
2314 i386_dr_region_ok_for_watchpoint. All uses updated.
2315 (i386_low_stopped_data_address): Renamed to
2316 i386_dr_stopped_data_address. All uses updated.
2317 (i386_low_stopped_by_watchpoint): Renamed to
2318 i386_dr_stopped_by_watchpoint. All uses updated.
2319
2320 2014-06-18 Gary Benson <gbenson@redhat.com>
2321
2322 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2323 (i386_dr_low_can_set_control): Likewise.
2324 (i386_insert_aligned_watchpoint): New check.
2325
2326 2014-06-18 Gary Benson <gbenson@redhat.com>
2327
2328 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2329 Renamed to state.
2330
2331 2014-06-18 Gary Benson <gbenson@redhat.com>
2332
2333 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2334 instead of fatal and error.
2335 (i386_handle_nonaligned_watchpoint): Likewise.
2336
2337 2014-06-18 Gary Benson <gbenson@redhat.com>
2338
2339 * i386-low.c (i386_get_debug_register_length): New macro.
2340 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2341 (i386_show_dr): Use debug_printf instead of fprintf. Use
2342 phex to format values.
2343
2344 2014-06-18 Gary Benson <gbenson@redhat.com>
2345
2346 * i386-low.h: Comment changes.
2347 * i386-low.c: Likewise.
2348
2349 2014-06-18 Gary Benson <gbenson@redhat.com>
2350
2351 * i386-low.c: Whitespace changes.
2352
2353 2014-06-12 Tom Tromey <tromey@redhat.com>
2354
2355 * utils.c (freeargv): Remove.
2356
2357 2014-06-12 Tom Tromey <tromey@redhat.com>
2358
2359 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2360 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2361 (parse_debug_format_options): Likewise.
2362 (gdbserver_usage): Likewise.
2363 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2364 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2365 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2366 against libiberty.
2367 ($(LIBGNU)): Depend on libiberty.
2368 (all-lib): Recurse into all subdirs.
2369 (install-only): Invoke "install" target in subdirs.
2370 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2371 targets.
2372 * configure: Rebuild.
2373 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2374 for vasprintf, vsnprintf, or gettimeofday.
2375 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2376 srv_tgtobj.
2377
2378 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2379
2380 * development.sh: Delete.
2381 * Makefile.in (config.status): Adjust dependency on development.sh.
2382 * configure.ac: Adjust development.sh source call.
2383 * configure: Regenerate.
2384
2385 2014-06-02 Pedro Alves <palves@redhat.com>
2386
2387 * ax.c (gdb_free_agent_expr): New function.
2388 * ax.h (gdb_free_agent_expr): New declaration.
2389 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2390 list.
2391 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2392 static.
2393 (clear_breakpoint_conditions_and_commands): New function.
2394 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2395 (clear_breakpoint_conditions_and_commands): New declaration.
2396
2397 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2398
2399 * linux-aarch64-low.c (asm/ptrace.h): Include.
2400
2401 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2402
2403 Fix TLS access for -static -pthread.
2404 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2405 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2406 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2407
2408 2014-05-20 Pedro Alves <palves@redhat.com>
2409
2410 * linux-aarch64-low.c (aarch64_insert_point)
2411 (aarch64_remove_point): No longer check whether the type is
2412 supported here. Adjust to new interface.
2413 (the_low_target): Install aarch64_supports_z_point_type as
2414 supports_z_point_type method.
2415 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2416 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2417 instead of a Z packet char. Adjust.
2418 (arm_supports_z_point_type): New function.
2419 (arm_insert_point, arm_remove_point): Adjust to new interface.
2420 (the_low_target): Install arm_supports_z_point_type.
2421 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2422 (cris_insert_point, cris_remove_point): Adjust to new interface.
2423 Don't check whether the type is supported here.
2424 (the_low_target): Install cris_supports_z_point_type.
2425 * linux-low.c (linux_supports_z_point_type): New function.
2426 (linux_insert_point, linux_remove_point): Adjust to new interface.
2427 * linux-low.h (struct linux_target_ops) <insert_point,
2428 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2429 raw_breakpoint pointer parameter.
2430 <supports_z_point_type>: New method.
2431 * linux-mips-low.c (mips_supports_z_point_type): New function.
2432 (mips_insert_point, mips_remove_point): Adjust to new interface.
2433 Use mips_supports_z_point_type.
2434 (the_low_target): Install mips_supports_z_point_type.
2435 * linux-ppc-low.c (the_low_target): Install NULL as
2436 supports_z_point_type method.
2437 * linux-s390-low.c (the_low_target): Install NULL as
2438 supports_z_point_type method.
2439 * linux-sparc-low.c (the_low_target): Install NULL as
2440 supports_z_point_type method.
2441 * linux-x86-low.c (x86_supports_z_point_type): New function.
2442 (x86_insert_point): Adjust to new insert_point interface. Use
2443 insert_memory_breakpoint. Adjust to new
2444 i386_low_insert_watchpoint interface.
2445 (x86_remove_point): Adjust to remove_point interface. Use
2446 remove_memory_breakpoint. Adjust to new
2447 i386_low_remove_watchpoint interface.
2448 (the_low_target): Install x86_supports_z_point_type.
2449 * lynx-low.c (lynx_target_ops): Install NULL as
2450 supports_z_point_type callback.
2451 * nto-low.c (nto_supports_z_point_type): New.
2452 (nto_insert_point, nto_remove_point): Adjust to new interface.
2453 (nto_target_ops): Install nto_supports_z_point_type.
2454 * mem-break.c: Adjust intro comment.
2455 (struct raw_breakpoint) <raw_type, size>: New fields.
2456 <inserted>: Update comment.
2457 <shlib_disabled>: Delete field.
2458 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2459 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2460 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2461 (raw_bkpt_type_to_target_hw_bp_type): New function.
2462 (find_enabled_raw_code_breakpoint_at): New function.
2463 (find_raw_breakpoint_at): New type and size parameters. Use them.
2464 (insert_memory_breakpoint): New function, based off
2465 set_raw_breakpoint_at.
2466 (remove_memory_breakpoint): New function.
2467 (set_raw_breakpoint_at): Reimplement.
2468 (set_breakpoint): New, based on set_breakpoint_at.
2469 (set_breakpoint_at): Reimplement.
2470 (delete_raw_breakpoint): Go through the_target->remove_point
2471 instead of assuming memory breakpoints.
2472 (find_gdb_breakpoint_at): Delete.
2473 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2474 (find_gdb_breakpoint): New function.
2475 (set_gdb_breakpoint_at): Delete.
2476 (z_type_supported): New function.
2477 (set_gdb_breakpoint_1): New function, loosely based off
2478 set_gdb_breakpoint_at.
2479 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2480 (delete_gdb_breakpoint_at): Delete.
2481 (delete_gdb_breakpoint_1): New function, loosely based off
2482 delete_gdb_breakpoint_at.
2483 (delete_gdb_breakpoint): New function.
2484 (clear_gdb_breakpoint_conditions): Rename to ...
2485 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2486 breakpoint.
2487 (add_condition_to_breakpoint): Make static.
2488 (add_breakpoint_condition): Take a struct breakpoint pointer
2489 instead of an address. Adjust.
2490 (gdb_condition_true_at_breakpoint): Rename to ...
2491 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2492 z_type parameter.
2493 (gdb_condition_true_at_breakpoint): Reimplement.
2494 (add_breakpoint_commands): Take a struct breakpoint pointer
2495 instead of an address. Adjust.
2496 (gdb_no_commands_at_breakpoint): Rename to ...
2497 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2498 parameter. Return true if no breakpoint was found. Change debug
2499 output.
2500 (gdb_no_commands_at_breakpoint): Reimplement.
2501 (run_breakpoint_commands): Rename to ...
2502 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2503 and change return type to boolean.
2504 (run_breakpoint_commands): New function.
2505 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2506 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2507 breakpoint. Go through the_target->remove_point instead of
2508 assuming memory breakpoint.
2509 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2510 software and hardware breakpoints.
2511 (reinsert_raw_breakpoint): Go through the_target->insert_point
2512 instead of assuming memory breakpoint.
2513 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2514 software and hardware breakpoints.
2515 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2516 Check both software and hardware breakpoints.
2517 (validate_inserted_breakpoint): Assert the breakpoint is a
2518 software breakpoint. Set the inserted flag to -1 instead of
2519 setting shlib_disabled.
2520 (delete_disabled_breakpoints): Adjust.
2521 (validate_breakpoints): Only validate software breakpoints.
2522 Adjust to inserted flag change.
2523 (check_mem_read, check_mem_write): Skip breakpoint types other
2524 than software breakpoints. Adjust to inserted flag change.
2525 * mem-break.h (enum raw_bkpt_type): New enum.
2526 (raw_breakpoint, struct process_info): Forward declare.
2527 (Z_packet_to_target_hw_bp_type): Delete declaration.
2528 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2529 (set_gdb_breakpoint, delete_gdb_breakpoint)
2530 (clear_breakpoint_conditions): New declarations.
2531 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2532 (breakpoint_inserted_here): Update comment.
2533 (add_breakpoint_condition, add_breakpoint_commands): Replace
2534 address parameter with a breakpoint pointer parameter.
2535 (gdb_breakpoint_here): Update comment.
2536 (delete_gdb_breakpoint_at): Delete.
2537 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2538 * server.c (process_point_options): Take a struct breakpoint
2539 pointer instead of an address. Adjust.
2540 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2541 delete_gdb_breakpoint.
2542 * spu-low.c (spu_target_ops): Install NULL as
2543 supports_z_point_type method.
2544 * target.h: Include mem-break.h.
2545 (struct target_ops) <prepare_to_access_memory>: Update comment.
2546 <supports_z_point_type>: New field.
2547 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2548 instead of a char. Also take a raw breakpoint pointer.
2549 * win32-arm-low.c (the_low_target): Install NULL as
2550 supports_z_point_type.
2551 * win32-i386-low.c (i386_supports_z_point_type): New function.
2552 (i386_insert_point, i386_remove_point): Adjust to new interface.
2553 (the_low_target): Install i386_supports_z_point_type.
2554 * win32-low.c (win32_supports_z_point_type): New function.
2555 (win32_insert_point, win32_remove_point): Adjust to new interface.
2556 (win32_target_ops): Install win32_supports_z_point_type.
2557 * win32-low.h (struct win32_target_ops):
2558 <supports_z_point_type>: New method.
2559 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2560 instead of a char. Also take a raw breakpoint pointer.
2561
2562 2014-05-20 Pedro Alves <palves@redhat.com>
2563
2564 * mem-break.h: Include break-common.h.
2565 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2566 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2567 (Z_packet_to_target_hw_bp_type): New declaration.
2568 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2569 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2570 (Z_PACKET_ACCESS_WP): Delete macros.
2571 (Z_packet_to_hw_type): Delete function.
2572 * i386-low.h: Don't include break-common.h here.
2573 (Z_packet_to_hw_type): Delete declaration.
2574 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2575 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2576 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2577 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2578 * linux-aarch64-low.c: Don't include break-common.h here.
2579 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2580 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2581 (Z_packet_to_target_hw_bp_type): Delete function.
2582 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2583 function.
2584 (mips_insert_point, mips_remove_point): Use
2585 Z_packet_to_target_hw_bp_type.
2586
2587 2014-05-20 Pedro Alves <palves@redhat.com>
2588
2589 * linux-aarch64-low.c: Include break-common.h.
2590 (enum target_point_type): Delete.
2591 (Z_packet_to_point_type): Rename to ...
2592 (Z_packet_to_target_hw_bp_type): ... this, and return a
2593 target_hw_bp_type instead.
2594 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2595 instead of an enum target_point_type.
2596 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2597 breakpoint type.
2598 (aarch64_dr_state_insert_one_point)
2599 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2600 (aarch64_handle_aligned_watchpoint)
2601 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2602 Take an enum target_hw_bp_type instead of an enum
2603 target_point_type.
2604 (aarch64_supports_z_point_type): New function.
2605 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2606 use Z_packet_to_target_hw_bp_type.
2607
2608 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2609
2610 * configure.ac: Only use -Werror by default when DEVELOPMENT
2611 is true.
2612 * configure: Regenerate.
2613
2614 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2615
2616 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2617 * linux-x86-low.c (X86_64_USER_REGS): New.
2618 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2619
2620 2014-04-28 Yao Qi <yao@codesourcery.com>
2621
2622 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2623 name.
2624
2625 2014-04-25 Pedro Alves <palves@redhat.com>
2626
2627 PR server/16255
2628 * linux-low.c (linux_attach_fail_reason_string): New function.
2629 (linux_attach_lwp): Delete.
2630 (linux_attach_lwp_1): Rename to ...
2631 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2632 argument. Remove "initial" parameter. Return int instead of
2633 void. Don't error or warn here.
2634 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2635 failure to attach to the tgid. Call warning when failing to
2636 attach to an lwp.
2637 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2638 argument. Remove "initial" parameter. Return int instead of
2639 void. Don't error or warn here.
2640 (linux_attach_fail_reason_string): New declaration.
2641 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2642 interface change. Use linux_attach_fail_reason_string.
2643
2644 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2645 Walfred Tedeschi <walfred.tedeschi@intel.com>
2646
2647 * Makefile.in: Added rules to handle new files
2648 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2649 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2650 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2651 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2652 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2653 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2654 x32-avx512-linux.o.
2655 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2656 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2657 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2658 i386/x32-avx512.xml.
2659 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2660 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2661 i386/x32-avx512-linux.xml.
2662 * i387-fp.c (num_avx512_k_registers): New constant for number
2663 of K registers.
2664 (num_avx512_zmmh_low_registers): New constant for number of
2665 lower ZMM registers (0-15).
2666 (num_avx512_zmmh_high_registers): New constant for number of
2667 higher ZMM registers (16-31).
2668 (num_avx512_ymmh_registers): New contant for number of higher
2669 YMM registers (ymm16-31 added by avx521 on x86_64).
2670 (num_avx512_xmm_registers): New constant for number of higher
2671 XMM registers (xmm16-31 added by AVX512 on x86_64).
2672 (struct i387_xsave): Add space for AVX512 registers.
2673 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2674 Add code to handle AVX512 registers.
2675 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2676 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2677 prototypei from generated file.
2678 (tdesc_amd64_avx512_linux): Likewise.
2679 (init_registers_x32_avx512_linux): Likewise.
2680 (tdesc_x32_avx512_linux): Likewise.
2681 (init_registers_i386_avx512_linux): Likewise.
2682 (tdesc_i386_avx512_linux): Likewise.
2683 (x86_64_regmap): Add AVX512 registers.
2684 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2685 mask.
2686 (initialize_low_arch): Add code to initialize AVX512 registers.
2687
2688 2014-04-23 Pedro Alves <palves@redhat.com>
2689
2690 * mem-break.c (find_gdb_breakpoint_at): Make static.
2691 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2692
2693 2014-04-23 Pedro Alves <palves@redhat.com>
2694
2695 * i386-low.c: Don't include break-common.h here.
2696 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2697 prototype to take target_hw_bp_type as argument instead of a Z
2698 packet char.
2699 * i386-low.h: Include break-common.h here.
2700 (Z_packet_to_hw_type): Declare.
2701 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2702 prototypes.
2703 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2704 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2705 (x86_remove_point): Convert the packet number to a
2706 target_hw_bp_type before calling i386_low_remove_watchpoint.
2707 * win32-i386-low.c (i386_insert_point): Convert the packet number
2708 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2709 (i386_remove_point): Convert the packet number to a
2710 target_hw_bp_type before calling i386_low_remove_watchpoint.
2711
2712 2014-04-23 Pedro Alves <palves@redhat.com>
2713
2714 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2715
2716 2014-04-10 Pedro Alves <palves@redhat.com>
2717
2718 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2719 Check if the condition or command is NULL before checking if the
2720 breakpoint is known. On success, return true.
2721 * mem-break.h (add_breakpoint_condition): Document return.
2722 (add_breakpoint_commands): Add describing comment.
2723 * server.c (skip_to_semicolon): New function.
2724 (process_point_options): Use it.
2725
2726 2014-04-09 Pedro Alves <palves@redhat.com>
2727
2728 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2729 to lwpid_of.
2730
2731 2014-02-27 Pedro Alves <palves@redhat.com>
2732
2733 PR 12702
2734 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2735 macros.
2736 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2737 output.
2738 (last_thread_of_process_p): Take a PID argument instead of a
2739 thread pointer.
2740 (linux_wait_for_lwp): Delete.
2741 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2742 functions.
2743 (linux_low_filter_event): New function, party factored out from
2744 linux_wait_for_event.
2745 (linux_wait_for_event): Rename to ...
2746 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2747 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2748 sigsuspend. Check for zombie leaders.
2749 (linux_wait_for_event): Reimplement as wrapper around
2750 linux_wait_for_event_filtered.
2751 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2752 a normal or signal exit is seen, it's the whole process exiting.
2753 (wait_for_sigstop): No longer a for_each_inferior callback.
2754 Rewrite on top of linux_wait_for_event_filtered.
2755 (stop_all_lwps): Call wait_for_sigstop directly.
2756 * server.c (resume, handle_target_event): Handle
2757 TARGET_WAITKIND_NO_RESUMED.
2758
2759 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2760
2761 * win32-low.c (psapi_get_dll_name,
2762 * win32_CreateToolhelp32Snapshot): Delete.
2763 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2764 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2765 Delete.
2766 (handle_load_dll): Add function description.
2767 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2768
2769 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2770
2771 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2772 Add comment.
2773 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2774 base address when calling win32_add_one_solib.
2775 (handle_load_dll): Delete local variable load_addr.
2776 Remove 0x1000 offset applied to DLL base address when calling
2777 win32_add_one_solib.
2778 (handle_unload_dll): Add comment.
2779
2780 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2781
2782 * win32-low.c (win32_add_all_dlls): Renames
2783 win32_ensure_ntdll_loaded. Rewrite function documentation.
2784 Adjust implementation to always load all DLLs.
2785 Add 0x1000 offset to DLL base address when calling
2786 win32_add_one_solib.
2787 (child_initialization_done): New static global.
2788 (do_initial_child_stuff): Set child_initialization_done to
2789 zero during child initialization, and 1 after. Replace call
2790 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2791 Add comment.
2792 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2793 (handle_unload_dll): Add function documentation.
2794 (get_child_debug_event): Ignore load and unload DLL events
2795 during child initialization.
2796
2797 2014-02-20 Doug Evans <dje@google.com>
2798
2799 Remove global all_lwps.
2800 * inferiors.h (ptid_of): Move here from linux-low.h.
2801 (pid_of, lwpid_of): Ditto.
2802 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2803 parameter is a struct thread_info * now.
2804 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2805 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2806 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2807 directly.
2808 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2809 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2810 * linux-arm-low.c (update_registers_callback): Update, "entry"
2811 parameter is a struct thread_info * now.
2812 Fetch lwpid from current_inferior directly.
2813 (arm_insert_point): Pass &all_threads to find_inferior instead of
2814 &all_lwps.
2815 (arm_remove_point): Ditto.
2816 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2817 (arm_prepare_to_resume): Fetch pid from thread.
2818 (arm_read_description): Fetch lwpid from current_inferior directly.
2819 * linux-low.c (all_lwps): Delete.
2820 (delete_lwp): Delete call to remove_inferior.
2821 (handle_extended_wait): Fetch lwpid from thread.
2822 (add_lwp): Don't set lwp->entry.id. Remove call to
2823 add_inferior_to_list.
2824 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2825 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2826 (kill_one_lwp_callback): Ditto.
2827 (linux_kill): Don't dereference NULL pointer.
2828 Fetch ptid,lwpid from thread.
2829 (get_detach_signal): Fetch ptid from thread.
2830 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2831 Simplify call to regcache_invalidate_thread.
2832 (delete_lwp_callback): Update, "entry" parameter is a
2833 struct thread_info * now. Fetch pid from thread.
2834 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2835 (status_pending_p_callback): Update, "entry" parameter is a
2836 struct thread_info * now. Fetch ptid from thread.
2837 (find_lwp_pid): Update, "entry" parameter is a
2838 struct thread_info * now.
2839 (linux_wait_for_lwp): Fetch pid from thread.
2840 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2841 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2842 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2843 (dequeue_one_deferred_signal): Ditto.
2844 (cancel_breakpoint): Fetch ptid from current_inferior.
2845 (linux_wait_for_event): Pass &all_threads to find_inferior,
2846 not &all_lwps. Fetch ptid, lwpid from thread.
2847 (count_events_callback): Update, "entry" parameter is a
2848 struct thread_info * now.
2849 (select_singlestep_lwp_callback): Ditto.
2850 (select_event_lwp_callback): Ditto.
2851 (cancel_breakpoints_callback): Ditto.
2852 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2853 not &all_lwps.
2854 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2855 (unsuspend_one_lwp): Update, "entry" parameter is a
2856 struct thread_info * now.
2857 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2858 not &all_lwps.
2859 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2860 Fetch lwpid from thread, not lwp.
2861 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2862 Pass &all_threads to find_inferior, not &all_lwps.
2863 (send_sigstop): Fetch lwpid from thread, not lwp.
2864 (send_sigstop_callback): Update, "entry" parameter is a
2865 struct thread_info * now.
2866 (suspend_and_send_sigstop_callback): Ditto.
2867 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2868 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2869 struct thread_info * now.
2870 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2871 from thread, lwp.
2872 (lwp_running): Update, "entry" parameter is a
2873 struct thread_info * now.
2874 (stop_all_lwps): Fetch ptid from thread.
2875 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2876 (linux_resume_one_lwp): Fetch lwpid from thread.
2877 (linux_set_resume_request): Update, "entry" parameter is a
2878 struct thread_info * now. Fetch pid, lwpid from thread.
2879 (resume_status_pending_p): Update, "entry" parameter is a
2880 struct thread_info * now.
2881 (need_step_over_p): Ditto. Fetch lwpid from thread.
2882 (start_step_over): Fetch lwpid from thread.
2883 (linux_resume_one_thread): Update, "entry" parameter is a
2884 struct thread_info * now. Fetch lwpid from thread.
2885 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2886 (proceed_one_lwp): Update, "entry" parameter is a
2887 struct thread_info * now. Fetch lwpid from thread.
2888 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2889 struct thread_info * now.
2890 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2891 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2892 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2893 directly.
2894 (regsets_store_inferior_registers): Ditto.
2895 (fetch_register, store_register): Ditto.
2896 (linux_read_memory, linux_write_memory): Ditto.
2897 (linux_request_interrupt): Ditto.
2898 (linux_read_auxv): Ditto.
2899 (linux_xfer_siginfo): Ditto.
2900 (linux_qxfer_spu): Ditto.
2901 (linux_qxfer_libraries_svr4): Ditto.
2902 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2903 moved to inferiors.h.
2904 (get_lwp): Delete.
2905 (get_thread_lwp): Update.
2906 (struct lwp_info): Delete member "entry". Simplify comment for
2907 member "thread".
2908 (all_lwps): Delete.
2909 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2910 current_inferior directly.
2911 (update_watch_registers_callback): Update, "entry" parameter is a
2912 struct thread_info * now. Fetch pid from thread.
2913 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2914 (mips_insert_point): Fetch lwpid from current_inferior.
2915 Pass &all_threads to find_inferior, not &all_lwps.
2916 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2917 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2918 directly.
2919 (mips_stopped_data_address): Ditto.
2920 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2921 directly.
2922 * linux-tile-low.c (tile_arch_setup): Ditto.
2923 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2924 (update_debug_registers_callback): Update, "entry" parameter is a
2925 struct thread_info * now. Fetch pid from thread.
2926 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2927 Pass &all_threads to find_inferior, not &all_lwps.
2928 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2929 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2930 Pass &all_threads to find_inferior, not &all_lwps.
2931 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2932 (i386_dr_low_get_status): Ditto.
2933 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2934 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2935 (x86_linux_read_description): Ditto.
2936 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2937
2938 2014-02-20 Doug Evans <dje@google.com>
2939
2940 * inferiors.c (get_first_inferior): Fix buglet.
2941
2942 2014-02-19 Doug Evans <dje@google.com>
2943
2944 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2945 * inferiors.c (add_thread): Change result type to struct thread_info *.
2946 All callers updated.
2947 (add_lwp): Call add_thread here instead of in callers.
2948 All callers updated.
2949 * linux-low.h (get_lwp_thread): Rewrite.
2950 (struct lwp_info): New member "thread".
2951
2952 2014-02-19 Doug Evans <dje@google.com>
2953
2954 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2955 All callers updated.
2956
2957 2014-02-19 Doug Evans <dje@google.com>
2958
2959 * inferiors.c (add_thread): Fix whitespace.
2960
2961 2014-02-19 Doug Evans <dje@google.com>
2962
2963 * dll.c (clear_dlls): Replace accessing list implemention details
2964 with API function.
2965 * gdbthread.h (get_first_thread): Declare.
2966 * inferiors.c (for_each_inferior_with_data): New function.
2967 (get_first_thread): New function.
2968 (find_thread_ptid): Simplify.
2969 (get_first_inferior): New function.
2970 (clear_list): Delete.
2971 (one_inferior_p): New function.
2972 (clear_inferior_list): New function.
2973 (clear_inferiors): Update.
2974 * inferiors.h (for_each_inferior_with_data): Declare.
2975 (clear_inferior_list): Declare.
2976 (one_inferior_p): Declare.
2977 (get_first_inferior): Declare.
2978 * linux-low.c (linux_wait_for_event): Replace accessing list
2979 implemention details with API function.
2980 * server.c (target_running): Ditto.
2981 (accumulate_file_name_length): New function.
2982 (emit_dll_description): New function.
2983 (handle_qxfer_libraries): Replace accessing list implemention
2984 details with API function.
2985 (handle_qxfer_threads_worker): New function.
2986 (handle_qxfer_threads_proper): Replace accessing list implemention
2987 details with API function.
2988 (handle_query): Ditto.
2989 (visit_actioned_threads_callback_ftype): New typedef.
2990 (visit_actioned_threads_data): New struct.
2991 (visit_actioned_threads): Rewrite to be find_inferior callback.
2992 (resume): Call find_inferior.
2993 (handle_status): Replace accessing list implemention
2994 details with API function.
2995 (process_serial_event): Replace accessing list implemention details
2996 with API function.
2997 * target.c (set_desired_inferior): Replace accessing list implemention
2998 details with API function.
2999 * tracepoint.c (same_process_p): New function.
3000 (gdb_agent_about_to_close): Replace accessing list implemention
3001 details with API function.
3002 * win32-low.c (child_delete_thread): Replace accessing list
3003 implemention details with API function.
3004 (match_dll_by_basename): New function.
3005 (dll_is_loaded_by_basename): New function.
3006 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3007 details call to dll_is_loaded_by_basename.
3008
3009 2014-02-19 Doug Evans <dje@google.com>
3010
3011 * dll.h (struct dll_info): Add comment.
3012 * gdbthread.h (struct thread_info): Add comment.
3013 (current_ptid): Simplify.
3014 * inferiors.c (add_process): Update.
3015 (remove_process): Update.
3016 * inferiors.h (struct process_info): Rename member "head" to "entry".
3017 * linux-low.c (delete_lwp): Update.
3018 (add_lwp): Update.
3019 (last_thread_of_process_p): Update.
3020 (kill_one_lwp_callback, linux_kill): Update.
3021 (status_pending_p_callback): Update.
3022 (wait_for_sigstop): Update. Simplify read of ptid.
3023 (start_step_over): Update.
3024 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3025 (get_lwp_thread): Update.
3026 (struct lwp_info): Rename member "head" to "entry".
3027 * regcache.h (inferior_list_entry): Delete.
3028 * server.c (kill_inferior_callback): Update.
3029 (detach_or_kill_inferior_callback): Update.
3030 (print_started_pid): Update.
3031 (print_attached_pid): Update.
3032 (process_serial_event): Simplify read of ptid.
3033 * thread-db.c (thread_db_create_event): Update.
3034 (thread_db_get_tls_address): Update.
3035 * win32-low.c (current_inferior_ptid): Simplify.
3036
3037 2014-02-19 Tom Tromey <tromey@redhat.com>
3038
3039 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3040 argument.
3041 (target_supports_btrace): Update.
3042
3043 2014-02-14 Yao Qi <yao@codesourcery.com>
3044
3045 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3046 (rsp-low-ipa.o): New target.
3047
3048 2014-02-12 Tom Tromey <tromey@redhat.com>
3049
3050 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3051 convert_ascii_to_int.
3052 * regcache.c (registers_to_string): Likewise.
3053 * remote-utils.c (decode_M_packet): Likewise.
3054 * server.c (process_serial_event): Likewise.
3055
3056 2014-02-12 Tom Tromey <tromey@redhat.com>
3057
3058 * server.c (handle_query, handle_v_run): Use hex2bin, not
3059 unhexify.
3060 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3061
3062 2014-02-12 Tom Tromey <tromey@redhat.com>
3063
3064 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3065 convert_int_to_ascii.
3066 * regcache.c (registers_to_string, collect_register_as_string):
3067 Likewise.
3068 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3069 Likewise.
3070 * server.c (process_serial_event): Likewise.
3071 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3072 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3073
3074 2014-02-12 Tom Tromey <tromey@redhat.com>
3075
3076 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3077 bin2hex, not hexify.
3078 * tracepoint.c (cmd_qtstatus): Likewise.
3079
3080 2014-02-12 Tom Tromey <tromey@redhat.com>
3081
3082 * remote-utils.c (monitor_output): Pass explicit length to
3083 hexify.
3084
3085 2014-02-12 Tom Tromey <tromey@redhat.com>
3086
3087 * tracepoint.c: Include rsp-low.h.
3088 * server.c: Include rsp-low.h.
3089 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3090 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3091 declare.
3092 * remote-utils.c: Include rsp-low.h.
3093 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3094 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3095 (convert_int_to_ascii, convert_ascii_to_int): Move to
3096 common/rsp-low.c.
3097 * regcache.c: Include rsp-low.h.
3098 * ax.c: Include rsp-low.h.
3099 * Makefile.in (SFILES): Add common/rsp-low.c.
3100 (OBS): Add rsp-low.o.
3101 (rsp-low.o): New target.
3102
3103 2014-02-12 Tom Tromey <tromey@redhat.com>
3104
3105 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3106 Include print-utils.h.
3107 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3108 (plongest, thirty_two, phex_nz): Remove.
3109 * Makefile.in (SFILES): Add common/print-utils.c.
3110 (OBS): Add print-utils.o.
3111 (print-utils-ipa.o): New target.
3112 (print-utils.o): New target.
3113 (IPA_OBJS): Add print-utils-ipa.o.
3114
3115 2014-02-06 Tom Tromey <tromey@redhat.com>
3116
3117 * Makefile.in (SFILES): Fix indentation.
3118
3119 2014-02-05 Doug Evans <dje@google.com>
3120
3121 * linux-low.c (linux_wait_for_event): Improve comment.
3122 (linux_wait_1): Keep current_inferior in sync with event_child.
3123
3124 2014-01-22 Doug Evans <dje@google.com>
3125
3126 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3127
3128 2014-01-22 Doug Evans <dje@google.com>
3129
3130 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3131 * configure: Regenerate.
3132 * config.in: Regenerate.
3133 * Makefile.in (SFILES): Add debug.c.
3134 (OBS): Add debug.o.
3135 * debug.c: New file.
3136 * debug.h: New file.
3137 * linux-aarch64-low.c (*): Update all debugging printfs to use
3138 debug_printf instead of fprintf.
3139 * linux-arm-low.c (*): Ditto.
3140 * linux-cris-low.c (*): Ditto.
3141 * linux-crisv32-low.c (*): Ditto.
3142 * linux-m32r-low.c (*): Ditto.
3143 * linux-sparc-low.c (*): Ditto.
3144 * linux-x86.c (*): Ditto.
3145 * linux-low.c (*): Ditto.
3146 (linux_wait_1): Add calls to debug_enter, debug_exit.
3147 (linux_wait): Remove redundant debugging printf.
3148 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3149 (linux_resume, unstop_all_lwps): Ditto.
3150 * mem-break.c (*): Update all debugging printfs to use
3151 debug_printf instead of fprintf.
3152 * remote-utils.c (*): Ditto.
3153 * thread-db.c (*): Ditto.
3154 * server.c #include <ctype.h>, "gdb_vecs.h".
3155 (debug_threads): Moved to debug.c.
3156 (*): Update all debugging printfs to use debug_printf instead of
3157 fprintf.
3158 (start_inferior): Replace call to fflush with call to debug_flush.
3159 (monitor_show_help): Mention set debug-format.
3160 (parse_debug_format_options): New function.
3161 (handle_monitor_command): Handle "monitor set debug-format".
3162 (gdbserver_usage): Mention --debug-format.
3163 (main): Parse --debug-format.
3164 * server.h (debug_threads): Declaration moved to debug.h.
3165 #include "debug.h".
3166 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3167 trace_debug_1 that uses debug_printf.
3168 (tracepoint_look_up_symbols): Update all debugging printfs to use
3169 debug_printf instead of fprintf.
3170
3171 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3172
3173 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3174 sys/ptrace.h.
3175
3176 2014-01-17 Pedro Alves <palves@redhat.com>
3177
3178 PR build/16445
3179 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3180 defined after including gdb_proc_service.h.
3181
3182 2014-01-16 Doug Evans <dje@google.com>
3183
3184 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3185 (match_dll): Use it.
3186
3187 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3188
3189 * target.h (target_ops) <read_btrace>: Change parameters and
3190 return type to allow error reporting.
3191 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3192 trace reading errors on.
3193 * linux-low.c (linux_low_read_btrace): Pass trace reading
3194 errors on.
3195 (linux_low_disable_btrace): New.
3196
3197 2014-01-15 Doug Evans <dje@google.com>
3198
3199 * inferiors.c (thread_id_to_gdb_id): Delete.
3200 * inferiors.h (thread_id_to_gdb_id): Delete.
3201
3202 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3203
3204 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3205 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3206 versions.
3207
3208 2014-01-08 Pedro Alves <palves@redhat.com>
3209
3210 * server.c (handle_status): Don't discard previous queued stop
3211 replies or thread's pending status here.
3212 (main) <disconnection>: Do it here instead.
3213
3214 2014-01-08 Pedro Alves <palves@redhat.com>
3215
3216 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3217 * server.c (visit_actioned_threads, handle_pending_status): New
3218 function.
3219 (handle_v_cont): Factor out parts to ...
3220 (resume): ... this new function. If in all-stop, and a thread
3221 being resumed has a pending status, report it without actually
3222 resuming.
3223 (myresume): Adjust to use the new 'resume' function.
3224 (clear_pending_status_callback, set_pending_status_callback)
3225 (find_status_pending_thread_callback): New functions.
3226 (handle_status): Handle the case of multiple threads having
3227 interesting statuses to report. Report threads' real last signal
3228 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3229 with an interesting thread to report the status for, instead of
3230 always reporting the status of the first thread.
3231
3232 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3233
3234 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3235 * gdbreplay.c (gdbreplay_version): Likewise.
3236
3237 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3238
3239 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3240 iov.iov_len with the real length in use.
3241
3242 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3243
3244 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3245 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3246 for all targets that use win32-low.c.
3247 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3248 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3249
3250 2013-12-13 Pedro Alves <palves@redhat.com>
3251
3252 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3253 if equal to TARGET_WAITKIND_LOADED.
3254 * win32-low.c (cached_status): New static global.
3255 (win32_wait): Add declaration.
3256 (do_initial_child_stuff): Flush all initial pending debug events
3257 up to the initial breakpoint.
3258 (win32_wait): If CACHED_STATUS was set, return that instead
3259 of doing a real wait. Remove the code resuming the execution
3260 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3261 during the initial phase. Also remove the code changing
3262 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3263 TARGET_WAITKIND_STOPPED.
3264
3265 2013-12-11 Yao Qi <yao@codesourcery.com>
3266
3267 * notif.c (handle_notif_ack): Return 0 if no notification
3268 matches.
3269
3270 2013-11-20 Doug Evans <dje@google.com>
3271
3272 * linux-low.c (linux_set_resume_request): Fix comment.
3273
3274 2013-11-20 Doug Evans <dje@google.com>
3275
3276 * linux-low.c (resume_status_pending_p): Tweak comment.
3277
3278 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3279
3280 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3281 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3282 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3283 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3284 (srv_amd64_regobj): Add amd64-mpx.o.
3285 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3286 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3287 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3288 * i387-fp.c (num_pl_bnd_register) Added constant.
3289 (num_pl_bnd_cfg_registers) Added constant.
3290 (struct i387_xsave) Added reserved area and MPX fields.
3291 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3292 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3293 function.
3294 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3295 (init_registers_amd64_mpx_linux): Declare new function.
3296 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3297 (x86_64_regmap): Add MPX registers.
3298 (x86_linux_read_description): Add MPX case.
3299 (initialize_low_arch): Initialize MPX targets.
3300
3301 2013-11-18 Tom Tromey <tromey@redhat.com>
3302
3303 * configure: Rebuild.
3304 * configure.ac: Don't check for stdlib.h.
3305 * gdbreplay.c: Unconditionally include stdlib.h.
3306
3307 2013-11-18 Tom Tromey <tromey@redhat.com>
3308
3309 * config.in: Rebuild.
3310 * configure: Rebuild.
3311 * configure.ac: Don't use AC_HEADER_DIRENT.
3312
3313 2013-11-18 Tom Tromey <tromey@redhat.com>
3314
3315 * server.h: Don't check HAVE_STRING_H.
3316 * gdbreplay.c: Don't check HAVE_STRING_H.
3317 * configure: Rebuild.
3318
3319 2013-11-18 Tom Tromey <tromey@redhat.com>
3320
3321 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3322 LIBGNU.
3323
3324 2013-11-08 Tom Tromey <tromey@redhat.com>
3325
3326 * configure, config.in: Rebuild.
3327 * configure.ac: Remove unused configury.
3328
3329 2013-11-08 Tom Tromey <tromey@redhat.com>
3330
3331 * acinclude.m4: Include common.m4, codeset.m4.
3332 * configure, config.in: Rebuild.
3333 * configure.ac: Use GDB_AC_COMMON.
3334
3335 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3336
3337 * linux-s390-low.c (HWCAP_S390_TE): New define.
3338 (s390_arch_setup): Consider the TE field in the HWCAP for
3339 determining 'have_regset_tdb'.
3340
3341 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3342
3343 PR gdb/16014
3344 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3345 call to sizeof.
3346
3347 2013-10-02 Pedro Alves <palves@redhat.com>
3348
3349 * server.c (process_serial_event): Don't output "GDBserver
3350 exiting" if GDB is connected through stdio.
3351 * target.c (mywait): Likewise, be silent if GDB is connected
3352 through stdio.
3353
3354 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3355
3356 * lynx-low.c (lynx_add_threads_after_attach): New function.
3357 (lynx_attach): Remove call to add_thread. Add call to
3358 lynx_add_threads_after_attach instead.
3359
3360 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3361
3362 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3363 * config.in, configure: Regenerated.
3364
3365 2013-09-18 Yao Qi <yao@codesourcery.com>
3366
3367 PR server/15959
3368 * server.c (start_inferior): Clear 'resume_info'.
3369
3370 2013-09-16 Jiong Wang <jiwang@tilera.com>
3371
3372 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3373 for each register.
3374
3375 2013-09-16 Jiong Wang <jiwang@tilera.com>
3376
3377 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3378 linux-tile-low.o to srv_tgtobj.
3379
3380 2013-09-16 Will Newton <will.newton@linaro.org>
3381
3382 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3383 out regs.
3384
3385 2013-09-06 Pedro Alves <palves@redhat.com>
3386
3387 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3388 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3389 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3390 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3391 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3392 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3393
3394 2013-09-06 Pedro Alves <palves@redhat.com>
3395
3396 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3397 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3398
3399 2013-09-06 Pedro Alves <palves@redhat.com>
3400
3401 * linux-amd64-ipa.c: Include tracepoint.h.
3402 * linux-i386-ipa.c: Include tracepoint.h.
3403
3404 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3405
3406 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3407 (ps_get_thread_area): New function.
3408
3409 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3410
3411 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3412 (initialize_low_arch): Call init_registers_crisv32 rather than
3413 init_register_crisv32.
3414
3415 2013-09-05 Pedro Alves <palves@redhat.com>
3416
3417 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3418 to ...
3419 * hostio.h: ... this new file.
3420 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3421 win32-low.c: Include hostio.h.
3422
3423 2013-09-05 Pedro Alves <palves@redhat.com>
3424
3425 * server.h (gdb_client_data, handler_func, callback_handler_func)
3426 (delete_file_handler, add_file_handler, append_callback_event)
3427 (delete_callback_event, start_event_loop, initialize_event_loop):
3428 Move to event-loop.h and include it.
3429 * event-loop.h: New file.
3430
3431 2013-09-05 Pedro Alves <palves@redhat.com>
3432
3433 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3434 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3435 (loaded_dll, unloaded_dll): Move to ...
3436 * dll.h: ... this new file.
3437 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3438
3439 2013-09-05 Pedro Alves <palves@redhat.com>
3440
3441 * server.h (current_process, get_thread_process, all_processes)
3442 (add_inferior_to_list, for_each_inferior, current_inferior)
3443 (remove_inferior, add_process, remove_process, find_process_pid)
3444 (have_started_inferiors_p, have_attached_inferiors_p)
3445 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3446 (clear_inferiors, find_inferior, find_inferior_id)
3447 (inferior_target_data, set_inferior_target_data)
3448 (inferior_regcache_data, set_inferior_regcache_data): Move to
3449 inferiors.h, and include it.
3450 * inferiors.h: New file.
3451
3452 2013-09-05 Pedro Alves <palves@redhat.com>
3453
3454 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3455 Move ...
3456 * ax.h: ... here.
3457
3458 2013-09-05 Pedro Alves <palves@redhat.com>
3459
3460 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3461 tracepoint.h.
3462 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3463 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3464 (handle_tracepoint_general_set, handle_tracepoint_query)
3465 (tracepoint_finished_step, tracepoint_was_hit)
3466 (release_while_stepping_state_list, current_traceframe)
3467 (in_readonly_region, traceframe_read_mem)
3468 (fetch_traceframe_registers, traceframe_read_sdata)
3469 (traceframe_read_info, struct fast_tpoint_collect_status)
3470 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3471 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3472 (supply_fast_tracepoint_registers)
3473 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3474 (ipa_tdesc, claim_trampoline_space)
3475 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3476 (agent_mem_read, agent_get_trace_state_variable_value)
3477 (agent_set_trace_state_variable_value, agent_tsv_read)
3478 (agent_mem_read_string, get_raw_reg_func_addr)
3479 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3480 * tracepoint.h: ... this new file.
3481
3482 2013-09-05 Pedro Alves <palves@redhat.com>
3483
3484 * server.h (perror_with_name, error, fatal, warning, paddress)
3485 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3486 include it.
3487 * utils.h: New file.
3488
3489 2013-09-05 Pedro Alves <palves@redhat.com>
3490
3491 * server.h (remote_debug, noack_mode, transport_is_reliable)
3492 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3493 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3494 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3495 (write_enn, initialize_async_io, enable_async_io)
3496 (disable_async_io, check_remote_input_interrupt_request)
3497 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3498 (dead_thread_notify, prepare_resume_reply)
3499 (decode_address_to_semicolon, decode_address, decode_m_packet)
3500 (decode_M_packet, decode_X_packet, decode_xfer_write)
3501 (decode_search_memory_packet, unhexify, hexify)
3502 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3503 (look_up_one_symbol, relocate_instruction)
3504 (monitor_output): Move to remote-utils.h, and include it.
3505 * remote-utils.h: New file.
3506
3507 2013-09-05 Pedro Alves <palves@redhat.com>
3508
3509 * server.h (_): Delete.
3510
3511 2013-09-02 Pedro Alves <palves@redhat.com>
3512
3513 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3514 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3515 allocated.
3516 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3517
3518 2013-09-02 Pierre Muller <muller@sourceware.org>
3519
3520 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3521 or WriteProcessMemory complete successfully and handle
3522 ERROR_PARTIAL_COPY error.
3523
3524 2013-09-02 Pedro Alves <palves@redhat.com>
3525
3526 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3527 error instead of EIO.
3528
3529 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3530
3531 PR server/15604
3532 * linux-low.c: Include filestuff.h.
3533 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3534 * lynx-low.c: Include filestuff.h.
3535 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3536 * server.c: Include filestuff.h.
3537 (main): Call notice_open_fds.
3538 * spu-low.c: Include filestuff.h.
3539 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3540
3541 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3542
3543 * Makefile.in: Explain why ../target and ../nat are not
3544 listed as include file search paths.
3545 (linux-waitpid.o): New object file rule.
3546 * configure.srv (srv_native_linux_obj): New variable.
3547 Replace all occurrences of linux native object files with
3548 $srv_native_linux_obj.
3549 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3550 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3551 (linux_enable_event_reporting): Remove declaration.
3552 (my_waitpid): Moved to common/linux-waitpid.c.
3553 (linux_wait_for_event): Pass ptid when calling
3554 linux_enable_event_reporting.
3555 (linux_supports_tracefork_flag): Remove.
3556 (linux_enable_event_reporting): Likewise.
3557 (linux_tracefork_grandchild): Remove.
3558 (STACK_SIZE): Moved to common/linux-ptrace.c.
3559 (linux_tracefork_child): Remove.
3560 (linux_test_for_tracefork): Remove.
3561 (linux_look_up_symbols): Call linux_supports_traceclone.
3562 (initialize_low): Remove call to linux_test_for_tracefork.
3563 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3564 common/linux-ptrace.h.
3565 (PTRACE_TYPE_ARG4): Likewise.
3566 Include linux-ptrace.h.
3567
3568 2013-08-21 Pedro Alves <palves@redhat.com>
3569
3570 * config.in: Renegerate.
3571
3572 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3573
3574 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3575 (SFILES): Remove $(srcdir)/common/target-common.c and
3576 add $(srcdir)/target/waitstatus.c.
3577 (OBS): Remove target-common.o and add waitstatus.o.
3578 (server_h): Remove $(srcdir)/../common/target-common.h and
3579 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3580 and $(srcdir)/../target/waitstatus.h.
3581 (target-common.o): Remove.
3582 (waitstatus.o): New target object file.
3583 * target.h: Do not include target-common.h and
3584 include target/resume.h, target/wait.h and
3585 target/waitstatus.h.
3586
3587 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3588
3589 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3590 to PTRACE_TYPE_ARG3.
3591 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3592 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3593 PTRACE_TYPE_ARG4.
3594 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3595 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3596
3597 2013-07-27 Jie Zhang <jie@codesourcery.com>
3598 Daniel Jacobowitz <dan@codesourcery.com>
3599 Yao Qi <yao@codesourcery.com>
3600
3601 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3602 (mips-linux-watch.o): New rule.
3603 (mips_linux_watch_h): New variable.
3604 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3605 srv_tgtobj.
3606 * linux-mips-low.c: Include mips-linux-watch.h.
3607 (struct arch_process_info, struct arch_lwp_info): New.
3608 (update_watch_registers_callback): New function.
3609 (mips_linux_new_process, mips_linux_new_thread) New functions.
3610 (mips_linux_prepare_to_resume, mips_insert_point): New
3611 functions.
3612 (mips_remove_point, mips_stopped_by_watchpoint): New
3613 functions.
3614 (rsp_bp_type_to_target_hw_bp_type): New function.
3615 (mips_stopped_data_address): New function.
3616 (the_low_target): Add watchpoint support functions.
3617
3618 2013-07-27 Yao Qi <yao@codesourcery.com>
3619
3620 * i386-low.c: Include break-common.h.
3621 (enum target_hw_bp_type): Remove.
3622
3623 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3624
3625 * Makefile.in (SFILES): /common/target-common.c.
3626 (OBS): Add target-common.o.
3627 (server_h): Add $(srcdir)/../common/target-common.h.
3628 (target-common.o): New target.
3629 * server.c (queue_stop_reply_callback): Free
3630 status string after use.
3631 * target.c (target_waitstatus_to_string): Remove.
3632 * target.h: Include target-common.h.
3633 (resume_kind): Likewise.
3634 (target_waitkind): Likewise.
3635 (target_waitstatus): Likewise.
3636 (TARGET_WNOHANG): Likewise.
3637
3638 2013-07-04 Yao Qi <yao@codesourcery.com>
3639
3640 * Makefile.in (host_alias): Use @host_noncanonical@.
3641 (target_alias): Use @target_noncanonical@.
3642 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3643 ACX_NONCANONICAL_HOST.
3644 * configure: Regenerated.
3645
3646 Revert:
3647 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3648
3649 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3650 * configure: Rebuild.
3651 * Makefile.in (version_host, version_target): Get from configure.
3652 (version.c): Use $(version_host) and $(version_target).
3653
3654 2013-07-03 Pedro Alves <palves@redhat.com>
3655
3656 * Makefile.in (config.status): Depend on development.sh.
3657 * acinclude.m4: Include libmcheck.m4.
3658 * configure: Regenerate.
3659
3660 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3661
3662 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3663 attribute inside the parentheses.
3664 (winapi_DebugSetProcessKillOnExit): Ditto.
3665 (winapi_DebugBreakProcess): Ditto.
3666 (winapi_GenerateConsoleCtrlEvent): Ditto.
3667
3668 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3669
3670 * notif.h (notif_event): Add a dummy member to avoid compiler
3671 errors.
3672
3673 2013-07-01 Pedro Alves <palves@redhat.com>
3674
3675 * hostio.c (HOSTIO_PATH_MAX): Define.
3676 (require_filename, handle_open, handle_unlink, handle_readlink):
3677 Use it.
3678
3679 2013-07-01 Pedro Alves <palves@redhat.com>
3680
3681 * server.h: Include "pathmax.h".
3682 * linux-low.c: Don't include sys/param.h.
3683 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3684 MAXPATHLEN.
3685 * win32-low.c: Don't include sys/param.h.
3686 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3687
3688 2013-07-01 Pedro Alves <palves@redhat.com>
3689
3690 * event-loop.c: Don't check HAVE_UNISTD_H before including
3691 <unistd.h>.
3692 * gdbreplay.c: Likewise.
3693 * remote-utils.c: Likewise.
3694 * server.c: Likewise.
3695 * configure.ac: Don't check for unistd.h.
3696 * configure: Regenerate.
3697
3698 2013-06-28 Tom Tromey <tromey@redhat.com>
3699
3700 * Makefile.in (version.c): Use version.in, not
3701 common/version.in.
3702
3703 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3704
3705 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3706 * configure: Rebuild.
3707 * Makefile.in (version_host, version_target): Get from configure.
3708 (version.c): Use $(version_host) and $(version_target).
3709
3710 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3711
3712 Fix trace-status to output user name without trailing colon.
3713 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3714
3715 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3716
3717 Fix trace-status to output proper start-time and stop-time.
3718 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3719 output start time and stop time in hex as gdb expects.
3720
3721 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3722
3723 * tracepoint.c (build_traceframe_info_xml): Output trace state
3724 variables present in the trace buffer.
3725
3726 2013-06-24 Tom Tromey <tromey@redhat.com>
3727
3728 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3729 create-version.sh.
3730 (version.o): Remove.
3731 * gdbreplay.c: Include version.h.
3732 (version, host_name): Don't declare.
3733 * server.h: Include version.h.
3734 (version, host_name): Don't declare.
3735
3736 2013-06-12 Pedro Alves <palves@redhat.com>
3737
3738 * linux-x86-low.c (linux_is_elf64): Delete global.
3739 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3740 with local linux_pid_exe_is_elf_64_file use.
3741
3742 2013-06-11 Pedro Alves <palves@redhat.com>
3743
3744 * linux-low.c (regset_disabled, disable_regset): New functions.
3745 (regsets_fetch_inferior_registers)
3746 (regsets_store_inferior_registers): Use them.
3747 (initialize_regsets_info); Don't allocate the disabled_regsets
3748 array here.
3749 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3750 comment.
3751
3752 2013-06-11 Pedro Alves <palves@redhat.com>
3753
3754 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3755 xmalloc.
3756
3757 2013-06-11 Pedro Alves <palves@redhat.com>
3758
3759 * linux-x86-low.c (initialize_low_arch): Call
3760 init_registers_x32_avx_linux.
3761
3762 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3763
3764 Fix compatibility with Android Bionic.
3765 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3766 it is not empty.
3767
3768 2013-06-07 Pedro Alves <palves@redhat.com>
3769
3770 PR server/14823
3771 * Makefile.in (OBS): Add tdesc.o.
3772 (IPA_OBJS): Add tdesc-ipa.o.
3773 (tdesc-ipa.o): New rule.
3774 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3775 interface.
3776 * linux-low.c (new_inferior): Delete.
3777 (disabled_regsets, num_regsets): Delete.
3778 (linux_add_process): Adjust to set the new per-process
3779 new_inferior flag.
3780 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3781 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3782 was a stop. When calling arch_setup, switch the current inferior
3783 to the thread that got an event.
3784 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3785 (regsets_fetch_inferior_registers)
3786 (regsets_store_inferior_registers): New regsets_info parameter.
3787 Adjust to use it.
3788 (linux_register_in_regsets): New regs_info parameter. Adjust to
3789 use it.
3790 (register_addr, fetch_register, store_register): New usrregs_info
3791 parameter. Adjust to use it.
3792 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3793 parameter regs_info. Adjust to use it.
3794 (linux_fetch_registers): Get the current inferior's regs_info, and
3795 adjust to use it.
3796 (linux_store_registers): Ditto.
3797 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3798 (initialize_low): Don't initialize the target_regsets here. Call
3799 initialize_low_arch.
3800 * linux-low.h (target_regsets): Delete declaration.
3801 (struct regsets_info): New.
3802 (struct usrregs_info): New.
3803 (struct regs_info): New.
3804 (struct process_info_private) <new_inferior>: New field.
3805 (struct linux_target_ops): Delete the num_regs, regmap, and
3806 regset_bitmap fields. New field regs_info.
3807 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3808 * i387-fp.c (num_xmm_registers): Delete.
3809 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3810 calls to new interface.
3811 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3812 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3813 Infer the number of xmm registers from the regcache's target
3814 description.
3815 * i387-fp.h (num_xmm_registers): Delete.
3816 * inferiors.c (add_thread): Don't install the thread's regcache
3817 here.
3818 * proc-service.c (gregset_info): Fetch the current inferior's
3819 regs_info. Adjust to use it.
3820 * regcache.c: Include tdesc.h.
3821 (register_bytes, reg_defs, num_registers)
3822 (gdbserver_expedite_regs): Delete.
3823 (get_thread_regcache): If the thread doesn't have a regcache yet,
3824 create one, instead of aborting gdbserver.
3825 (regcache_invalidate_one): Rename to ...
3826 (regcache_invalidate_thread): ... this.
3827 (regcache_invalidate_one): New.
3828 (regcache_invalidate): Only invalidate registers of the current
3829 process.
3830 (init_register_cache): Add target_desc parameter, and use it.
3831 (new_register_cache): Ditto. Assert the target description has a
3832 non zero registers_size.
3833 (regcache_cpy): Add assertions. Adjust.
3834 (realloc_register_cache, set_register_cache): Delete.
3835 (registers_to_string, registers_from_string): Adjust.
3836 (find_register_by_name, find_regno, find_register_by_number)
3837 (register_cache_size): Add target_desc parameter, and use it.
3838 (free_register_cache_thread, free_register_cache_thread_one)
3839 (regcache_release, register_cache_size): New.
3840 (register_size): Add target_desc parameter, and use it.
3841 (register_data, supply_register, supply_register_zeroed)
3842 (supply_regblock, supply_register_by_name, collect_register)
3843 (collect_register_as_string, collect_register_by_name): Adjust.
3844 * regcache.h (struct target_desc): Forward declare.
3845 (struct regcache) <tdesc>: New field.
3846 (init_register_cache, new_register_cache): Add target_desc
3847 parameter.
3848 (regcache_invalidate_thread): Declare.
3849 (regcache_invalidate_one): Delete declaration.
3850 (regcache_release): Declare.
3851 (find_register_by_number, register_cache_size, register_size)
3852 (find_regno): Add target_desc parameter.
3853 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3854 declarations.
3855 * remote-utils.c: Include tdesc.h.
3856 (outreg, prepare_resume_reply): Adjust.
3857 * server.c: Include tdesc.h.
3858 (gdbserver_xmltarget): Delete declaration.
3859 (get_features_xml, process_serial_event): Adjust.
3860 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3861 declare.
3862 (struct process_info) <tdesc>: New field.
3863 (ipa_tdesc): Declare.
3864 * tdesc.c: New file.
3865 * tdesc.h: New file.
3866 * tracepoint.c: Include tdesc.h.
3867 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3868 (get_context_regcache): Adjust to pass ipa_tdesc down.
3869 (do_action_at_tracepoint): Adjust to get the register cache size
3870 from the context regcache's description.
3871 (traceframe_walk_blocks): Adjust to get the register cache size
3872 from the current trace frame's description.
3873 (traceframe_get_pc): Adjust to get current trace frame's
3874 description and pass it down.
3875 (gdb_collect): Adjust to get the register cache size from the
3876 IPA's description.
3877 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3878 (gdbserver_xmltarget): Delete.
3879 (initialize_low_tracepoint): Set the ipa's target description.
3880 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3881 (initialize_low_tracepoint): Set the ipa's target description.
3882 * linux-x86-low.c: Include tdesc.h.
3883 [__x86_64__] (is_64bit_tdesc): New.
3884 (ps_get_thread_area, x86_get_thread_area): Use it.
3885 (i386_cannot_store_register): Rename to ...
3886 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3887 (i386_cannot_fetch_register): Rename to ...
3888 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3889 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3890 to new interface.
3891 (target_regsets): Rename to ...
3892 (x86_regsets): ... this.
3893 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3894 interface.
3895 (x86_siginfo_fixup): Use is_64bit_tdesc.
3896 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3897 (tdesc_x32_avx_linux, tdesc_x32_linux)
3898 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3899 Declare.
3900 (x86_linux_update_xmltarget): Delete.
3901 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3902 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3903 (AMD64_LINUX_USER64_CS): New.
3904 (x86_linux_read_description): New, based on
3905 x86_linux_update_xmltarget.
3906 (same_process_callback): New.
3907 (x86_arch_setup_process_callback): New.
3908 (x86_linux_update_xmltarget): New.
3909 (x86_regsets_info): New.
3910 (amd64_linux_regs_info): New.
3911 (i386_linux_usrregs_info): New.
3912 (i386_linux_regs_info): New.
3913 (x86_linux_regs_info): New.
3914 (x86_arch_setup): Reimplement.
3915 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3916 (x86_emit_ops): Ditto.
3917 (the_low_target): Adjust. Install x86_linux_regs_info,
3918 x86_cannot_fetch_register, and x86_cannot_store_register.
3919 (initialize_low_arch): New.
3920 * linux-ia64-low.c (tdesc_ia64): Declare.
3921 (ia64_fetch_register): Adjust.
3922 (ia64_usrregs_info, regs_info): New globals.
3923 (ia64_regs_info): New function.
3924 (the_low_target): Adjust.
3925 (initialize_low_arch): New function.
3926 * linux-sparc-low.c (tdesc_sparc64): Declare.
3927 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3928 Adjust.
3929 (sparc_arch_setup): New function.
3930 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3931 (the_low_target): Adjust.
3932 (initialize_low_arch): New function.
3933 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3934 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3935 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3936 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3937 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3938 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3939 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3940 (tdesc_powerpc_isa205_vsx64l): Declare.
3941 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3942 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3943 (ppc_set_pc, ppc_get_hwcap): Adjust.
3944 (ppc_usrregs_info): Forward declare.
3945 (!__powerpc64__) ppc_regmap_adjusted: New global.
3946 (ppc_arch_setup): Adjust to the current process'es target
3947 description.
3948 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3949 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3950 (ppc_store_evrregset): Adjust.
3951 (target_regsets): Rename to ...
3952 (ppc_regsets): ... this, and make static.
3953 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3954 (ppc_regs_info): New function.
3955 (the_low_target): Adjust.
3956 (initialize_low_arch): New function.
3957 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3958 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3959 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3960 (tdesc_s390x_linux64v2): Declare.
3961 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3962 (s390_fill_gregset, s390_store_last_break): Adjust.
3963 (target_regsets): Rename to ...
3964 (s390_regsets): ... this, and make static.
3965 (s390_get_pc, s390_set_pc): Adjust.
3966 (s390_get_hwcap): New target_desc parameter, and use it.
3967 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3968 (s390_arch_setup): Adjust to set the current process'es target
3969 description. Don't adjust the regmap.
3970 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3971 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3972 (regs_info_3264): New globals.
3973 (s390_regs_info): New function.
3974 (the_low_target): Adjust.
3975 (initialize_low_arch): New function.
3976 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3977 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3978 [__mips64] (init_registers_mips_linux)
3979 (init_registers_mips_dsp_linux): Delete defines.
3980 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3981 (have_dsp): New global.
3982 (mips_read_description): New, based on mips_arch_setup.
3983 (mips_arch_setup): Reimplement.
3984 (get_usrregs_info): New function.
3985 (mips_cannot_fetch_register, mips_cannot_store_register)
3986 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3987 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3988 (target_regsets): Rename to ...
3989 (mips_regsets): ... this, and make static.
3990 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3991 (dsp_regs_info, regs_info): New globals.
3992 (mips_regs_info): New function.
3993 (the_low_target): Adjust.
3994 (initialize_low_arch): New function.
3995 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3996 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3997 Declare.
3998 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3999 (arm_read_description): New, with bits factored from
4000 arm_arch_setup.
4001 (arm_arch_setup): Reimplement.
4002 (target_regsets): Rename to ...
4003 (arm_regsets): ... this, and make static.
4004 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4005 (arm_regs_info): New function.
4006 (the_low_target): Adjust.
4007 (initialize_low_arch): New function.
4008 * linux-m68k-low.c (tdesc_m68k): Declare.
4009 (target_regsets): Rename to ...
4010 (m68k_regsets): ... this, and make static.
4011 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4012 (m68k_regs_info): New function.
4013 (m68k_arch_setup): New function.
4014 (the_low_target): Adjust.
4015 (initialize_low_arch): New function.
4016 * linux-sh-low.c (tdesc_sharch): Declare.
4017 (target_regsets): Rename to ...
4018 (sh_regsets): ... this, and make static.
4019 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4020 (sh_regs_info, sh_arch_setup): New functions.
4021 (the_low_target): Adjust.
4022 (initialize_low_arch): New function.
4023 * linux-bfin-low.c (tdesc_bfin): Declare.
4024 (bfin_arch_setup): New function.
4025 (bfin_usrregs_info, regs_info): New globals.
4026 (bfin_regs_info): New function.
4027 (the_low_target): Adjust.
4028 (initialize_low_arch): New function.
4029 * linux-cris-low.c (tdesc_cris): Declare.
4030 (cris_arch_setup): New function.
4031 (cris_usrregs_info, regs_info): New globals.
4032 (cris_regs_info): New function.
4033 (the_low_target): Adjust.
4034 (initialize_low_arch): New function.
4035 * linux-cris-low.c (tdesc_crisv32): Declare.
4036 (cris_arch_setup): New function.
4037 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4038 (cris_regs_info): New function.
4039 (the_low_target): Adjust.
4040 (initialize_low_arch): New function.
4041 * linux-m32r-low.c (tdesc_m32r): Declare.
4042 (m32r_arch_setup): New function.
4043 (m32r_usrregs_info, regs_info): New globals.
4044 (m32r_regs_info): Adjust.
4045 (initialize_low_arch): New function.
4046 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4047 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4048 (tic6x_usrregs_info): Forward declare.
4049 (tic6x_read_description): New function, based on ...
4050 (tic6x_arch_setup): ... this. Reimplement.
4051 (target_regsets): Rename to ...
4052 (tic6x_regsets): ... this, and make static.
4053 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4054 (tic6x_regs_info): New function.
4055 (the_low_target): Adjust.
4056 (initialize_low_arch): New function.
4057 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4058 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4059 (target_regsets): Rename to ...
4060 (xtensa_regsets): ... this, and make static.
4061 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4062 globals.
4063 (xtensa_arch_setup, xtensa_regs_info): New functions.
4064 (the_low_target): Adjust.
4065 (initialize_low_arch): New function.
4066 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4067 (nios2_arch_setup): Set the current process'es tdesc.
4068 (target_regsets): Rename to ...
4069 (nios2_regsets): ... this.
4070 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4071 (nios2_regs_info): New function.
4072 (the_low_target): Adjust.
4073 (initialize_low_arch): New function.
4074 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4075 (aarch64_arch_setup): Set the current process'es tdesc.
4076 (target_regsets): Rename to ...
4077 (aarch64_regsets): ... this.
4078 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4079 (aarch64_regs_info): New function.
4080 (the_low_target): Adjust.
4081 (initialize_low_arch): New function.
4082 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4083 globals.
4084 (target_regsets): Rename to ...
4085 (tile_regsets): ... this.
4086 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4087 (tile_regs_info): New function.
4088 (tile_arch_setup): Set the current process'es tdesc.
4089 (the_low_target): Adjust.
4090 (initialize_low_arch): New function.
4091 * spu-low.c (tdesc_spu): Declare.
4092 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4093 * win32-arm-low.c (tdesc_arm): Declare.
4094 (arm_arch_setup): New function.
4095 (the_low_target): Install arm_arch_setup instead of
4096 init_registers_arm.
4097 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4098 (init_windows_x86): Rename to ...
4099 (i386_arch_setup): ... this. Set `win32_tdesc'.
4100 (the_low_target): Adjust.
4101 * win32-low.c (win32_tdesc): New global.
4102 (child_add_thread): Don't create the thread cache here.
4103 (do_initial_child_stuff): Set the new process'es tdesc.
4104 * win32-low.h (struct target_desc): Forward declare.
4105 (win32_tdesc): Declare.
4106 * lynx-i386-low.c (tdesc_i386): Declare global.
4107 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4108 * lynx-low.c (lynx_tdesc): New global.
4109 (lynx_add_process): Set the new process'es tdesc.
4110 * lynx-low.h (struct target_desc): Forward declare.
4111 (lynx_tdesc): Declare global.
4112 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4113 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4114 * nto-low.c (nto_tdesc): New global.
4115 (do_attach): Set the new process'es tdesc.
4116 * nto-low.h (struct target_desc): Forward declare.
4117 (nto_tdesc): Declare.
4118 * nto-x86-low.c (tdesc_i386): Declare.
4119 (nto_x86_arch_setup): Set `nto_tdesc'.
4120
4121 2013-06-04 Gary Benson <gbenson@redhat.com>
4122
4123 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4124 to qSupported response when appropriate.
4125 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4126 with nonzero-length annex.
4127 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4128 arguments supplied in annex.
4129
4130 2013-05-31 Doug Evans <dje@google.com>
4131
4132 PR server/15594
4133 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4134 64 bits in 64-cross-32 environment.
4135
4136 2013-05-28 Pedro Alves <palves@redhat.com>
4137
4138 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4139 (aarch64-without-fpu.c): Delete rule.
4140 * configure.srv (aarch64*-*-linux*): Remove references to
4141 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4142 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4143 declaration.
4144
4145 2013-05-24 Pedro Alves <palves@redhat.com>
4146
4147 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4148 instead of strchr/decode_address. Error if the range isn't split
4149 with a ','. Don't assume there's be a ':' in the action.
4150
4151 2013-05-23 Yao Qi <yao@codesourcery.com>
4152 Pedro Alves <palves@redhat.com>
4153
4154 * linux-low.c (lwp_in_step_range): New function.
4155 (linux_wait_1): If the thread was range stepping and stopped
4156 outside the stepping range, report the stop to GDB. Otherwise,
4157 continue stepping. Add range stepping debug output.
4158 (linux_set_resume_request): Copy the step range from the resume
4159 request to the lwp.
4160 (linux_supports_range_stepping): New.
4161 (linux_target_ops) <supports_range_stepping>: Set to
4162 linux_supports_range_stepping.
4163 * linux-low.h (struct linux_target_ops)
4164 <supports_range_stepping>: New field.
4165 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4166 * linux-x86-low.c (x86_supports_range_stepping): New.
4167 (the_low_target) <supports_range_stepping>: Set to
4168 x86_supports_range_stepping.
4169 * server.c (handle_v_cont): Handle 'r' action.
4170 (handle_v_requests): Append ";r" if the target supports range
4171 stepping.
4172 * target.h (struct thread_resume) <step_range_start,
4173 step_range_end>: New fields.
4174 (struct target_ops) <supports_range_stepping>:
4175 New field.
4176 (target_supports_range_stepping): New macro.
4177
4178 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4179
4180 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4181 confusion in comment.
4182
4183 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4184
4185 * lynx-low.c (struct process_info_private): New type.
4186 (lynx_add_process): New function.
4187 (lynx_create_inferior, lynx_attach): Replace calls to
4188 add_process by calls to lynx_add_process.
4189 (lynx_resume): If PTID is null, then try using
4190 current_process()->private->last_wait_event_ptid.
4191 Add comments.
4192 (lynx_clear_inferiors): Delete. The contents of that function
4193 has been inlined in lynx_mourn;
4194 (lynx_wait_1): Save the ptid in the process's private data.
4195 (lynx_mourn): Free the process' private data. Replace call
4196 to lynx_clear_inferiors by call to clear_inferiors.
4197
4198 2013-05-17 Yao Qi <yao@codesourcery.com>
4199
4200 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4201 the right place.
4202
4203 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4204
4205 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4206 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4207 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4208 PT_TEXT_END_ADDR guards. Update comments.
4209 (linux_target_op) <read_offsets>: Conditionally define to
4210 linux_read_offsets if the target is UCLIBC and if it defines
4211 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4212
4213 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4214 Andrew Jenner <andrew@codesourcery.com>
4215
4216 * Makefile.in (SFILES): Add linux-nios2-low.c.
4217 (clean): Add action to delete nios2-linux.c.
4218 (nios2-linux.c): New rule.
4219 * configure.srv: Add nios2*-*-linux*.
4220 * linux-nios2-low.c: New.
4221
4222 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4223
4224 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4225
4226 2013-04-25 Hui Zhu <hui@codesourcery.com>
4227
4228 PR gdb/15186
4229 * ax.c (ax_printf): Add fflush.
4230
4231 2013-04-22 Tom Tromey <tromey@redhat.com>
4232
4233 * Makefile.in (SFILES): Add filestuff.c.
4234 (OBS): Add filestuff.o.
4235 (filestuff.o): New target.
4236 * config.in, configure: Rebuild.
4237 * configure.ac: Check for fdwalk, pipe2.
4238
4239 2013-04-17 Pedro Alves <palves@redhat.com>
4240
4241 * configure.ac (USE_THREAD_DB): Delete variable.
4242 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4243 Don't AC_SUBST USE_THREAD_DB.
4244 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4245 * config.in, configure: Regenerate.
4246
4247 2013-04-16 Pedro Alves <palves@redhat.com>
4248
4249 * linux-low.h (struct lwp_info) <thread_known>: Move under
4250 the USE_THREAD_DB #ifdef.
4251
4252 2013-04-16 Pedro Alves <palves@redhat.com>
4253
4254 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4255 (linux-low.o): Delete rule.
4256 * linux-low.h: Always include "gdb_thread_db.h" instead of
4257 conditionally including thread_db.h.
4258 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4259 HAVE_THREAD_DB_H.
4260
4261 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4262
4263 * Makefile.in (install-only): Fix make install regression.
4264
4265 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4266
4267 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4268 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4269 installation.
4270 * gdbserver.1: Remove.
4271
4272 2013-03-22 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (handle_extended_wait): Don't call
4275 linux_enable_event_reporting.
4276
4277 2013-03-15 Tony Theodore <tonyt@logyst.com>
4278
4279 PR build/9098:
4280 * Makefile.in (SHELL): Use @SHELL@.
4281
4282 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4283
4284 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4285 compiler warning.
4286
4287 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4288
4289 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4290 Remove extraneous NULL element.
4291
4292 2013-03-13 Yao Qi <yao@codesourcery.com>
4293
4294 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4295 'V' block in trace frame.
4296
4297 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4298
4299 * target.h (struct target_ops): Add btrace ops.
4300 (target_supports_btrace): New macro.
4301 (target_enable_btrace): New macro.
4302 (target_disable_btrace): New macro.
4303 (target_read_btrace): New macro.
4304 * gdbthread.h (struct thread_info): Add btrace field.
4305 * server.c: Include btrace-common.h.
4306 (handle_btrace_general_set): New function.
4307 (handle_btrace_enable): New function.
4308 (handle_btrace_disable): New function.
4309 (handle_general_set): Call handle_btrace_general_set.
4310 (handle_qxfer_btrace): New function.
4311 (struct qxfer qxfer_packets[]): Add btrace entry.
4312 * inferiors.c (remove_thread): Disable btrace.
4313 * linux-low: Include linux-btrace.h.
4314 (linux_low_enable_btrace): New function.
4315 (linux_low_read_btrace): New function.
4316 (linux_target_ops): Add btrace ops.
4317 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4318 Add srv_linux_btrace=yes.
4319 (x86_64-*-linux*): Add linux-btrace.o.
4320 Add srv_linux_btrace=yes.
4321 * configure.ac: Define HAVE_LINUX_BTRACE.
4322 * config.in: Regenerated.
4323 * configure: Regenerated.
4324
4325 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4326
4327 * server.c (handle_qxfer): Preserve error message if -3 is
4328 returned.
4329 (qxfer): Document the -3 return value.
4330
4331 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4332
4333 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4334 (linux_btrace_h): New variable.
4335 (linux-btrace.o): New rule.
4336
4337 2013-03-08 Stan Shebs <stan@codesourcery.com>
4338 Hafiz Abid Qadeer <abidh@codesourcery.com>
4339
4340 * tracepoint.c (trace_buffer_size): New global.
4341 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4342 (init_trace_buffer): Change to one-argument function. Allocate
4343 trace buffer memory.
4344 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4345 handle QTBuffer:size packet.
4346 (cmd_bigqtbuffer_size): New function.
4347 (initialize_tracepoint): Call init_trace_buffer with
4348 DEFAULT_TRACE_BUFFER_SIZE.
4349 * server.c (handle_query): Add QTBuffer:size in the
4350 supported packets.
4351
4352 2013-03-07 Yao Qi <yao@codesourcery.com>
4353
4354 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4355 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4356 of -1.
4357 (cmd_qtsp): Adjust condition. Do post increment.
4358 Set cur_action and cur_step_action back to 0.
4359
4360 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4361
4362 PR server/15236
4363 * linux-low.c (linux_write_memory): Return early success if LEN is
4364 zero.
4365
4366 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4367
4368 * configure.srv: Add x86_64-*-cygwin* as target.
4369
4370 2013-02-28 Tom Tromey <tromey@redhat.com>
4371
4372 * configure.ac: Invoke AC_SYS_LARGEFILE.
4373 * configure, config.in: Rebuild.
4374
4375 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4376
4377 * win32-low.c: Throughout, fix format strings and casts of
4378 printf-like functions to avoid type related warnings on all
4379 platforms.
4380 (get_child_debug_event): Print dwDebugEventCode as hex since
4381 that's how it's usually documented.
4382
4383 2013-02-28 Yao Qi <yao@codesourcery.com>
4384
4385 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4386 pulongest.
4387
4388 2013-02-27 Jiong Wang <jiwang@tilera.com>
4389
4390 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4391 (reg-tilegx32.c): New rule.
4392 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4393 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4394 different register info initializer according to elf class.
4395 (init_registers_tilgx32): New function. The tilegx32 register info
4396 initializer.
4397 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4398 (tile_store_gregset): Likewise.
4399
4400 2013-02-27 Yao Qi <yao@codesourcery.com>
4401
4402 * server.c (process_point_options): Print debug message when
4403 debug_threads is true.
4404
4405 2013-02-26 Yao Qi <yao@codesourcery.com>
4406
4407 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4408
4409 2013-02-19 Pedro Alves <palves@redhat.com>
4410 Kai Tietz <ktietz@redhat.com>
4411
4412 PR gdb/15161
4413
4414 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4415 instead of strtoul to extract address from packet.
4416 (process_serial_event) <'z'>: Likewise.
4417
4418 2013-02-18 Yao Qi <yao@codesourcery.com>
4419
4420 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4421
4422 2013-02-14 Pedro Alves <palves@redhat.com>
4423
4424 Plug memory leak.
4425
4426 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4427 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4428
4429 2013-02-14 Pedro Alves <palves@redhat.com>
4430
4431 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4432
4433 2013-02-14 Pedro Alves <palves@redhat.com>
4434
4435 * tracepoint.c (save_string): Delete.
4436 (add_tracepoint_action): Use savestring instead of save_string.
4437
4438 2013-02-12 Pedro Alves <palves@redhat.com>
4439
4440 * linux-xtensa-low.c: Ditto.
4441 * xtensa-xtregs.c: Ditto.
4442
4443 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4444
4445 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4446 thread_db.
4447
4448 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4449
4450 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4451 aarch64_num_wp_regs and aarch64_num_bp_regs to
4452 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4453
4454 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4455
4456 * linux-aarch64-low.c (ps_get_thread_area): Replace
4457 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4458
4459 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4460 Marcus Shawcroft <marcus.shawcroft@arm.com>
4461 Nigel Stephens <nigel.stephens@arm.com>
4462 Yufeng Zhang <yufeng.zhang@arm.com>
4463
4464 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4465 (aarch64.c, aarch64-without-fpu.c): New targets.
4466 * configure.srv (aarch64*-*-linux*): New.
4467 * linux-aarch64-low.c: New file.
4468
4469 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4470
4471 * linux-low.c (handle_extended_wait, linux_create_inferior)
4472 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4473 (dequeue_one_deferred_signal, linux_resume_one_thread)
4474 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4475 (linux_tracefork_grandchild, linux_test_for_tracefork)
4476 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4477 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4478 where the argument is 0.
4479
4480 2013-01-25 Yao Qi <yao@codesourcery.com>
4481
4482 * event-loop.c: Include "queue.h".
4483 (gdb_event_p): New typedef.
4484 (struct gdb_event) <next_event>: Remove.
4485 (event_queue): Change to QUEUE(gdb_event_p).
4486 (async_queue_event): Remove.
4487 (gdb_event_xfree): New.
4488 (initialize_event_loop): New.
4489 (process_event): Use API from QUEUE.
4490 (wait_for_event): Likewise.
4491 * server.c (main): Call initialize_event_loop.
4492 * server.h (initialize_event_loop): Declare.
4493
4494 2013-01-18 Yao Qi <yao@codesourcery.com>
4495
4496 * ax.h (struct eval_agent_expr_context): New.
4497 (gdb_eval_agent_expr): Update declaration.
4498 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4499 TFRAME. Add new argument CTX.
4500 * server.h (struct eval_agent_expr_context): Declare.
4501 (agent_mem_read, agent_tsv_read): Update declaration.
4502 (agent_mem_read_string): Likewise.
4503 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4504 (add_traceframe_block): Add new argument TPOINT.
4505 Increase TPOINT->traceframe_usage.
4506 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4507 eval_tracepoint_agent_expr.
4508 (condition_true_at_tracepoint): Likewise.
4509 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4510 (agent_mem_read_string, agent_tsv_read): Likewise.
4511
4512 2013-01-16 Yao Qi <yao@codesourcery.com>
4513
4514 * linux-low.c (linux_resume_one_lwp): Don't check
4515 'lwp->bp_reinsert != 0'.
4516
4517 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4518 Pedro Alves <palves@redhat.com>
4519
4520 * lynx-low.c (ptrace_request_to_str): Define a temporary
4521 macro and use it to simplify this function's implementation.
4522
4523 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4524
4525 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4526 sets errno.
4527
4528 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4529
4530 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4531
4532 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4533
4534 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4535
4536 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4537
4538 * lynx-low.c (lynx_resume): Use the resume_info parameter
4539 to determine the ptid for the lynx_ptrace call, unless
4540 it is equal to minus_one_ptid, in which case we use the
4541 ptid of the current_inferior.
4542 (lynx_wait_1): After having received a thread create/exit
4543 event, resume the inferior's execution using the signaling
4544 thread's ptid, rather than the old ptid.
4545
4546 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4547
4548 * lynx-low.c (lynx_resume): Delete variable ret.
4549
4550 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4551
4552 * gdbreplay.c (gdbreplay_version): Update copyright year.
4553 * server.c (gdbserver_version): Likewise.
4554
4555 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4556
4557 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4558 new thread.
4559
4560 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4561
4562 * lynx-low.c (ptrace_request_to_str): Add handling for
4563 PTRACE_GETTRACESIG.
4564
4565 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4566
4567 * lynx-low.c (lynx_attach): Delete variable new_process.
4568
4569 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4570
4571 * lynx-low.c (lynx_create_inferior): Delete variable
4572 new_process.
4573
4574 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4575
4576 * lynx-low.c (ptrace_request_to_str): Do not handle
4577 PTRACE_GETTHREADLIST if this macro does not exist.
4578
4579 2012-12-15 Yao Qi <yao@codesourcery.com>
4580
4581 * Makefile.in (OBS): Add notif.o.
4582 * notif.c, notif.h: New.
4583 * server.c: Include "notif.h".
4584 (struct vstop_notif) <next>: Remove.
4585 <base>: New field.
4586 (queue_stop_reply): Update.
4587 (push_event, send_next_stop_reply): Remove.
4588 (discard_queued_stop_replies): Update.
4589 (notif_stop): New variable.
4590 (handle_v_stopped): Remove.
4591 (handle_v_requests): Don't call handle_v_stopped. Call
4592 handle_ack_notif instead.
4593 (queue_stop_reply_callback): Call notif_event_enque instead
4594 of queue_stop_reply.
4595 (handle_status): Don't call send_next_stop_reply, call
4596 notif_write_event instead.
4597 (kill_inferior_callback): Likewise.
4598 (detach_or_kill_inferior_callback): Likewise.
4599 (main): Call initialize_notif.
4600 (process_serial_event): Call QUEUE_is_empty.
4601 (handle_target_event): Call notif_push instead of push event.
4602 * server.h (push_event): Remove declaration.
4603
4604 2012-12-10 Tom Tromey <tromey@redhat.com>
4605
4606 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4607 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4608 macros.
4609 (.c.o): Rewrite.
4610 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4611 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4612 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4613 (amd64-linux-ipa.o, ax.o): Rewrite.
4614 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4615 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4616 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4617 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4618 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4619 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4620 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4621 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4622 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4623 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4624 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4625 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4626 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4627 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4628 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4629 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4630 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4631 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4632 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4633 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4634 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4635 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4636 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4637 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4638 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4639 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4640 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4641 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4642 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4643 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4644 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4645 (reg-tilegx.o): Remove.
4646 (all_object_files): New macro.
4647 Include .deps files.
4648 * aclocal.m4, configure: Rebuild.
4649 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4650 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4651 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4652
4653 2012-12-05 Tom Tromey <tromey@redhat.com>
4654
4655 PR gdb/14917:
4656 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4657
4658 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4659
4660 * configure.ac: Check for linux/perf_event.h.
4661 * config.in: Regenerated.
4662 * configure: Regenerated.
4663
4664 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4665
4666 * hostio.c (handle_readlink): Decrease buffer size
4667 parameter passed to readlink by one byte.
4668
4669 2012-11-26 Yao Qi <yao@codesourcery.com>
4670
4671 * configure.ac (build_warnings): Append '-Wempty-body'.
4672 * configure: Regenerated.
4673 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4674 body.
4675
4676 2012-11-15 Pierre Muller <muller@sourceware.org>
4677
4678 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4679 * config.in: Regenerate.
4680 * configure: Regenerate.
4681 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4682 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4683 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4684 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4685 header.
4686 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4687 instead of <sys/wait.h> header.
4688 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4689
4690 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4691
4692 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4693 (various make rules): Remove -DGDBSERVER
4694
4695 2012-11-09 Yao Qi <yao@codesourcery.com>
4696
4697 * spu-low.c (current_ptid): Move it to ..
4698 * gdbthread.h: ... here. New.
4699 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4700 * server.c (myresume, process_serial_event): Likewise.
4701 * thread-db.c (thread_db_find_new_threads): Likewise.
4702 * tracepoint.c (run_inferior_command): Likewise.
4703
4704 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4705
4706 * server.c (handle_search_memory_1): Include access length in
4707 warning message.
4708
4709 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4710
4711 * linux-crisv32-low.c: Fix compile errors.
4712
4713 2012-09-04 Yao Qi <yao@codesourcery.com>
4714
4715 * tracepoint.c (cmd_qtsv): Adjust debug message.
4716 Don't check CUR_TPOINT.
4717
4718 2012-08-28 Yao Qi <yao@codesourcery.com>
4719
4720 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4721 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4722 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4723 Remove declarations of xmalloc, xreallloc, xstrdup and
4724 freeargv.
4725 * Makefile.in (libiberty_h): New.
4726 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4727 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4728
4729 2012-08-23 Yao Qi <yao@codesourcery.com>
4730
4731 * server.h: Remove declaration of 'xsnprintf'.
4732
4733 2012-08-22 Keith Seitz <keiths@redhat.com>
4734
4735 * server.h: Include build-gnulib-gbserver/config.h.
4736 * gdbreplay.c: Likewise.
4737
4738 2012-08-08 Doug Evans <dje@google.com>
4739
4740 * Makefile.in (SFILES): Add gdb_vecs.c.
4741 (OBS): Add gdb_vecs.o.
4742 (gdb_vecs_h, host_defs_h): New variables.
4743 (thread-db.o): Add $(gdb_vecs_h) dependency.
4744 (gdb_vecs.o): New rule.
4745 * thread-db.c: #include "gdb_vecs.h".
4746 (thread_db_load_search): Use a vector to iterate over path elements.
4747 Handle text appearing after "$pdir".
4748
4749 * configure.ac: Add check for strstr.
4750 * config.in: Regenerate.
4751 * configure: Regenerate.
4752
4753 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4754
4755 * hostio.c (handle_pread): If pread fails, fall back to attempting
4756 lseek/read.
4757 (handle_pwrite): Likewise for pwrite.
4758
4759 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4760
4761 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4762 between unsupported TYPE and unimplementable ADDR/LEN combination.
4763 (arm_insert_point): Act on new return value.
4764
4765 2012-07-31 Pedro Alves <palves@redhat.com>
4766
4767 * server.c (process_point_options): Only skip tokens if we find
4768 one that is unrecognized. Don't treat 'X' specially while
4769 skipping unrecognized tokens.
4770
4771 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4772
4773 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4774 to 4-byte-align HW breakpoint addresses for Thumb.
4775
4776 2012-07-27 Yao Qi <yao@codesourcery.com>
4777
4778 PR remote/14161.
4779
4780 * server.h: Declare gdb_agent_about_to_close.
4781 * target.c (kill_inferior): Include "agent.h".
4782 New. Send command 'kill'.
4783 * target.h (kill_inferior): Removed macro.
4784 * tracepoint.c (gdb_agent_about_to_close): New.
4785 (gdb_agent_helper_thread): Handle command 'close'.
4786 Wait endlessly until the inferior stops.
4787 Install gdb_agent_remove_socket to atexit hook.
4788 (agent_socket_name): New static variable.
4789 (gdb_agent_socket_init): Replace local variable 'name' with
4790 'agent_socket_name'.
4791 (gdb_agent_remove_socket): New.
4792
4793 2012-07-27 Yao Qi <yao@codesourcery.com>
4794
4795 * server.c (process_point_options): Stop at 'X' when parsing.
4796
4797 2012-07-19 Michael Eager <eager@eagercon.com>
4798
4799 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4800 to hw_execute.
4801 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4802 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4803 hardware breakpoint.
4804
4805 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4806
4807 * gdbserver/linux-low.c (initialize_low): Call
4808 linux_ptrace_init_warnings.
4809
4810 2012-07-02 Doug Evans <dje@google.com>
4811
4812 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4813 pointer to int.
4814
4815 2012-07-02 Stan Shebs <stan@codesourcery.com>
4816
4817 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4818 (ax.o): Add it to build rule.
4819 (ax-ipa.o): Ditto.
4820 (OBS): Add format.o.
4821 (IPA_OBS): Add format.o.
4822 * server.c (handle_query): Claim support for breakpoint commands.
4823 (process_point_options): Add command case.
4824 (process_serial_event): Leave running if there are printfs in
4825 effect.
4826 * mem-break.h (any_persistent_commands): Declare.
4827 (add_breakpoint_commands): Declare.
4828 (gdb_no_commands_at_breakpoint): Declare.
4829 (run_breakpoint_commands): Declare.
4830 * mem-break.c (struct point_command_list): New struct.
4831 (struct breakpoint): New field command_list.
4832 (any_persistent_commands): New function.
4833 (add_commands_to_breakpoint): New function.
4834 (add_breakpoint_commands): New function.
4835 (gdb_no_commands_at_breakpoint): New function.
4836 (run_breakpoint_commands): New function.
4837 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4838 locally.
4839 * ax.c: Include format.h.
4840 (ax_printf): New function.
4841 (gdb_eval_agent_expr): Add printf opcode.
4842
4843 2012-06-13 Yao Qi <yao@codesourcery.com>
4844
4845 * server.c (start_inferior): Remove duplicated writes to fields
4846 'last_resume_kind' and 'last_status' of 'current_inferior'.
4847
4848 2012-06-12 Yao Qi <yao@codesourcery.com>
4849 Pedro Alves <palves@redhat.com>
4850
4851 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4852 comment.
4853 * server.c (handle_v_cont): Extend comment.
4854
4855 2012-06-11 Yao Qi <yao@codesourcery.com>
4856
4857 * linux-low.c (linux_attach): Add 'static'.
4858
4859 2012-06-06 Yao Qi <yao@codesourcery.com>
4860
4861 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4862
4863 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4864
4865 Fix gcc -flto compilation warning.
4866 * server.c (main): Make variable multi_mode and attach volatile.
4867
4868 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4869
4870 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4871 if the platform doesn't know about it.
4872
4873 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4874
4875 * Makefile.in (SFILES): Add linux-tile-low.c.
4876 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4877 * configure.srv: Handle tilegx-*-linux*.
4878 * linux-tile-low.c: New file.
4879
4880 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4881
4882 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4883
4884 2012-05-24 Pedro Alves <palves@redhat.com>
4885
4886 PR gdb/7205
4887
4888 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4889
4890 2012-05-24 Pedro Alves <palves@redhat.com>
4891
4892 PR gdb/7205
4893
4894 Replace target_signal with gdb_signal throughout.
4895
4896 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4897
4898 * linux-low.c (linux_store_registers): Avoid the copying sequence
4899 when no data has been retrieved by ptrace.
4900
4901 2012-05-22 Will Deacon <will.deacon@arm.com>
4902
4903 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4904 Include asm/ptrace.h.
4905 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4906 already defined.
4907
4908 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4909
4910 * linux-low.c (linux_store_registers): Don't re-retrieve data
4911 with ptrace that has already been obtained from /proc. Always
4912 copy any data retrieved with ptrace to the buffer supplied.
4913
4914 2012-05-11 Yao Qi <yao@codesourcery.com>
4915 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.c (enum stopping_threads_kind): New.
4918 (stopping_threads): Change type to `enum stopping_threads_kind'.
4919 (handle_extended_wait): If stopping and suspending threads, leave
4920 the new_lwp suspended too.
4921 (linux_wait_for_event): Adjust.
4922 (stop_all_lwps): Set `stopping_threads' to
4923 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4924 whether we're suspending threads or just stopping them. Assert no
4925 recursion happens.
4926
4927 2012-04-29 Yao Qi <yao@codesourcery.com>
4928
4929 * server.h: Move some code to ...
4930 * gdbthread.h: ... here. New.
4931 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4932 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4933 (nto-low.o, win32-low.o): Likewise.
4934 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4935 * regcache.c, remote-utils.c, server.c: Likewise.
4936 * target.c, tracepoint.c, win32-low.c: Likewise.
4937
4938 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4939
4940 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4941 (PTRACE_ARG4_TYPE): Likewise.
4942 (PTRACE_XFER_TYPE): Likewise.
4943 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4944 ptrace to PTRACE_ARG3_TYPE.
4945 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4946 (PTRACE_ARG4_TYPE): Likewise.
4947 (PTRACE_XFER_TYPE): Likewise.
4948 (linux_detach_one_lwp): Cast fourth argument of
4949 ptrace to long then PTRACE_ARG4_TYPE.
4950 (regsets_fetch_inferior_registers): Cast third argument of
4951 ptrace to long then PTRACE_ARG3_TYPE.
4952 (regsets_store_inferior_registers): Likewise.
4953
4954 2012-04-20 Pedro Alves <palves@redhat.com>
4955
4956 * configure: Regenerate.
4957
4958 2012-04-19 Pedro Alves <palves@redhat.com>
4959
4960 * Makefile.in (GNULIB_BUILDDIR): New.
4961 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4962 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4963 (all, install-only, uninstall, clean-info, all-lib, clean): No
4964 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4965 (maintainer-clean realclean distclean): Use subdir_do.
4966 (subdir_do): New.
4967 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4968 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4969 * acinclude.m4: Include acx_configure_dir.m4.
4970 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4971 calls. Call AC_PROG_RANLIB. Configure gnulib using
4972 ACX_CONFIGURE_DIR.
4973 (GNULIB): New.
4974 (GNULIB_STDINT_H): Adjust.
4975 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4976 * gdbreplay.c: Include build-gnulib/config.h.
4977 * server.h: Likewise.
4978 * aclocal.m4: Regenerate.
4979 * config.in: Regenerate.
4980 * configure: Regenerate.
4981
4982 2012-04-19 Pedro Alves <palves@redhat.com>
4983
4984 * Makefile.in (LIBGNU, INCGNU): Adjust.
4985 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4986 (all, install-only, uninstall, clean-info, all-lib, clean)
4987 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4988 * configure.ac: Adjust AC_OUTPUT output.
4989 * aclocal.m4: Regenerate.
4990 * configure: Regenerate.
4991
4992 2012-04-19 Pedro Alves <palves@redhat.com>
4993
4994 * Makefile.in (generated_files): New.
4995 (server_h): Remove the explicit dependency on config.h, and depend
4996 on $generated_files.
4997
4998 2012-04-19 Pedro Alves <palves@redhat.com>
4999
5000 * Makefile.in (INCGNU): Add -Ignulib.
5001
5002 2012-04-19 Pedro Alves <palves@redhat.com>
5003
5004 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5005 (INCGNU): ... this, and spell out -I here.
5006 (GNULIB_LIB): Rename to ...
5007 (LIBGNU): ... this.
5008 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5009
5010 2012-04-19 Pedro Alves <palves@redhat.com>
5011
5012 * config.in: Regenerate.
5013
5014 2012-04-19 Pedro Alves <palves@redhat.com>
5015
5016 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5017 * server.h (memmem): Remove declaration.
5018 * config.in: Regenerate.
5019 * configure: Regenerate.
5020
5021 2012-04-19 Yao Qi <yao@codesourcery.com>
5022
5023 * Makefile.in (SFILES): Add common/vec.c.
5024 (OBS): Add vec.o.
5025 (vec.o): New rule.
5026
5027 2012-04-19 Yao Qi <yao@codesourcery.com>
5028
5029 * remote-utils.c (prepare_resume_reply): Replace with macro
5030 target_core_of_thread.
5031 * server.c (handle_qxfer_threads_proper): Likewise.
5032 * target.h (traget_core_of_thread): New macro.
5033
5034 2012-04-18 Pedro Alves <palves@redhat.com>
5035
5036 * aclocal.m4: Regenerate.
5037 * configure: Regenerate.
5038
5039 2012-04-16 Yao Qi <yao@codesourcery.com>
5040
5041 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5042 duplicated on address.
5043
5044 2012-04-16 Yao Qi <yao@codesourcery.com>
5045
5046 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5047 (struct tracepoint_action_ops) <send>: New field.
5048 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5049 (agent_expr_send, x_tracepoint_action_send): New.
5050 (l_tracepoint_action_send): New.
5051 (cmd_qtdp): Download and install tracepoint
5052 according to `use_agent'.
5053 (run_inferior_command): Add one more parameter `len'.
5054 Update callers.
5055 (tracepoint_send_agent): New.
5056 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5057
5058 2012-04-16 Yao Qi <yao@codesourcery.com>
5059
5060 * tracepoint.c (download_tracepoints): Moved to ...
5061 (cmd_qtstart): ... here.
5062
5063 2012-04-14 Yao Qi <yao@codesourcery.com>
5064
5065 * tracepoint.c: Include inttypes.h.
5066 (struct collect_memory_action): Use sized types.
5067 (struct tracepoint): Likewise.
5068 (cmd_qtdp, stop_tracing): Update print specifiers.
5069 (cmd_qtp, response_tracepoint): Likewise.
5070 (collect_data_at_tracepoint): Likewise.
5071 (collect_data_at_step): Likewise.
5072
5073 2012-04-14 Yao Qi <yao@codesourcery.com>
5074
5075 Import gnulib module inttypes.
5076 * aclocal.m4, config.in, configure: Regenerated.
5077
5078 2012-04-14 Yao Qi <yao@codesourcery.com>
5079
5080 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5081 Makefile and config.status at last.
5082
5083 2012-04-13 Yao Qi <yao@codesourcery.com>
5084
5085 * tracepoint.c: Include stdint.h unconditionally.
5086
5087 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5088
5089 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5090 on BFD_HAVE_SYS_PROCFS_TYPE.
5091 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5092 * configure: Regenerate.
5093 * config.in: Likewise.
5094
5095 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5096
5097 * Makefile.in (clean): Also remove x32.c x32-linux.c
5098 x32-avx.c x32-avx-linux.c.
5099 (x32.o): New target.
5100 (x32.c): Likewise.
5101 (x32-linux.o): Likewise.
5102 (x32-linux.c): Likewise.
5103 (x32-avx.o): Likewise.
5104 (x32-avx.c): Likewise.
5105 (x32-avx-linux.o): Likewise.
5106 (x32-avx-linux.c): Likewise.
5107
5108 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5109 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5110 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5111 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5112 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5113 i386/x32-avx-linux.xml.
5114
5115 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5116 (init_registers_x32_avx_linux): Likwise.
5117 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5118 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5119
5120 2012-04-13 Pedro Alves <palves@redhat.com>
5121
5122 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5123 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5124 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5125 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5126 the sub-make.
5127
5128 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5129
5130 * linux-x86-low.c (compat_x32_clock_t): New.
5131 (compat_x32_siginfo_t): Likewise.
5132 (compat_x32_siginfo_from_siginfo): Likewise.
5133 (siginfo_from_compat_x32_siginfo): Likewise.
5134 (linux_is_elf64): Likewise.
5135 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5136 and siginfo_from_compat_x32_siginfo for x32.
5137 (x86_arch_setup): Set linux_is_elf64.
5138
5139 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5140
5141 PR gdb/13969
5142 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5143 e_machine field.
5144 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5145 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5146 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5147 compatible with process.
5148
5149 2012-04-12 Yao Qi <yao@codesourcery.com>
5150
5151 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5152 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5153 (install-only, install-info, clean): Handle sub dir gnulib.
5154 (all-lib, am--refresh): New targets.
5155 (memmem.o): Remove target.
5156 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5157 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5158 (AC_REPLACE_FUNCS): Remove memmem.
5159 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5160 (AC_OUTPUT): Generate Makefile in gnulib/.
5161 * aclocal.m4, config.in, configure: Regenerated.
5162
5163 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5164
5165 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5166
5167 2012-04-05 Pedro Alves <palves@redhat.com>
5168
5169 -Werror=strict-aliasing
5170
5171 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5172 pointer.
5173
5174 2012-04-04 Pedro Alves <palves@redhat.com>
5175
5176 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5177 (sparc_store_gregset_from_stack, sparc_store_gregset)
5178 (sparc_breakpoint_at): Fix formatting.
5179
5180 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5181
5182 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5183 are available.
5184 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5185 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5186 * config.in: Regenerate.
5187 * configure: Likewise.
5188
5189 2012-03-29 Pedro Alves <palves@redhat.com>
5190
5191 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5192 Correct ptrace arguments.
5193
5194 2012-03-28 Pedro Alves <palves@redhat.com>
5195
5196 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5197 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5198 (IA64_FR1_REGNUM): New defines.
5199 (ia64_fetch_register): New.
5200 (the_low_target): Install it.
5201 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5202 field.
5203 * linux-low.c (linux_fetch_registers): Try the
5204 the_low_target.fetch_register hook first.
5205
5206 * linux-arm-low.c (the_low_target): Adjust.
5207 * linux-bfin-low.c (the_low_target): Adjust.
5208 * linux-cris-low.c (the_low_target): Adjust.
5209 * linux-crisv32-low.c (the_low_target): Adjust.
5210 * linux-m32r-low.c (the_low_target): Adjust.
5211 * linux-m68k-low.c (the_low_target): Adjust.
5212 * linux-mips-low.c (the_low_target): Adjust.
5213 * linux-ppc-low.c (the_low_target): Adjust.
5214 * linux-s390-low.c (the_low_target): Adjust.
5215 * linux-sh-low.c (the_low_target): Adjust.
5216 * linux-sparc-low.c (the_low_target): Adjust.
5217 * linux-tic6x-low.c (the_low_target): Adjust.
5218 * linux-x86-low.c (the_low_target): Adjust.
5219 * linux-xtensa-low.c (the_low_target): Adjust.
5220
5221 2012-03-26 Pedro Alves <palves@redhat.com>
5222
5223 * server.c (handle_qxfer_libraries): Don't bail early if
5224 the_target->qxfer_libraries_svr4 is not NULL.
5225
5226 2012-03-26 Pedro Alves <palves@redhat.com>
5227
5228 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5229
5230 2012-03-23 Pedro Alves <palves@redhat.com>
5231
5232 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5233 "library-list-svr4" element's start tag when the the DSO list is
5234 empty.
5235
5236 2012-03-23 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5239 a variable whose type size is the same as the inferior's pointer
5240 size.
5241
5242 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5243
5244 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5245 struct siginfo.
5246 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5247 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5248 * linux-low.h: Include <signal.h>.
5249 (struct siginfo): Remove forward declaration.
5250 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5251 struct siginfo.
5252
5253 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5254
5255 * .gitignore: Ignore more files.
5256
5257 2012-03-19 Pedro Alves <palves@redhat.com>
5258 Jan Kratochvil <jan.kratochvil@redhat.com>
5259
5260 * server.c (cont_thread, general_thread): Add describing comments.
5261 (start_inferior): Clear `cont_thread'.
5262 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5263 of a process.
5264
5265 2012-03-15 Yao Qi <yao@codesourcery.com>
5266
5267 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5268 handling to ...
5269 (cmd_qtdp): ... here.
5270
5271 2012-03-15 Yao Qi <yao@codesourcery.com>
5272
5273 * tracepoint.c (struct tracepoint_action_ops): New.
5274 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5275 (m_tracepoint_action_download): New.
5276 (r_tracepoint_action_download): New.
5277 (x_tracepoint_action_download): New.
5278 (l_tracepoint_action_download): New.
5279 (add_tracepoint_action): Install `action->ops' according type.
5280 (download_tracepoint_1): Move code `download' function pointer
5281 of various tracepoint_action_ops.
5282
5283 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5284
5285 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5286 linux_ptrace_attach_warnings.
5287
5288 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5289
5290 * Makefile.in (linux-ptrace.o): New.
5291 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5292 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5293 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5294 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5295 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5296 of these targets.
5297 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5298
5299 2012-03-08 Yao Qi <yao@codesourcery.com>
5300 Pedro Alves <palves@redhat.com>
5301
5302 Fix PR server/13392.
5303 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5304 offset of JMP insn.
5305 * tracepoint.c (remove_tracepoint): New.
5306 (cmd_qtdp): Call remove_tracepoint when failed to install.
5307
5308 2012-03-07 Pedro Alves <palves@redhat.com>
5309
5310 * linux-low.c (get_detach_signal): New.
5311 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5312 Pass on pending signals to PTRACE_DETACH. Check the result of the
5313 ptrace call.
5314 * server.c (program_signals, program_signals_p): New.
5315 (handle_general_set): Handle QProgramSignals.
5316 * server.h (program_signals, program_signals_p): Declare.
5317
5318 2012-03-05 Pedro Alves <palves@redhat.com>
5319 Jan Kratochvil <jan.kratochvil@redhat.com>
5320
5321 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5322 New comment why.
5323
5324 2012-03-03 Yao Qi <yao@codesourcery.com>
5325
5326 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5327 agent_look_up_symbols.
5328
5329 2012-03-03 Yao Qi <yao@codesourcery.com>
5330
5331 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5332 (linux-x86-low.o): Likewise.
5333 * server.h: Remove in_process_agent_loaded.
5334 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5335 common/agent.c.
5336 Update callers.
5337
5338 2012-03-03 Yao Qi <yao@codesourcery.com>
5339
5340 * tracepoint.c (gdb_agent_capability): New global.
5341 (in_process_agent_loaded_ust): Renamed to
5342 `in_process_agent_supports_ust'.
5343 Update callers.
5344 (in_process_agent_supports_ust): Call agent_capability_check.
5345 (clear_installed_tracepoints): Assert that agent supports
5346 agent.
5347
5348 2012-03-03 Yao Qi <yao@codesourcery.com>
5349
5350 * linux-low.c (linux_supports_agent): New.
5351 (linux_target_ops): Initialize field `supports_agent' with
5352 linux_supports_agent.
5353 * target.h (struct target_ops) <supports_agent>: New.
5354 (target_supports_agent): New macro.
5355 * server.c (handle_general_set): Handle packet 'QAgent'.
5356 (handle_query): Send `QAgent+'.
5357 * Makefile.in (server.o): Depends on agent.h.
5358
5359 2012-03-03 Yao Qi <yao@codesourcery.com>
5360
5361 * Makefile.in (OBS): Add agent.o.
5362 Add new rule for agent.o.
5363 Track dependence of tracepoint.c on agent.h.
5364 * tracepoint.c (run_inferior_command_1):
5365 (run_inferior_command): Call agent_run_command.
5366 (gdb_ust_connect_sync_socket): Deleted. Move it to
5367 common/agent.c.
5368 (resume_thread, stop_thread): Likewise.
5369 (gdb_ust_socket_init): Renamed to ...
5370 (gdb_agent_socket_init): ... New.
5371 (gdb_ust_thread): Renamed to ...
5372 (gdb_agent_helper_thread): ... New.
5373 (gdb_ust_init): Move some code to ...
5374 (gdb_agent_init): ... here. New.
5375 [HAVE_UST]: Call gdb_ust_init.
5376 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5377 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5378 * config.in, configure: Regenerated.
5379
5380 2012-03-02 Pedro Alves <palves@redhat.com>
5381
5382 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5383 * linux-low.c (struct simple_pid_list): New.
5384 (stopped_pids): New a struct simple_pid_list pointer.
5385 (add_to_pid_list, pull_pid_from_list): New.
5386 (handle_extended_wait): Don't assume the first signal new children
5387 report is SIGSTOP. Adjust call to pull_pid_from_list.
5388 (linux_wait_for_lwp): Adjust.
5389
5390 2012-03-02 Yao Qi <yao@codesourcery.com>
5391
5392 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5393 debug log.
5394
5395 2012-03-02 Yao Qi <yao@codesourcery.com>
5396
5397 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5398 `stop_pc' and `tpoint'. Update caller.
5399
5400 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5401
5402 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5403 * linux-low.c (use_linux_regsets): New macro.
5404 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5405 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5406 (linux_register_in_regsets): New function.
5407 (usr_fetch_inferior_registers): Skip registers covered by
5408 regsets.
5409 (usr_store_inferior_registers): Likewise.
5410 (usr_fetch_inferior_registers): New macro.
5411 (usr_store_inferior_registers): Likewise.
5412 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5413 (linux_store_registers): Likewise.
5414 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5415 prototype.
5416 (init_registers_mips64_dsp_linux): Likewise.
5417 (init_registers_mips_linux): New macro.
5418 (init_registers_mips_dsp_linux): Likewise.
5419 (mips_dsp_num_regs): Likewise.
5420 (DSP_BASE, DSP_CONTROL): New fallback macros.
5421 (mips_base_regs): New macro.
5422 (mips_regmap): Use it. Fix the size.
5423 (mips_dsp_regmap): New variable.
5424 (mips_dsp_regset_bitmap): Likewise.
5425 (mips_arch_setup): New function.
5426 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5427 than mips_regmap.
5428 (mips_cannot_store_register): Likewise.
5429 (the_low_target): Update .arch_setup, .num_regs and .regmap
5430 initializers. Add .regset_bitmap initializer.
5431 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5432 initializer.
5433 * linux-bfin-low.c (the_low_target): Likewise.
5434 * linux-cris-low.c (the_low_target): Likewise.
5435 * linux-crisv32-low.c (the_low_target): Likewise.
5436 * linux-ia64-low.c (the_low_target): Likewise.
5437 * linux-m32r-low.c (the_low_target): Likewise.
5438 * linux-m68k-low.c (the_low_target): Likewise.
5439 * linux-ppc-low.c (the_low_target): Likewise.
5440 * linux-s390-low.c (the_low_target): Likewise.
5441 * linux-sh-low.c (the_low_target): Likewise.
5442 * linux-sparc-low.c (the_low_target): Likewise.
5443 * linux-tic6x-low.c (the_low_target): Likewise.
5444 * linux-x86-low.c (the_low_target): Likewise.
5445 * linux-xtensa-low.c (the_low_target): Likewise.
5446 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5447 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5448 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5449 srv_xmlfiles.
5450 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5451 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5452
5453 2012-02-29 Yao Qi <yao@codesourcery.com>
5454 Pedro Alves <palves@redhat.com>
5455
5456 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5457 `step_over_finished' is true.
5458
5459 2012-02-27 Pedro Alves <palves@redhat.com>
5460
5461 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5462 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5463
5464 2012-02-27 Pedro Alves <palves@redhat.com>
5465
5466 PR server/9684
5467 * linux-low.c (pid_is_stopped): New.
5468 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5469
5470 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5471
5472 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5473 of conditions.
5474
5475 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5476
5477 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5478
5479 2012-02-24 Luis Machado <lgustavo@codesourcery>
5480
5481 * server.c (handle_query): Advertise support for target-side
5482 breakpoint condition evaluation.
5483 (process_point_options): New function.
5484 (process_serial_event): When inserting a breakpoint, check for
5485 a target-side condition that should be evaluated.
5486
5487 * mem-break.c: Include regcache.h and ax.h.
5488 (point_cond_list_t): New data structure.
5489 (breakpoint) <cond_list>: New field.
5490 (find_gdb_breakpoint_at): Make non-static.
5491 (delete_gdb_breakpoint_at): Clear any target-side
5492 conditions.
5493 (clear_gdb_breakpoint_conditions): New function.
5494 (add_condition_to_breakpoint): Likewise.
5495 (add_breakpoint_condition): Likewise.
5496 (gdb_condition_true_at_breakpoint): Likewise.
5497 (gdb_breakpoint_here): Return result directly instead
5498 of going through a local variable.
5499
5500 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5501 (clear_gdb_breakpoint_conditions): Likewise.
5502 (add_breakpoint_condition): Likewise.
5503 (gdb_condition_true_at_breakpoint): Likewise.
5504
5505 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5506 (need_step_over_p): Take target-side breakpoint condition into
5507 consideration.
5508
5509 2012-02-24 Luis Machado <lgustavo@codesourcery>
5510
5511 * server.h: Include tracepoint.h.
5512 (agent_mem_read, agent_get_trace_state_variable_value,
5513 agent_set_trace_state_variable_value,
5514 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5515 get_set_tsv_func_addr): New prototypes.
5516
5517 * ax.h: New include file.
5518 * ax.c: New source file.
5519
5520 * tracepoint.c: Include ax.h.
5521 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5522 agent_expr, eval_result_type): Move to ax.h.
5523 (parse_agent_expr): Rename to ...
5524 (gdb_parse_agent_expr): ... this, make it non-static and move
5525 to ax.h.
5526 (unparse_agent_expr) Rename to ...
5527 (gdb_unparse_agent_expr): ... this, make it non-static and move
5528 to ax.h.
5529 (eval_agent_expr): Rename to ...
5530 (eval_tracepoint_agent_expr): ... this.
5531 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5532 forward declarations.
5533 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5534 (agent_get_trace_state_variable_value): New function.
5535 (agent_set_trace_state_variable_value): New function.
5536 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5537 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5538 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5539 (condition_true_at_tracepoint): Likewise.
5540 (parse_agent_expr): Rename to ...
5541 (gdb_parse_agent_expr): ... this and move to ax.c.
5542 (unparse_agent_expr): Rename to ...
5543 (gdb_unparse_agent_expr): ... this and move to ax.c.
5544 (gdb_agent_op_name): Move to ax.c.
5545 (eval_agent_expr): Rename to ...
5546 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5547 and move to ax.c.
5548 (eval_tracepoint_agent_expr): New function.
5549 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5550 non-static.
5551 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5552 ax.c.
5553 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5554 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5555 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5556 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5557 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5558 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5559 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5560 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5561 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5562 (compile_bytecodes): Remove forward declaration.
5563 (is_goto_target): Move to ax.c.
5564 (compile_bytecodes): Move to ax.c and call
5565 agent_get_trace_state_variable_value (...) and
5566 agent_set_trace_state_variable_value (...).
5567
5568 * Makefile.in: Update ax.c and IPA dependencies.
5569
5570 2012-02-24 Pedro Alves <palves@redhat.com>
5571
5572 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5573 (cmd_bigqtbuffer_circular): ... this. Only handle
5574 'QTBuffer:circular:'.
5575 (handle_tracepoint_general_set): Adjust.
5576
5577 2012-02-16 Yao Qi <yao@codesourcery.com>
5578
5579 * inferiors.c: Move code to ...
5580 * dll.c: .... here. New.
5581 * server.h: Declare clear_dlls.
5582 * Makefile.in (SFILES): Add dll.c.
5583 (OBS): Add dll.o
5584 (dll.o): New rule.
5585
5586 2012-02-11 Yao Qi <yao@codesourcery.com>
5587
5588 * server.c: (handle_monitor_command): Add a new parameter
5589 `own_buf'.
5590 (handle_query): Update caller.
5591
5592 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5593
5594 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5595 * configure, config.in: Regenerate.
5596 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5597 is not defined.
5598
5599 2012-02-02 Pedro Alves <palves@redhat.com>
5600
5601 Try SIGKILL first, then PTRACE_KILL.
5602 * linux-low.c (linux_kill_one_lwp): New.
5603 (linux_kill_one_lwp): Rename to ...
5604 (kill_one_lwp_callback): ... this. Use the new
5605 linux_kill_one_lwp.
5606
5607 2012-02-02 Pedro Alves <palves@redhat.com>
5608
5609 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5610 inferior.
5611
5612 2012-01-27 Pedro Alves <palves@redhat.com>
5613
5614 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5615 (elf_64_file_p): Make static.
5616 (linux_pid_exe_is_elf_64_file): New.
5617 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5618 Delete declarations.
5619 (linux_pid_exe_is_elf_64_file): Declare.
5620 * linux-x86-low.c (x86_arch_setup): Use
5621 linux_pid_exe_is_elf_64_file.
5622
5623 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5624
5625 * linux-low.c (linux_wait_for_event_1): Rename to ...
5626 (linux_wait_for_event): ... here and merge it with former
5627 linux_wait_for_event - new variable wait_ptid, use it.
5628 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5629
5630 2012-01-23 Pedro Alves <palves@redhat.com>
5631
5632 * server.c (main): Avoid yet another case of infinite loop while
5633 detaching/killing after a longjmp.
5634
5635 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5636
5637 Code cleanup.
5638 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5639
5640 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5641
5642 * hostio.c (handle_readlink): New function.
5643 (handle_vFile): Call it to handle "vFile:readlink" packets.
5644
5645 2012-01-20 Pedro Alves <palves@redhat.com>
5646 Ulrich Weigand <ulrich.weigand@linaro.org>
5647
5648 * server.c (handle_v_requests): Only support vAttach and vRun to
5649 start multiple processes when in extended protocol mode.
5650
5651 2012-01-17 Pedro Alves <palves@redhat.com>
5652
5653 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5654 memalign plus mprotect to allocate the scratch buffer.
5655
5656 2012-01-13 Pedro Alves <palves@redhat.com>
5657
5658 * server.c (attach_inferior): Clear `cont_thread'.
5659
5660 2012-01-13 Pedro Alves <palves@redhat.com>
5661
5662 * server.c (main): Avoid infinite loop while detaching/killing
5663 after a longjmp.
5664
5665 2012-01-09 Doug Evans <dje@google.com>
5666
5667 * server.c (start_inferior): Set last_ptid in --wrapper case.
5668
5669 2012-01-06 Yao Qi <yao@codesourcery.com>
5670
5671 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5672 defined.
5673 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5674
5675 2012-01-04 Yao Qi <yao@codesourcery.com>
5676
5677 * tracepoint.c (cmd_qtdp): Print debug message
5678 for static tracepoint.
5679
5680 2012-01-04 Yao Qi <yao@codesourcery.com>
5681
5682 * tracepoint.c (trace_vdebug): Differentiate debug message
5683 between gdbserver and IPA.
5684
5685 2012-01-03 Yao Qi <yao@codesourcery.com>
5686
5687 * tracepoint.c (tracepoint_was_hit): Don't collect for
5688 static tracepoint.
5689
5690 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5691
5692 * terminal.h: Reformat copyright header.
5693
5694 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5695
5696 * server.c (gdbserver_version): Update copyright year.
5697 * gdbreplay.c (gdbreplay_version): Likewise.
5698
5699 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5700
5701 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5702
5703 Revert:
5704 2011-12-18 Hui Zhu <teawater@gmail.com>
5705 * linux-low.c (linux_create_inferior): Save return value to ret.
5706
5707 2011-12-18 Hui Zhu <teawater@gmail.com>
5708
5709 * linux-low.c (linux_create_inferior): Save return value to ret.
5710
5711 2011-12-16 Doug Evans <dje@google.com>
5712
5713 * linux-low.c (linux_create_inferior): If stdio connection,
5714 redirect stdin from /dev/null, stdout to stderr.
5715 * remote-utils.c (remote_is_stdio): New static global.
5716 (remote_connection_is_stdio): New function.
5717 (remote_prepare): Handle stdio connection.
5718 (remote_open): Ditto.
5719 (remote_close): Don't close stdin for stdio connections.
5720 (read_prim,write_prim): New functions. Replace all calls to
5721 read/write to these.
5722 * server.c (main): Watch for "-" argument. Move call to
5723 remote_prepare before start_inferior.
5724 * server.h (STDIO_CONNECTION_NAME): New macro.
5725 (remote_connection_is_stdio): Declare.
5726
5727 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5728 in debugging output.
5729
5730 2011-12-15 Yao Qi <yao@codesourcery.com>
5731
5732 * tracepoint.c: Include sys/syscall.h.
5733 (gdb_ust_thread): Remove preprocessor conditional.
5734
5735 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5736
5737 * linux-low.c (linux_detach_one_lwp): Call
5738 the_low_target.prepare_to_resume before detaching.
5739
5740 2011-12-14 Yao Qi <yao@codesourcery.com>
5741
5742 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5743 of write.
5744
5745 2011-12-14 Yao Qi <yao@codesourcery.com>
5746
5747 * i386-low.c (i386_low_stopped_data_address): Initialize local
5748 variable `control'.
5749
5750 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5751
5752 PR remote/13492
5753
5754 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5755 DR_CONTROL unless necessary. Extend comments.
5756 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5757 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5758
5759 2011-12-13 Yao Qi <yao@codesourcery.com>
5760
5761 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5762 macros.
5763 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5764
5765 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5766
5767 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5768 Print new debug message for such case.
5769
5770 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5771
5772 Fix overlapping memcpy.
5773 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5774 the read_inferior_memory transfer.
5775 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5776 write_inferior_memory transfer.
5777 (set_fast_tracepoint_jump): New variable buf. Use it for the
5778 read_inferior_memory and write_inferior_memory transfers.
5779 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5780 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5781 Use it for the write_inferior_memory transfer.
5782 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5783 buffers.
5784
5785 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5786
5787 * linux-low.c (fetch_register, store_register): Make code
5788 consistent, fix formatting.
5789
5790 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5791
5792 * linux-low.c (usr_store_inferior_registers): Factor out code
5793 to handle individual registers into...
5794 (store_register): ... this new function.
5795
5796 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5797
5798 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5799 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5800 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5801 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5802 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5803 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5804 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5805 (srv_xmlfiles): Add new XML files.
5806
5807 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5808 and <sys/uio.h>.
5809 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5810 (init_registers_s390_linux32v1): Add prototype.
5811 (init_registers_s390_linux32v2): Likewise.
5812 (init_registers_s390_linux64v1): Likewise.
5813 (init_registers_s390_linux64v2): Likewise.
5814 (init_registers_s390x_linux64v1): Likewise.
5815 (init_registers_s390x_linux64v2): Likewise.
5816 (s390_num_regs): Increment to 52.
5817 (s390_regmap): Add orig_r2 register.
5818 (s390_num_regs_3264): Increment to 68.
5819 (s390_regmap_3264): Add orig_r2 register.
5820 (s390_collect_ptrace_register): Handle orig_r2 register.
5821 (s390_supply_ptrace_register): Likewise.
5822 (s390_fill_last_break): New function.
5823 (s390_store_last_break): Likewise.
5824 (s390_fill_system_call): New function.
5825 (s390_store_system_call): Likewise.
5826 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5827 register sets.
5828 (s390_check_regset): New function.
5829 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5830 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5831 Update target_regsets for available register sets.
5832
5833 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5834 Jan Kratochvil <jan.kratochvil@redhat.com>
5835
5836 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5837 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5838 New.
5839 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5840 * linux-low.h (struct process_info_private): New member r_debug.
5841 * server.c (handle_qxfer_libraries): Call
5842 the_target->qxfer_libraries_svr4.
5843 (handle_qxfer_libraries_svr4): New function.
5844 (qxfer_packets): New entry "libraries-svr4".
5845 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5846 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5847 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5848 PACKET_qXfer_libraries_svr4.
5849
5850 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5851
5852 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5853 PSW address/mask between 8-byte and 16-byte formats.
5854 (s390_supply_ptrace_register): Likewise.
5855 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5856 basic addressing mode bit.
5857
5858 2011-11-24 Stan Shebs <stan@codesourcery.com>
5859
5860 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5861
5862 2011-11-17 Stan Shebs <stan@codesourcery.com>
5863
5864 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5865 (tracing_start_time): New global.
5866 (tracing_stop_time): New global.
5867 (tracing_user_name): New global.
5868 (tracing_notes): New global.
5869 (tracing_stop_note): New global.
5870 (cmd_qtstart): Set traceframe_usage, start_time.
5871 (stop_tracing): Set stop_time.
5872 (cmd_qtstatus): Report additional status.
5873 (cmd_qtp): New function.
5874 (handle_tracepoint_query): Call it.
5875 (cmd_qtnotes): New function.
5876 (handle_tracepoint_general_set): Call it.
5877 (get_timestamp): Rename from tsv_get_timestamp.
5878
5879 2011-11-14 Stan Shebs <stan@codesourcery.com>
5880 Kwok Cheung Yeung <kcy@codesourcery.com>
5881
5882 * linux-x86-low.c (small_jump_insn): New.
5883 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5884 trampoline and error message, build a trampoline and issue a small
5885 jump instruction to it.
5886 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5887 trampoline and error message.
5888 (x86_get_min_fast_tracepoint_insn_len): New.
5889 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5890 * linux-low.h (struct linux_target_ops): Add arguments to
5891 install_fast_tracepoint_jump_pad operation, add new operation.
5892 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5893 arguments.
5894 (linux_get_min_fast_tracepoint_insn_len): New function.
5895 (linux_target_op): Add new operation.
5896 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5897 (gdb_trampoline_buffer_end): Ditto.
5898 (gdb_trampoline_buffer_error): Ditto.
5899 (struct ipa_sym_addresses): Add fields for new IPA variables.
5900 (symbol_list): Add entries for new IPA variables.
5901 (struct tracepoint): Add fields to hold the address range of the
5902 trampoline used by the tracepoint.
5903 (trampoline_buffer_head): New static variable.
5904 (trampoline_buffer_tail): Ditto.
5905 (claim_trampoline_space): New function.
5906 (have_fast_tracepoint_trampoline_buffer): New function.
5907 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5908 structure.
5909 (install_fast_tracepoint): Ditto, also add error buffer argument.
5910 (cmd_qtminftpilen): New function.
5911 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5912 (fast_tracepoint_from_trampoline_address): New function.
5913 (fast_tracepoint_collecting): Handle trampoline as part of jump
5914 pad space.
5915 (set_trampoline_buffer_space): New function.
5916 (initialize_tracepoint): Initialize new IPA variables.
5917 * target.h (struct target_ops): Add arguments to
5918 install_fast_tracepoint_jump_pad operation, add new
5919 get_min_fast_tracepoint_insn_len operation.
5920 (target_get_min_fast_tracepoint_insn_len): New.
5921 (install_fast_tracepoint_jump_pad): Add arguments.
5922 * server.h (IPA_BUFSIZ): Define.
5923 * linux-i386-ipa.c: Include extra header files.
5924 (initialize_fast_tracepoint_trampoline_buffer): New function.
5925 (initialize_low_tracepoint): Call it.
5926 * server.h (set_trampoline_buffer_space): Declare.
5927 (claim_trampoline_space): Ditto.
5928 (have_fast_tracepoint_trampoline_buffer): Ditto.
5929
5930 2011-11-14 Yao Qi <yao@codesourcery.com>
5931
5932 * server.c (handle_query): Handle InstallInTrace for qSupported.
5933 * tracepoint.c (add_tracepoint): Sort list.
5934 (install_tracepoint, download_tracepoint): New.
5935 (cmd_qtdp): Call them to install and download tracepoints.
5936 (sort_tracepoints): Removed.
5937 (cmd_qtstart): Update.
5938
5939 2011-11-14 Yao Qi <yao@codesourcery.com>
5940
5941 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5942 * mem-break.h: Declare.
5943 * tracepoint.c (cmd_qtstart): Move some code to ...
5944 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5945 New.
5946 (download_tracepoints): Move some code to ...
5947 (download_tracepoint_1): ... here. New.
5948
5949 2011-11-08 Yao Qi <yao@codesourcery.com>
5950
5951 * remote-utils.c (relocate_instruction): A comment fix.
5952
5953 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5954
5955 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5956 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5957 dr_status_mirror and dr_control_mirror from debug_reg_state.
5958 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5959 (i386_initial_stuff): Remove use of deleted globals.
5960 (i386_get_thread_context, i386_set_thread_context,
5961 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5962 from debug_reg_state.
5963
5964 2011-11-05 Yao Qi <yao@codesourcery.com>
5965
5966 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5967 address as TPOINT's.
5968
5969 2011-11-02 Stan Shebs <stan@codesourcery.com>
5970
5971 * tracepoint.c (agent_mem_read_string): New function.
5972 (eval_agent_expr): Call it for tracenz.
5973 * server.c (handle_query): Report support for tracenz.
5974
5975 2011-11-02 Yao Qi <yao@codesourcery.com>
5976
5977 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5978
5979 2011-11-02 Yao Qi <yao@codesourcery.com>
5980
5981 * target.h: Fix a typo in comment.
5982
5983 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5984
5985 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5986 clobber the breakpoints' shadows with fast tracepoint jumps.
5987 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5988 * target.c (write_inferior_memory): Also pass MYADDR down to
5989 check_mem_write.
5990
5991 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5992
5993 * configure.ac: Check support for personality routine.
5994 * configure: Regenerate.
5995 * config.in: Likewise.
5996 * linux-low.c: Include <sys/personality.h>.
5997 Define ADDR_NO_RANDOMIZE if necessary.
5998 (linux_create_inferior): Disable address space randomization when
5999 forking inferior, if requested.
6000 (linux_supports_disable_randomization): New function.
6001 (linux_target_ops): Install it.
6002 * server.h (disable_randomization): Declare.
6003 * server.c (disable_randomization): New global variable.
6004 (handle_general_set): Handle QDisableRandomization.
6005 (handle_query): Likewise for qSupported.
6006 (main): Support --disable-randomization and --no-disable-randomization
6007 command line arguments.
6008 * target.h (struct target_ops): Add supports_disable_randomization.
6009 (target_supports_disable_randomization): New macro.
6010
6011 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6012
6013 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6014 ifdef check.
6015 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6016 [!PT_GETDSBT] (target_loadmap): New definition.
6017 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6018 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6019 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6020 and PT_GETDSBT to LINUX_LOADMAP.
6021 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6022 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6023
6024 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6025
6026 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6027 (arm_linux_hwbp_cap): New static variable.
6028 (arm_linux_get_hwbp_cap): Replace by ...
6029 (arm_linux_init_hwbp_cap): ... this new function.
6030 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6031 (arm_linux_get_hw_watchpoint_count): Likewise.
6032 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6033 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6034 (arm_prepare_to_resume): Use perror_with_name instead of error.
6035
6036 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6037
6038 * linux-arm-low.c: Include <signal.h>.
6039 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6040 (struct arm_linux_hwbp_cap): New data type.
6041 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6042 (struct arm_linux_hw_breakpoint): New data type.
6043 (MAX_BPTS, MAX_WPTS): Define.
6044 (struct arch_process_info, struct arch_lwp_info): New data types.
6045 (arm_linux_get_hwbp_cap): New function.
6046 (arm_linux_get_hw_breakpoint_count): Likewise.
6047 (arm_linux_get_hw_watchpoint_count): Likewise.
6048 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6049 (arm_hwbp_control_initialize): Likewise.
6050 (arm_hwbp_control_is_enabled): Likewise.
6051 (arm_hwbp_control_is_initialized): Likewise.
6052 (arm_hwbp_control_disable): Likewise.
6053 (arm_linux_hw_breakpoint_equal): Likewise.
6054 (arm_linux_hw_point_initialize): Likewise.
6055 (struct update_registers_data): New data structure.
6056 (update_registers_callback: New function.
6057 (arm_insert_point): Likewise.
6058 (arm_remove_point): Likewise.
6059 (arm_stopped_by_watchpoint): Likewise.
6060 (arm_stopped_data_address): Likewise.
6061 (arm_new_process): Likewise.
6062 (arm_new_thread): Likewise.
6063 (arm_prepare_to_resume): Likewise.
6064 (the_low_target): Register arm_insert_point, arm_remove_point,
6065 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6066 arm_new_thread, and arm_prepare_to_resume.
6067
6068 2011-09-15 Stan Shebs <stan@codesourcery.com>
6069
6070 * server.h (struct emit_ops): Add compare-goto fields.
6071 * tracepoint.c (gdb_agent_op_sizes): New table.
6072 (emit_eq_goto): New function.
6073 (emit_ne_goto): New function.
6074 (emit_lt_goto): New function.
6075 (emit_le_goto): New function.
6076 (emit_gt_goto): New function.
6077 (emit_ge_goto): New function.
6078 (is_goto_target): New function.
6079 (compile_bytecodes): Recognize special cases of compare-goto
6080 combinations and call specialized emitters for them.
6081 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6082 (amd64_emit_ne_goto): New function.
6083 (amd64_emit_lt_goto): New function.
6084 (amd64_emit_le_goto): New function.
6085 (amd64_emit_gt_goto): New function.
6086 (amd64_emit_ge_goto): New function.
6087 (amd64_emit_ops): Add the new functions.
6088 (i386_emit_eq_goto): New function.
6089 (i386_emit_ne_goto): New function.
6090 (i386_emit_lt_goto): New function.
6091 (i386_emit_le_goto): New function.
6092 (i386_emit_gt_goto): New function.
6093 (i386_emit_ge_goto): New function.
6094 (i386_emit_ops): Add the new functions.
6095
6096 2011-09-08 Stan Shebs <stan@codesourcery.com>
6097
6098 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6099 (i386_emit_epilogue): Restore %ebx.
6100
6101 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6102
6103 * server.c (step_thread): Remove definition.
6104 (process_serial_event): Don't handle Hs.
6105 * server.h (step_thread): Remove declaration.
6106 * target.c (set_desired_inferior): Remove use of step_thread.
6107
6108 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6109
6110 * linux-low.c: Include linux-procfs.h.
6111 (linux_attach_lwp_1): Update comments.
6112 (linux_attach): Scan for existing threads when attaching to a
6113 process that is the tgid.
6114 * Makefile.in: Update dependencies.
6115
6116 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6117
6118 * configure.srv: Add linux-procfs.o dependencies.
6119
6120 2011-08-14 Yao Qi <yao@codesourcery.com>
6121
6122 * target.h (struct target_ops): Fix indent.
6123 * win32-low.c (win32_target_ops): Fix comment.
6124
6125 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6126 Yao Qi <yao@codesourcery.com>
6127
6128 * Makefile.in (clean): Remove tic6x-*.c files.
6129 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6130 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6131 (tic6x-c64xp-linux.c): Likewise.
6132 * configure.srv: Add support for tic6x-*-uclinux.
6133 * linux-tic6x-low.c: New.
6134 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6135
6136 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6137 Yao Qi <yao@codesourcery.com>
6138
6139 * target.h (struct target_ops): Add read_loadmap.
6140 * linux-low.c (struct target_loadseg): New type.
6141 (struct target_loadmap): New type.
6142 (linux_read_loadmap): New function.
6143 (linux_target_ops): Add linux_read_loadmap.
6144 * server.c (handle_query): Support qXfer:fdpic:read packet.
6145 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6146 to NULL.
6147
6148 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6149
6150 * win32-low.c: Include <stdint.h>.
6151
6152 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6153
6154 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6155 to the inferior here.
6156 (i386_remove_aligned_watchpoint): Ditto.
6157 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6158 fit part of the watchpoint in the debug registers.
6159 (i386_update_inferior_debug_regs): New.
6160 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6161 registers, and only update the inferior on success.
6162 (i386_low_remove_watchpoint): Ditto.
6163
6164 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6165
6166 * linux-low.c (compare_ints, unique, list_threads, show_process,
6167 linux_core_of_thread): Delete.
6168 (linux_target_ops): Change linux_core_of_thread to
6169 linux_common_core_of_thread.
6170 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6171 * utils.c (malloc_failure): Change type of argument.
6172 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6173 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6174 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6175 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6176 (IPA_OBJS): Add common-utils-ipa.o.
6177 (ptid_h, linux_osdata_h): New macros.
6178 (server_h): Add common/common-utils.h, common/xml-utils.h,
6179 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6180 common/ptid.h.
6181 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6182 ptid.o, buffer.o): New rules.
6183 (linux-low.o): Add common/linux-osdata.h as a dependency.
6184 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6185 * configure.ac: Add AC_HEADER_DIRENT check.
6186 * config.in: Regenerate.
6187 * configure: Regenerate.
6188 * remote-utils.c (xml_escape_text): Delete.
6189 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6190 buffer_xml_printf): Move to common/buffer.c.
6191 * server.c (main): Remove call to initialize_inferiors.
6192 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6193 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6194 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6195 internal_error, gdb_assert, gdb_assert_fail): Delete.
6196 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6197 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6198 common/buffer.h.
6199 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6200 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6201 initialize_inferiors): Delete.
6202
6203 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6204
6205 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6206 symbol error.
6207
6208 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6209
6210 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6211 assertion.
6212 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6213
6214 2011-05-26 Yao Qi <yao@codesourcery.com>
6215
6216 * Makefile.in (thread-db.o): Track dependence to
6217 common/gdb_thread_db.h.
6218 * thread-db.c: include gdb_thread_db.h from right place.
6219
6220 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6221
6222 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6223 __FILE__ and __LINE__ to internal_error.
6224
6225 2011-05-13 Doug Evans <dje@google.com>
6226
6227 * thread-db.c (try_thread_db_load_from_sdir): New function.
6228 (try_thread_db_load_from_dir): New function.
6229 (thread_db_load_search): Handle $sdir, ignore $pdir.
6230 Remove trying of system directories if search of
6231 libthread-db-search-path fails, that is now done via $sdir.
6232
6233 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6234
6235 * server.c (handle_query): Add EnableDisableTracepoints to the list
6236 of supported features.
6237 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6238 tracepoints.
6239 (cmd_qtenable_disable): New.
6240 (cmd_qtstart): Install tracepoints even if disabled.
6241 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6242 receiving a QTEnable or QTDisable packet.
6243 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6244 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6245 tracepoints.
6246 (gdb_probe): Skip data collection if static tracepoint is disabled.
6247
6248 2011-05-10 Doug Evans <dje@google.com>
6249
6250 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6251
6252 2011-05-04 Doug Evans <dje@google.com>
6253
6254 * linux-low.c (linux_join): Skip process lookup.
6255 * spu-low.c (spu_join): Ditto.
6256 * server.c (join_inferiors_callback): Delete.
6257 (process_serial_event): For 'D' packet (detach) call join_inferior
6258 directly.
6259
6260 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6261
6262 * README: Don't mention xscale*-*-linux*.
6263 * configure.srv (xscale*-*-linux*): Don't handle target.
6264
6265 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6266
6267 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6268 casting pointers.
6269 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6270 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6271 (i386_emit_void_call_2): Likewise.
6272
6273 2011-04-26 Yao Qi <yao@codesourcery.com>
6274
6275 * linux-low.c: Move common macros to linux-ptrace.h.
6276 Include linux-ptrace.h.
6277 * Makefile.in (linux_ptrace_h): New.
6278 (linux-low.o): Depends on linux-ptrace.h.
6279
6280 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6281
6282 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6283 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6284 (remote_prepare): New function with most of the TCP code from ...
6285 (remote_open): ... here. Detect PORT here unconditionally. Move also
6286 setting transport_is_reliable.
6287 * server.c (run_once): New variable.
6288 (gdbserver_usage): Document it.
6289 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6290 the first run if RUN_ONCE.
6291 * server.h (run_once, remote_prepare): New declarations.
6292
6293 2011-04-19 Tom Tromey <tromey@redhat.com>
6294
6295 * win32-low.c (handle_load_dll): Remove duplicate "the".
6296
6297 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6298
6299 Remove support for old Cygwin 1.5 versions.
6300 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6301 function to avoid warning.
6302 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6303 warning.
6304
6305 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6306
6307 * gdbserver/server.h (Macro _): Define it if not available.
6308
6309 2011-03-14 Michael Snyder <msnyder@vmware.com>
6310
6311 * hostio.c (handle_close): Remove unnecessary null test.
6312
6313 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6314
6315 * Makefile.in (maintainer-clean realclean distclean): Remove
6316 "make ... subdir_do" command.
6317
6318 2011-03-10 Michael Snyder <msnyder@vmware.com>
6319
6320 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6321
6322 * server.c (handle_v_run): Free alloced buffer on early return.
6323
6324 2011-03-09 Yao Qi <yao@codesourcery.com>
6325
6326 Revert:
6327 2011-03-04 Yao Qi <yao@codesourcery.com>
6328
6329 * Makefile.in: Remove GNU make feature --directory.
6330
6331 2011-03-05 Yao Qi <yao@codesourcery.com>
6332
6333 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6334 (subdir_do): New make target. Copied from gdb/Makefile.
6335 (maintainer-clean, realclean, distclean, clean): Call corresponding
6336 make targets in common/Makefile.
6337
6338 2011-02-11 Yao Qi <yao@codesourcery.com>
6339
6340 * configure.ac: Call AC_PROG_RANLIB.
6341 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6342 * configure: Regenerate.
6343
6344 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6345
6346 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6347
6348 2011-03-06 Yao Qi <yao@codesourcery.com>
6349
6350 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6351
6352 2011-03-05 Yao Qi <yao@codesourcery.com>
6353
6354 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6355 (subdir_do): New make target. Copied from gdb/Makefile.
6356 (maintainer-clean, realclean, distclean, clean): Call corresponding
6357 make targets in common/Makefile.
6358
6359 2011-03-04 Yao Qi <yao@codesourcery.com>
6360
6361 * Makefile.in: Remove GNU make feature --directory.
6362
6363 2011-03-04 Michael Snyder <msnyder@vmware.com>
6364
6365 * server.c (queue_stop_reply): Call xmalloc not malloc.
6366
6367 2011-03-02 Michael Snyder <msnyder@vmware.com>
6368
6369 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6370
6371 2011-02-28 Michael Snyder <msnyder@vmware.com>
6372
6373 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6374 (cmd_qtframe): Ditto.
6375 (cmd_qtbuffer): Ditto.
6376 (cmd_bigqtbuffer): Ditto.
6377
6378 * utils.c (decimal2str): Initialize 'width' to nine, then
6379 don't mess with it.
6380
6381 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6382
6383 * hostio.c (require_data): Free *data, not data.
6384
6385 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6386
6387 * hostio.c (require_data): Use free, not xfree.
6388
6389 2011-02-27 Michael Snyder <msnyder@vmware.com>
6390
6391 * server.c (handle_query): Discard unused value.
6392
6393 * hostio.c (require_data): Free malloc memory before returning
6394 error.
6395
6396 2011-02-26 Michael Snyder <msnyder@vmware.com>
6397
6398 * linux-low.c (list_threads): Call closedir for dirent.
6399
6400 2011-02-27 Michael Snyder <msnyder@vmware.com>
6401
6402 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6403 a case statement falls through.
6404
6405 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6406
6407 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6408 in comparison.
6409
6410 2011-02-26 Michael Snyder <msnyder@vmware.com>
6411
6412 * utils.c (decimal2str): Eliminate dead code and dead param.
6413 (pulongest): Drop dead param from call to decimal2str.
6414 (plongest): Ditto.
6415
6416 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6417
6418 Revert the following patch (not approved yet):
6419 2011-02-21 Hui Zhu <teawater@gmail.com>
6420 * tracepoint.c (tp_printf): New function.
6421 (eval_agent_expr): Handle gdb_agent_op_printf.
6422
6423 2011-02-21 Hui Zhu <teawater@gmail.com>
6424
6425 * tracepoint.c (tp_printf): New function.
6426 (eval_agent_expr): Handle gdb_agent_op_printf.
6427
6428 2011-02-18 Tom Tromey <tromey@redhat.com>
6429
6430 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6431 (tracepoint.o): Likewise.
6432 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6433 (gdb_agent_op_names): Likewise.
6434
6435 2011-02-18 Tom Tromey <tromey@redhat.com>
6436
6437 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6438 gdb_agent_op_rot>: New constants.
6439 (gdb_agent_op_names): Add pick and roll.
6440 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6441 cases.
6442
6443 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6444
6445 * aclocal.m4: Regenerated with aclocal-1.11.1.
6446
6447 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6448
6449 * server.c (handle_qxfer_traceframe_info): New.
6450 (qxfer_packets): Register "traceframe-info".
6451 (handle_query): Report support for qXfer:traceframe-info:read+.
6452 * tracepoint.c (match_blocktype): New.
6453 (traceframe_find_block_type): Rename to ...
6454 (traceframe_walk_blocks): ... this. Add callback filter argument,
6455 and use it.
6456 (traceframe_find_block_type): New, reimplemented on top of
6457 traceframe_walk_blocks.
6458 (build_traceframe_info_xml): New.
6459 (traceframe_read_info): New.
6460 * server.h (traceframe_read_info): Declare.
6461
6462 2011-02-11 Yao Qi <yao@codesourcery.com>
6463
6464 * configure.ac: Call AC_PROG_RANLIB.
6465 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6466 * configure: Regenerate.
6467
6468 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6469
6470 * server.c (gdb_read_memory): Change return semantics to allow
6471 partial transfers.
6472 (handle_search_memory_1): Adjust.
6473 (process_serial_event) <'m' packet>: Handle partial transfers.
6474 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6475
6476 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6477
6478 * regcache.c (init_register_cache): Initialize
6479 regcache->register_status.
6480 (free_register_cache): Release regcache->register_status.
6481 (regcache_cpy): Copy register_status.
6482 (registers_to_string): Print 'x's for unavailable registers.
6483 (supply_register): Mark the register's status valid or
6484 unavailable, depending on whether a buffer was passed in or not.
6485 (supply_register_zeroed): New.
6486 (supply_regblock): Mark the registers' status valid or
6487 unavailable, depending on whether a buffer was passed in or not.
6488 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6489 (struct regcache): New `register_status' field.
6490 (supply_register_zeroed): Declare.
6491 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6492 supply_register_zeroed, rather than passing a NULL buffer to
6493 supply_register.
6494 * tracepoint.c (fetch_traceframe_registers): Update comment.
6495
6496 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6497
6498 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6499 buffer explicit.
6500
6501 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6502
6503 * server.h (decode_xfer_write): Change prototype.
6504 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6505 and don't extract the annex here.
6506 * server.c (decode_xfer_read): Remove `annex' parameter,
6507 and don't extract the annex here.
6508 (decode_xfer): New.
6509 (struct qxfer): New.
6510 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6511 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6512 (handle_qxfer_statictrace): New functions, abstracted out from
6513 handle_query, and made to use the struct qxfer interface.
6514 (handle_threads_qxfer_proper): Rename to ...
6515 (handle_qxfer_threads_proper): ... this.
6516 (handle_threads_qxfer): Rename to ...
6517 (handle_qxfer_threads): ... this. Adjust.
6518 (qxfer_packets): New array.
6519 (handle_qxfer): New function.
6520 (handle_query): Use handle_qxfer.
6521
6522 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6523
6524 * gdbreplay.c: Shorten lines of >= 80 columns.
6525 * linux-low.c: Ditto.
6526 * linux-ppc-low.c: Ditto.
6527 * linux-s390-low.c: Ditto.
6528 * linux-sparc-low.c: Ditto.
6529 * linux-x86-low.c: Ditto.
6530 * linux-xtensa-low.c: Ditto.
6531 * mem-break.c: Ditto.
6532 * nto-low.c: Ditto.
6533 * regcache.h: Ditto.
6534 * remote-utils.c: Ditto.
6535 * server.c: Ditto.
6536 * server.h: Ditto.
6537 * thread-db.c: Ditto.
6538 * tracepoint.c: Ditto.
6539 * utils.c: Ditto.
6540 * win32-low.h: Ditto.
6541
6542 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6543
6544 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6545 update.
6546
6547 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6548
6549 * server.c (gdbserver_version): Update copyright year in version
6550 output.
6551 * gdbreplay.c (gdbreplay_version): Ditto.
6552
6553 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6554
6555 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6556 * linux-bfin-low.c: New file.
6557 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6558 PT_DATA_ADDR for BFIN targets.
6559 * Makefile.in (SFILES): Add linux-bfin-low.c.
6560 (clean): Remove reg-bfin.c.
6561 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6562 * README: Mention supported Blackfin targets.
6563
6564 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6565
6566 * .gitignore: New file.
6567
6568 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6569
6570 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6571
6572 2010-10-22 Jie Zhang <jie@codesourcery.com>
6573
6574 * Makefile.in: Add FLAGS_TO_PASS variable.
6575 (install): Remove dependency of install-only and recursively
6576 invoke make for install-only.
6577
6578 2010-10-04 Doug Evans <dje@google.com>
6579
6580 * Makefile.in (uninstall): Use $(DESTDIR).
6581
6582 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6583
6584 PR gdb/11842
6585
6586 * linux-x86-low.c (compat_siginfo_from_siginfo)
6587 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6588 si_code is < 0. Check for si_code == SI_TIMER before checking for
6589 si_code < 0.
6590
6591 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6592
6593 * lynx-i386-low.c: New file.
6594 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6595
6596 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6597
6598 * lynx-low.c (ptrace_request_to_str): Remove handling for
6599 request values that have been removed in LynxOS 5.x.
6600
6601 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6602
6603 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6604 <ptrace.h>
6605
6606 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6607
6608 * configure.ac: Add --enable-inprocess-agent option.
6609 * configure: Rebuilt.
6610
6611 2010-09-06 Yao Qi <yao@codesourcery.com>
6612
6613 * linux-low.c (linux_kill): Remove unused variable.
6614 (linux_stabilize_threads): Likewise.
6615 * server.c (start_inferior): Likewise.
6616 (queue_stop_reply_callback): Likewise.
6617 * tracepoint.c (do_action_at_tracepoint): Likewise.
6618
6619 2010-09-06 Yao Qi <yao@codesourcery.com>
6620
6621 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6622 on return.
6623
6624 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6625
6626 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6627
6628 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6629
6630 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6631 "$(IPA_DEPFILES)".
6632
6633 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6634
6635 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6636 gdbserver/lynx-ppc-low.c: New files.
6637 * Makefile.in (lynx_low_h): New variable.
6638 (lynx-low.o, lynx-ppc-low.o): New rules.
6639 * configure.ac: On LynxOS, link with -lnetinet.
6640 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6641 * configure: regenerate.
6642
6643 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6644
6645 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6646 * configure.ac: Add check for vasprintf and vsnprintf.
6647 * configure, config.in: Regenerate.
6648 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6649
6650 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6651
6652 * gdbreplay.c: Move include of alloca.h up, next to include of
6653 malloc.h.
6654 * server.h: Add include of malloc.h.
6655 * mem-break.c: Remove include of malloc.h.
6656 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6657
6658 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6659
6660 * Makefile.in (memmem.o): Build with -Wno-error.
6661
6662 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6663
6664 * utils.c (xsnprintf): Make non-static.
6665 * server.h: Add xsnprintf declaration.
6666 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6667 replace calls to snprintf by calls to xsnprintf throughout.
6668
6669 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6670
6671 * configure.ac: Add configure check for alloca.
6672 * configure, config.in: Regenerate.
6673 * server.h: Include alloca.h if it exists.
6674 * gdbreplay.c: Include alloca.h if it exists.
6675
6676 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6677
6678 * linux-low.c (__SIGRTMIN): Define if not already defined.
6679 (linux_create_inferior): Check for __ANDROID__ rather than
6680 __SIGRTMIN.
6681 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6682 are already deferred.
6683 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6684 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6685 stopped and already has a pending signal to report.
6686 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6687 a pending signal to report or is moving out of a jump pad.
6688 (linux_init_signals): Check for __ANDROID__ rather than
6689 __SIGRTMIN.
6690
6691 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6692
6693 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6694 debug_threads check. Avoid a linear search when not doing debug
6695 output.
6696
6697 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6698
6699 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6700 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6701 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6702 (process_event): Change local fd's type to gdb_fildes_t.
6703 (create_file_handler): Adjust prototype.
6704 (delete_file_handler): Adjust prototype.
6705 (handle_file_event): Adjust prototype. Use pfildes.
6706 (create_file_event): Adjsut prototype.
6707 * remote-utils.c (remote_desc, listen_desc): Change type to
6708 gdb_fildes_t.
6709 * server.h: New gdb_fildes_t typedef.
6710 [USE_WIN32API]: Include winsock2.h.
6711 (delete_file_handler, add_file_handler): Adjust prototypes.
6712 (pfildes): Declare.
6713 * utils.c (pfildes): New.
6714
6715 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6716
6717 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6718 * configure: Regenerate.
6719
6720 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6721
6722 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6723 (linux_done_accessing_memory): ... this.
6724 (linux_target_ops): Adjust.
6725 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6726 * nto-low.c (nto_target_ops): Adjust comment.
6727 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6728 * spu-low.c (spu_target_ops): Adjust comment.
6729 * target.h (target_ops): Rename unprepare_to_access_memory field
6730 to done_accessing_memory.
6731 (unprepare_to_access_memory): Rename to ...
6732 (done_accessing_memory): ... this.
6733
6734 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6735
6736 * linux-low.c (linux_prepare_to_access_memory): New.
6737 (linux_unprepare_to_access_memory): New.
6738 (linux_target_ops): Install them.
6739 * server.c (read_memory): Rename to ...
6740 (gdb_read_memory): ... this. Use
6741 prepare_to_access_memory/prepare_to_access_memory.
6742 (write_memory): Rename to ...
6743 (gdb_write_memory): ... this. Use
6744 prepare_to_access_memory/prepare_to_access_memory.
6745 (handle_search_memory_1): Adjust.
6746 (process_serial_event): Adjust.
6747 * target.h (struct target_ops): New fields
6748 prepare_to_access_memory and unprepare_to_access_memory.
6749 (prepare_to_access_memory, unprepare_to_access_memory): New.
6750 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6751 prepare_to_access_memory/prepare_to_access_memory.
6752 * nto-low.c (nto_target_ops): Adjust.
6753 * spu-low.c (spu_target_ops): Adjust.
6754 * win32-low.c (win32_target_ops): Adjust.
6755
6756 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6757
6758 * Makefile.in (WARN_CFLAGS): Get it from configure.
6759 (WERROR_CFLAGS): New.
6760 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6761 * configure.ac: Introduce --enable-werror, which adds -Werror to
6762 the compiler command line. Enabled by default. Disable with
6763 --disable-werror. Add -Wdeclaration-after-statement
6764 Wpointer-arith and -Wformat-nonliteral to warning flags.
6765 * configure: Regenerate.
6766
6767 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6768
6769 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6770
6771 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6772
6773 * gdbreplay.c (remote_error): New.
6774 (gdbchar): New.
6775 (expect): Use gdbchar. Check for error reading from GDB.
6776 Clarify sync error output.
6777 (play): Check for errors writing to GDB.
6778 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6779 * remote-utils.c (getpkt): Check for errors writing to the remote
6780 descriptor.
6781
6782 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6783
6784 * linux-low.c (linux_wait_1): Move non-debugging code out of
6785 `debug_threads' control.
6786
6787 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6788
6789 * linux-low.c (linux_wait_1): Don't set last_status here.
6790 * server.c (push_event, queue_stop_reply_callback): Assert we're
6791 not pushing a TARGET_WAITKIND_IGNORE event.
6792 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6793 (myresume, handle_target_event): Set the thread's last_resume_kind
6794 and last_status from the target returned status.
6795
6796 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6797
6798 PR threads/10729
6799
6800 * linux-x86-low.c (update_debug_registers_callback): New.
6801 (i386_dr_low_set_addr): Use it.
6802 (i386_dr_low_get_addr): New.
6803 (i386_dr_low_set_control): Use update_debug_registers_callback.
6804 (i386_dr_low_get_control): New.
6805 (i386_dr_low_get_status): Adjust.
6806 * linux-low.c (linux_stop_lwp): New.
6807 * linux-low.h (linux_stop_lwp): Declare.
6808
6809 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6810 argument instead of a i386_debug_reg_state.
6811 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6812 a i386_debug_reg_state.
6813 (i386_insert_aligned_watchpoint): Adjust.
6814 (i386_remove_aligned_watchpoint): Adjust.
6815 (i386_low_stopped_data_address): Read the debug registers from the
6816 inferior instead of from the mirrors.
6817 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6818 (i386_dr_low_get_addr): Declare.
6819 (i386_dr_low_get_control): Declare.
6820 (i386_dr_low_get_status): Change prototype.
6821
6822 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6823 (i386_dr_low_get_addr): New.
6824 (i386_dr_low_get_control): New.
6825 (i386_dr_low_get_status): Adjust prototype. Return
6826 dr_status_mirror.
6827 (i386_initial_stuff): Clear dr_status_mirror and
6828 dr_control_mirror.
6829 (i386_get_thread_context): Adjust.
6830 (i386_set_thread_context): Adjust.
6831 (i386_thread_added): Adjust.
6832
6833 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6834
6835 * linux-low.h (linux_thread_area): Delete declaration.
6836
6837 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6838
6839 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6840 after its termination.
6841
6842 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6843
6844 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6845 (gdb_wants_all_stopped): Delete.
6846 (linux_wait_1): Don't call them.
6847 * server.c (handle_v_cont): Tag all threads as want-stopped.
6848 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6849 stopped as "client-wants-stopped".
6850
6851 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6852
6853 * Makefile.in (signals_h): New.
6854 (server_h): Depend on it.
6855 (server.o): Don't depend on $(signals_def).
6856 (signals.o): Depend on $(signals_def).
6857
6858 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6859
6860 * Makefile.in (signals_def): New.
6861 (server_h): Append include/gdb/signals.h and signals_def.
6862 (server.o): Append signals_def.
6863
6864 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6865
6866 * server.c (handle_target_event): Use target_signal_to_host for
6867 resume_info.sig initialization.
6868 * target.h (struct thread_resume) <sig>: New comment.
6869
6870 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6871
6872 * server.c (handle_query): strcpy() the returned string from paddress()
6873 instead of sprintf().
6874 * utils.c (paddress): Return phex_nz().
6875
6876 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6877
6878 * server.c (handle_v_cont): Call mourn_inferior if process
6879 just exited.
6880 (myresume): Likewise.
6881
6882 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6883
6884 Static tracepoints, and integration with UST.
6885
6886 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6887 * mem-break.c (uninsert_all_breakpoints)
6888 (reinsert_all_breakpoints): New.
6889 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6890 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6891 (gdb_agent_ust_loaded, helper_thread_id)
6892 (gdb_agent_helper_thread_id): New macros.
6893 (struct ipa_sym_addresses): Add addr_ust_loaded,
6894 addr_helper_thread_id, addr_cmd_buf.
6895 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6896 (in_process_agent_loaded_ust): New.
6897 (write_e_ust_not_loaded): New.
6898 (maybe_write_ipa_ust_not_loaded): New.
6899 (struct collect_static_trace_data_action): New.
6900 (enum tracepoint_type) <static_tracepoint>: New.
6901 (struct tracepoint) <handle>: Mention static tracepoints.
6902 (struct static_tracepoint_ctx): New.
6903 (CMD_BUF_SIZE): New.
6904 (add_tracepoint_action): Handle static tracepoint actions.
6905 (unprobe_marker_at): New.
6906 (clear_installed_tracepoints): Handle static tracepoints.
6907 (cmd_qtdp): Handle static tracepoints.
6908 (probe_marker_at): New.
6909 (cmd_qtstart): Handle static tracepoints.
6910 (response_tracepoint): Handle static tracepoints.
6911 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6912 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6913 (get_context_regcache): Handle static tracepoints.
6914 (do_action_at_tracepoint): Handle static tracepoint actions.
6915 (traceframe_find_block_type): Handle static trace data blocks.
6916 (traceframe_read_sdata): New.
6917 (download_tracepoints): Download static tracepoint actions.
6918 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6919 (GDB_PROBE_NAME): New.
6920 (ust_ops): New.
6921 (GET_UST_SYM): New.
6922 (USTF): New.
6923 (dlsym_ust): New.
6924 (ust_marker_to_static_tracepoint): New.
6925 (gdb_probe): New.
6926 (collect_ust_data_at_tracepoint): New.
6927 (gdb_ust_probe): New.
6928 (UNIX_PATH_MAX, SOCK_DIR): New.
6929 (gdb_ust_connect_sync_socket): New.
6930 (resume_thread, stop_thread): New.
6931 (run_inferior_command): New.
6932 (init_named_socket): New.
6933 (gdb_ust_socket_init): New.
6934 (cstr_to_hexstr): New.
6935 (next_st): New.
6936 (first_marker, next_marker): New.
6937 (response_ust_marker): New.
6938 (cmd_qtfstm, cmd_qtsstm): New.
6939 (unprobe_marker_at, probe_marker_at): New.
6940 (cmd_qtstmat, gdb_ust_thread): New.
6941 (gdb_ust_init): New.
6942 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6943 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6944 (ST_REGENTRY): New.
6945 (x86_64_st_collect_regmap): New.
6946 (X86_64_NUM_ST_COLLECT_GREGS): New.
6947 (AMD64_RIP_REGNUM): New.
6948 (supply_static_tracepoint_registers): New.
6949 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6950 (ST_REGENTRY): New.
6951 (i386_st_collect_regmap): New.
6952 (i386_NUM_ST_COLLECT_GREGS): New.
6953 (supply_static_tracepoint_registers): New.
6954 * server.c (handle_query): Handle qXfer:statictrace:read.
6955 <qSupported>: Report support for StaticTracepoints, and
6956 qXfer:statictrace:read features.
6957 * server.h (traceframe_read_sdata)
6958 (supply_static_tracepoint_registers): Declare.
6959 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6960 (unpack_varlen_hex): Include in IPA build.
6961 * Makefile.in (ustlibs, ustinc): New.
6962 (IPA_OBJS): Add remote-utils-ipa.o.
6963 ($(IPA_LIB)): Link -ldl and -lpthread.
6964 (UST_CFLAGS): New.
6965 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6966 * config.in, configure: Regenerate.
6967
6968 2010-06-20 Ian Lance Taylor <iant@google.com>
6969 Pedro Alves <pedro@codesourcery.com>
6970
6971 * linux-x86-low.c (always_true): Delete.
6972 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6973 trying to fool the compiler with always_true.
6974
6975 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6976
6977 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6978 conditions in gdbserver.
6979
6980 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6981
6982 * spu-low.c (spu_read_memory): Wrap around local store limit.
6983 (spu_write_memory): Likewise.
6984
6985 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6986
6987 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6988 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6989 LONGEST uses.
6990 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6991 uses.
6992 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6993 uses with LONGEST uses.
6994
6995 2010-06-14 Stan Shebs <stan@codesourcery.com>
6996 Pedro Alves <pedro@codesourcery.com>
6997
6998 Bytecode compiler.
6999
7000 * linux-x86-low.c: Include limits.h.
7001 (add_insns): New.
7002 (always_true): New.
7003 (EMIT_ASM): New.
7004 (EMIT_ASM32): New.
7005 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7006 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7007 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7008 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7009 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7010 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7011 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7012 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7013 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7014 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7015 (amd64_emit_void_call_2): New.
7016 (amd64_emit_ops): New.
7017 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7018 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7019 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7020 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7021 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7022 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7023 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7024 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7025 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7026 (i386_emit_stack_adjust, i386_emit_int_call_1)
7027 (i386_emit_void_call_2): New.
7028 (i386_emit_ops): New.
7029 (x86_emit_ops): New.
7030 (the_low_target): Install x86_emit_ops.
7031 * server.h (struct emit_ops): New.
7032 (get_raw_reg_func_addr): Declare.
7033 (current_insn_ptr, emit_error): Declare.
7034 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7035 (set_trace_state_variable_value): New defines.
7036 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7037 addr_get_trace_state_variable_value and
7038 addr_set_trace_state_variable_value.
7039 (symbol_list): New fields for get_raw_reg,
7040 get_trace_state_variable_value and set_trace_state_variable_value.
7041 (condfn): New typedef.
7042 (struct tracepoint): New field `compiled_cond'.
7043 (do_action_at_tracepoint): Clear compiled_cond.
7044 (get_trace_state_variable_value, set_trace_state_variable_value):
7045 Export in the IPA.
7046 (condition_true_at_tracepoint): If there's a compiled condition,
7047 run that.
7048 (current_insn_ptr, emit_error): New globals.
7049 (struct bytecode_address): New.
7050 (get_raw_reg_func_addr): New.
7051 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7052 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7053 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7054 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7055 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7056 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7057 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7058 (compile_tracepoint_condition, compile_bytecodes): New.
7059 * target.h (emit_ops): Forward declare.
7060 (struct target_ops): New field emit_ops.
7061 (target_emit_ops): New.
7062 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7063 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7064 * linux-low.c (linux_emit_ops): New.
7065 (linux_target_ops): Install it.
7066 * linux-low.h (struct linux_target_ops): New field emit_ops.
7067
7068 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7069
7070 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7071 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7072
7073 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7074 Stan Shebs <stan@codesourcery.com>
7075
7076 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7077 (all): Depend on $(extra_libraries).
7078 (install-only): Install the IPA.
7079 (IPA_OBJS, IPA_LIB): New.
7080 (clean): Remove the IPA lib.
7081 (IPAGENT_CFLAGS): New.
7082 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7083 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7084 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7085 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7086 * configure.ac: Check for atomic builtins support in the compiler.
7087 (IPA_DEPFILES, extra_libraries): Define.
7088 * configure.srv (ipa_obj): Add description.
7089 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7090 (i[34567]86-*-linux*): Set ipa_obj.
7091 (x86_64-*-linux*): Set ipa_obj.
7092 * linux-low.c (stabilizing_threads): New.
7093 (supports_fast_tracepoints): New.
7094 (linux_detach): Stabilize threads before detaching.
7095 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7096 the lwp is either not stabilizing, or is moving out of a jump pad.
7097 (linux_fast_tracepoint_collecting): New.
7098 (maybe_move_out_of_jump_pad): New.
7099 (enqueue_one_deferred_signal): New.
7100 (dequeue_one_deferred_signal): New.
7101 (linux_wait_for_event_1): If moving out of a jump pad, defer
7102 pending signals to later.
7103 (linux_stabilize_threads): New.
7104 (linux_wait_1): Check if threads need moving out of jump pads, and
7105 do it if so.
7106 (stuck_in_jump_pad_callback): New.
7107 (move_out_of_jump_pad_callback): New.
7108 (lwp_running): New.
7109 (linux_resume_one_lwp): Handle moving out of jump pads.
7110 (linux_set_resume_request): Dequeue deferred signals.
7111 (need_step_over_p): Also step over fast tracepoint jumps.
7112 (start_step_over): Also uninsert fast tracepoint jumps.
7113 (finish_step_over): Also reinsert fast tracepoint jumps.
7114 (linux_install_fast_tracepoint_jump): New.
7115 (linux_target_ops): Install linux_stabilize_threads and
7116 linux_install_fast_tracepoint_jump_pad.
7117 * linux-low.h (linux_target_ops) <get_thread_area,
7118 install_fast_tracepoint_jump_pad>: New fields.
7119 (struct lwp_info) <collecting_fast_tracepoint,
7120 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7121 (linux_get_thread_area): Declare.
7122 * linux-x86-low.c (jump_insn): New.
7123 (x86_get_thread_area): New.
7124 (append_insns): New.
7125 (push_opcode): New.
7126 (amd64_install_fast_tracepoint_jump_pad): New.
7127 (i386_install_fast_tracepoint_jump_pad): New.
7128 (x86_install_fast_tracepoint_jump_pad): New.
7129 (the_low_target): Install x86_get_thread_area and
7130 x86_install_fast_tracepoint_jump_pad.
7131 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7132 (struct fast_tracepoint_jump): New.
7133 (fast_tracepoint_jump_insn): New.
7134 (fast_tracepoint_jump_shadow): New.
7135 (find_fast_tracepoint_jump_at): New.
7136 (fast_tracepoint_jump_here): New.
7137 (delete_fast_tracepoint_jump): New.
7138 (set_fast_tracepoint_jump): New.
7139 (uninsert_fast_tracepoint_jumps_at): New.
7140 (reinsert_fast_tracepoint_jumps_at): New.
7141 (set_breakpoint_at): Use write_inferior_memory.
7142 (uninsert_raw_breakpoint): Use write_inferior_memory.
7143 (check_mem_read): Mask out fast tracepoint jumps.
7144 (check_mem_write): Mask out fast tracepoint jumps.
7145 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7146 (set_fast_tracepoint_jump): Declare.
7147 (delete_fast_tracepoint_jump)
7148 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7149 (reinsert_fast_tracepoint_jumps_at): Declare.
7150 * regcache.c: Don't compile many functions when building the
7151 in-process agent library.
7152 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7153 the register buffer in the heap.
7154 (free_register_cache): If the register buffer isn't owned by the
7155 regcache, don't free it.
7156 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7157 pre-existing register caches.
7158 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7159 type.
7160 (convert_ascii_to_int): : Constify `from' parameter type.
7161 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7162 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7163 the needed buffer in-place.
7164 (relocate_instruction): New.
7165 * server.c (handle_query) <qSymbols>: If the target supports
7166 tracepoints, give it a chance of looking up symbols. Report
7167 support for fast tracepoints.
7168 (handle_status): Stabilize threads.
7169 (process_serial_event): Adjust.
7170 * server.h (struct fast_tracepoint_jump): Forward declare.
7171 (struct process_info) <fast_tracepoint_jumps>: New field.
7172 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7173 (decode_X_packet, decode_M_packet): Adjust.
7174 (relocate_instruction): Declare.
7175 (in_process_agent_loaded): Declare.
7176 (tracepoint_look_up_symbols): Declare.
7177 (struct fast_tpoint_collect_status): Declare.
7178 (fast_tracepoint_collecting): Declare.
7179 (force_unlock_trace_buffer): Declare.
7180 (handle_tracepoint_bkpts): Declare.
7181 (initialize_low_tracepoint)
7182 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7183 * target.h (struct target_ops) <stabilize_threads,
7184 install_fast_tracepoint_jump_pad>: New fields.
7185 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7186 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7187 [HAVE_STDINT_H]: Include stdint.h.
7188 (trace_debug_1): Rename to ...
7189 (trace_vdebug): ... this.
7190 (trace_debug): Rename to ...
7191 (trace_debug_1): ... this. Add `level' parameter.
7192 (trace_debug): New.
7193 (ATTR_USED, ATTR_NOINLINE): New.
7194 (IP_AGENT_EXPORT): New.
7195 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7196 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7197 (about_to_request_buffer_space, trace_buffer_is_full)
7198 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7199 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7200 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7201 (traceframe_write_count, traceframes_created)
7202 (trace_state_variables)
7203 New renaming defines.
7204 (struct ipa_sym_addresses): New.
7205 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7206 (symbol_list): New.
7207 (ipa_sym_addrs): New.
7208 (all_tracepoint_symbols_looked_up): New.
7209 (in_process_agent_loaded): New.
7210 (write_e_ipa_not_loaded): New.
7211 (maybe_write_ipa_not_loaded): New.
7212 (tracepoint_look_up_symbols): New.
7213 (debug_threads) [IN_PROCESS_AGENT]: New.
7214 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7215 (UNKNOWN_SIDE_EFFECTS): New.
7216 (stop_tracing): New.
7217 (flush_trace_buffer): New.
7218 (stop_tracing_bkpt): New.
7219 (flush_trace_buffer_bkpt): New.
7220 (read_inferior_integer): New.
7221 (read_inferior_uinteger): New.
7222 (read_inferior_data_pointer): New.
7223 (write_inferior_data_pointer): New.
7224 (write_inferior_integer): New.
7225 (write_inferior_uinteger): New.
7226 (struct collect_static_trace_data_action): Delete.
7227 (enum tracepoint_type): New.
7228 (struct tracepoint) <type>: New field `type'.
7229 <actions_str, step_actions, step_actions_str>: Only include in
7230 GDBserver.
7231 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7232 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7233 (tracepoints): Use IP_AGENT_EXPORT.
7234 (last_tracepoint): Don't include in the IPA.
7235 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7236 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7237 (alloced_trace_state_variables): New.
7238 (trace_state_variables): Use IP_AGENT_EXPORT.
7239 (traceframe_t): Delete unused variable.
7240 (circular_trace_buffer): Don't include in the IPA.
7241 (trace_buffer_start): Delete.
7242 (struct trace_buffer_control): New.
7243 (trace_buffer_free): Delete.
7244 (struct ipa_trace_buffer_control): New.
7245 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7246 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7247 New.
7248 (trace_buffer_ctrl): New.
7249 (TRACE_BUFFER_CTRL_CURR): New.
7250 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7251 Reimplement as macros.
7252 (trace_buffer_wrap): Delete.
7253 (traceframe_write_count, traceframe_read_count)
7254 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7255 (struct tracepoint_hit_ctx) <type>: New field.
7256 (struct fast_tracepoint_ctx): New.
7257 (memory_barrier): New.
7258 (cmpxchg): New.
7259 (record_tracepoint_error): Update atomically in the IPA.
7260 (clear_inferior_trace_buffer): New.
7261 (about_to_request_buffer_space): New.
7262 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7263 updating the same buffer.
7264 (add_tracepoint): Default the tracepoint's type to trap
7265 tracepoint, and orig_size to -1.
7266 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7267 internal variables.
7268 (create_trace_state_variable): New parameter `gdb'. Handle it.
7269 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7270 (cmd_qtdp): Handle fast tracepoints.
7271 (cmd_qtdv): Adjust.
7272 (max_jump_pad_size): New.
7273 (gdb_jump_pad_head): New.
7274 (get_jump_space_head): New.
7275 (claim_jump_space): New.
7276 (sort_tracepoints): New.
7277 (MAX_JUMP_SIZE): New.
7278 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7279 IPA.
7280 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7281 support. Upload fast traceframes, and delete internal IPA
7282 breakpoints.
7283 (stop_tracing_handler): New.
7284 (flush_trace_buffer_handler): New.
7285 (cmd_qtstop): Upload fast tracepoints.
7286 (response_tracepoint): Handle fast tracepoints.
7287 (tracepoint_finished_step): Upload fast traceframes. Set the
7288 tracepoint hit context's tracepoint type.
7289 (handle_tracepoint_bkpts): New.
7290 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7291 type. Add comment about fast tracepoints.
7292 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7293 non-existing action_str field.
7294 (get_context_regcache): Handle fast tracepoints.
7295 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7296 to the regcache.
7297 (fast_tracepoint_from_jump_pad_address): New.
7298 (fast_tracepoint_from_ipa_tpoint_address): New.
7299 (collecting_t): New.
7300 (force_unlock_trace_buffer): New.
7301 (fast_tracepoint_collecting): New.
7302 (collecting): New.
7303 (gdb_collect): New.
7304 (write_inferior_data_ptr): New.
7305 (target_tp_heap): New.
7306 (target_malloc): New.
7307 (download_agent_expr): New.
7308 (UALIGN): New.
7309 (download_tracepoints): New.
7310 (download_trace_state_variables): New.
7311 (upload_fast_traceframes): New.
7312 (IPA_FIRST_TRACEFRAME): New.
7313 (IPA_NEXT_TRACEFRAME_1): New.
7314 (IPA_NEXT_TRACEFRAME): New.
7315 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7316 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7317 (gdb_jump_pad_buffer_end): New.
7318 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7319 (initialize_tracepoint): Adjust.
7320 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7321 buffer. Initialize the low module.
7322 * utils.c (PREFIX, TOOLNAME): New.
7323 (malloc_failure): Use PREFIX.
7324 (error): In the IPA, an error causes an exit.
7325 (fatal, warning): Use PREFIX.
7326 (internal_error): Use TOOLNAME.
7327 (NUMCELLS): Increase to 10.
7328 * configure, config.in: Regenerate.
7329
7330 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7331
7332 * server.c (handle_query) <qSupported>: Do two passes over the
7333 qSupported string to avoid nesting strtok.
7334
7335 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7336
7337 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7338 (CDEPS): New.
7339 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7340 -Wl,--dynamic-list.
7341 * configure: Regenerate.
7342 * proc-service.list: New.
7343
7344 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7345
7346 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7347 New comment.
7348
7349 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7350
7351 * gdbreplay.c (remote_open): Check error return from socket() call by
7352 its equality to -1 not by it being negative.
7353 * remote-utils.c (remote_open): Likewise.
7354
7355 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7356
7357 * config.h: Regenerate.
7358
7359 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7360
7361 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7362 doesn't provide PTRACE_GET_THREAD_AREA.
7363
7364 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7365
7366 * linux-m68k-low.c: Include <asm/ptrace.h>
7367 (ps_get_thread_area): Implement.
7368
7369 2010-05-03 Doug Evans <dje@google.com>
7370
7371 * event-loop.c (struct callback_event): New struct.
7372 (callback_list): New global.
7373 (append_callback_event, delete_callback_event): New functions.
7374 (process_callback): New function.
7375 (start_event_loop): Call it.
7376 * remote-utils.c (NOT_SCHEDULED): Define.
7377 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7378 moved out of readchar.
7379 (readchar): Rewrite. Call reschedule before returning.
7380 (reset_readchar): New function.
7381 (remote_close): Call it.
7382 (process_remaining, reschedule): New functions.
7383 * server.h (callback_handler_func): New typedef.
7384 (append_callback_event, delete_callback_event): Declare.
7385
7386 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7387
7388 * proc-service.c (ps_pglobal_lookup): Use
7389 thread_db_look_up_one_symbol.
7390 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7391 parameter. Use it instead of all_symbols_looked_up.
7392 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7393 field.
7394 (all_symbols_looked_up): Don't declare.
7395 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7396 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7397 field.
7398 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7399 Set all_symbols_looked_up here.
7400 (thread_db_look_up_one_symbol): New.
7401 (thread_db_get_tls_address): Adjust.
7402 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7403 thread_db object on the heap, and tentatively set it in the
7404 process structure.
7405 (thread_db_init): Don't set all_symbols_looked_up here.
7406 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7407
7408 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7409
7410 * linux-low.c (linux_kill, linux_detach): Adjust.
7411 (status_pending_p_callback): Remove redundant statement. Check
7412 for !TARGET_WAITIKIND_IGNORE, instead of
7413 TARGET_WAITKIND_STOPPED.
7414 (handle_tracepoints): Make sure LWP is locked. Adjust.
7415 (linux_wait_for_event_1): Adjust.
7416 (linux_cancel_breakpoints): New.
7417 (unsuspend_one_lwp): New.
7418 (unsuspend_all_lwps): New.
7419 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7420 (send_sigstop_callback): Change return type to int, add new
7421 `except' parameter and handle it.
7422 (suspend_and_send_sigstop_callback): New.
7423 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7424 pass them down. If SUSPEND, also increment the lwp's suspend
7425 count.
7426 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7427 (need_step_over_p): Don't consider suspended LWPs.
7428 (start_step_over): Adjust.
7429 (proceed_one_lwp): Change return type to int, add new `except'
7430 parameter and handle it.
7431 (unsuspend_and_proceed_one_lwp): New.
7432 (proceed_all_lwps): Use find_inferior instead of
7433 for_each_inferior.
7434 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7435 also decrement the suspend count of LWPs. Pass `except' down,
7436 instead of hacking its suspend count.
7437 (linux_pause_all): Add `freeze' parameter. Adjust.
7438 (linux_unpause_all): New.
7439 (linux_target_ops): Install linux_unpause_all.
7440 * server.c (handle_status): Adjust.
7441 * target.h (struct target_ops): New fields `unpause_all' and
7442 `cancel_breakpoints'. Add new parameter to `pause_all'.
7443 (pause_all): Add new `freeze' parameter.
7444 (unpause_all): New.
7445 (cancel_breakpoints): New.
7446 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7447 cancel breakpoints.
7448 (cmd_qtstart): Pause threads.
7449 (stop_tracing): Pause threads, and cancel breakpoints.
7450 * win32-low.c (win32_target_ops): Adjust.
7451
7452 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7453
7454 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7455 the inferior right away from here...
7456 (linux_wait_1): ... to here, and adjust to check the thread's
7457 last_resume_kind instead of the lwp's step or stop_expected flags.
7458
7459 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7460
7461 * README: Use consistent `GDB' and `GDBserver' spellings.
7462
7463 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7464
7465 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7466 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7467 (linux_detach_one_lwp): Assume the lwp is stopped.
7468 (any_thread_of): Delete.
7469 (linux_detach): Stop all lwps here. Don't blindly delete all
7470 breakpoints.
7471 (delete_lwp_callback): New.
7472 (linux_mourn): Delete all lwps of the process that is gone.
7473 (linux_wait_1): Don't delete the last lwp of the process here.
7474 * mem-break.h (mark_breakpoints_out): Declare.
7475 * mem-break.c (mark_breakpoints_out): New.
7476 (free_all_breakpoints): Use it.
7477 * server.c (handle_target_event): If the process is gone, mark
7478 breakpoints out.
7479 * thread-db.c (struct thread_db) <create_bp>: New field.
7480 (thread_db_enable_reporting): Fix prototype. Store a thread event
7481 breakpoint reference in the thread_db struct.
7482 (thread_db_load_search): Clear the thread_db object.
7483 (try_thread_db_load_1): Ditto.
7484 (switch_to_process): New.
7485 (disable_thread_event_reporting): Use it.
7486 (remove_thread_event_breakpoints): New.
7487 (thread_db_detach, thread_db_mourn): Use it.
7488
7489 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7490
7491 * linux-low.c (linux_enable_event_reporting): New.
7492 (linux_wait_for_event_1, handle_extended_wait): Use it.
7493
7494 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7495
7496 * linux-low.c (linux_kill_one_lwp, linux_kill)
7497 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7498 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7499 SIGSTOP even if the LWP is stopped.
7500 (send_sigstop_callback): New.
7501 (stop_all_lwps): Use send_sigstop_callback instead.
7502 (linux_resume_one_thread): Adjust.
7503 (proceed_one_lwp): Still proceed an LWP that the client has
7504 requested to stop, if we haven't reported it as stopped yet. Make
7505 sure that LWPs the client want stopped, have a pending SIGSTOP.
7506
7507 2010-04-26 Doug Evans <dje@google.com>
7508
7509 * server.c (handle_general_set): Make static.
7510
7511 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7512 Print received char after testing for error/eof instead of before.
7513 (input_interrupt): Tweak comment.
7514
7515 2010-04-23 Doug Evans <dje@google.com>
7516
7517 * server.c (start_inferior): Print inferior argv if --debug.
7518
7519 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7520
7521 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7522 * nto-x86-low.c: Include server.h
7523
7524 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7525
7526 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7527 be consistent with other sources of this directory.
7528 (init_registers_amd64): Correct name of source file of this function
7529 in the comment.
7530
7531 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7532
7533 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7534 64-bit executables.
7535
7536 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7537
7538 * win32-i386-low.c: Add 64-bit support.
7539 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7540 (init_registers_amd64): Declare.
7541 (mappings): Add 64-bit version of array.
7542 (init_windows_x86): New function.
7543 (the_low_target): Change init_arch field to init_windows_x86.
7544
7545 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7546
7547 * win32-low.c: Adapt to support also 64-bit architecture.
7548 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7549 (get_image_name): Use SIZE_T type for local variable `done'.
7550 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7551 (toolhelp_get_dll_name): Idem.
7552 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7553 Use uintptr_t typecast to avoid warning.
7554 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7555 (handle_exception): Use phex_nz to avoid warning.
7556 (win32_wait): Remove unused local variable `process'.
7557
7558 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7559
7560 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7561 `amd64-avx.o'.
7562
7563 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7564
7565 * configure.ac: Use `ws2_32' library for srv_mingw.
7566 * configure: Regenerate.
7567 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7568 * remote-utils.c: Likewise.
7569
7570 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7571
7572 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7573 if __x86_64__ is defined.
7574
7575 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7576
7577 * configure: Regenerate.
7578
7579 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7580
7581 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7582 * target.h (target_ops): New get_tib_address field.
7583 * win32-low.h (win32_thread_info): Add thread_local_base field.
7584 * win32-low.c (child_add_thread): Add tlb argument.
7585 Set thread_local_base field to TLB.
7586 (get_child_debug_event): Adapt to child_add_thread change.
7587 (win32_get_tib_address): New function.
7588 (win32_target_ops): Set get_tib_address field to
7589 win32_get_tib_address.
7590 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7591
7592 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7593
7594 * linux-low.c (linux_mourn): Also remove the process.
7595 * server.c (handle_target_event): Don't remove the process here.
7596 * nto-low.c (nto_mourn): New.
7597 (nto_target_ops): Install it.
7598 * spu-low.c (spu_mourn): New.
7599 (spu_target_ops): Install it.
7600 * win32-low.c (win32_mourn): New.
7601 (win32_target_ops): Install it.
7602
7603 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7604
7605 * server.h (buffer_xml_printf): Remove redundant `;'.
7606
7607 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7608
7609 * regcache.c (set_register_cache): Invalidate regcaches before
7610 changing the register cache layout.
7611 (regcache_invalidate_one): Allow a NULL regcache.
7612 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7613 regcaches before changing the register cache layout or the target
7614 regsets.
7615
7616 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7617
7618 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7619 variable warning on Linux/x86-64.
7620
7621 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7622
7623 GDBserver disconnected tracing support.
7624
7625 * linux-low.c (linux_remove_process): Delete.
7626 (add_lwp): Don't set last_resume_kind here.
7627 (linux_kill): Use `mourn'.
7628 (linux_detach): Use `thread_db_detach', and `mourn'.
7629 (linux_mourn): New.
7630 (linux_attach_lwp_1): Adjust comment.
7631 (linux_attach): last_resume_kind moved the thread_info; adjust.
7632 (status_pending_p_callback): Adjust.
7633 (linux_wait_for_event_1): Adjust.
7634 (count_events_callback, select_singlestep_lwp_callback)
7635 (select_event_lwp_callback, cancel_breakpoints_callback)
7636 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7637 (proceed_one_lwp): Adjust.
7638 (linux_async): Add debug output.
7639 (linux_thread_stopped): New.
7640 (linux_pause_all): New.
7641 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7642 linux_pause_all.
7643 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7644 (thread_db_free): Delete declaration.
7645 (thread_db_detach, thread_db_mourn): Declare.
7646 * thread-db.c (thread_db_init): Use thread_db_mourn.
7647 (thread_db_free): Delete, split in two.
7648 (disable_thread_event_reporting): New.
7649 (thread_db_detach): New.
7650 (thread_db_mourn): New.
7651
7652 * server.h (struct thread_info) <last_resume_kind>: New field.
7653 <attached>: Add comment.
7654 <gdb_detached>: New field.
7655 (handler_func): Change return type to int.
7656 (handle_serial_event, handle_target_event): Ditto.
7657 (gdb_connected): Declare.
7658 (tracing): Delete.
7659 (disconnected_tracing): Declare.
7660 (stop_tracing): Declare.
7661
7662 * server.c (handle_query) <qSupported>: Report support for
7663 disconnected tracing.
7664 (queue_stop_reply_callback): Account for running threads.
7665 (gdb_wants_thread_stopped): New.
7666 (gdb_wants_all_threads_stopped): New.
7667 (gdb_reattached_process): New.
7668 (handle_status): Clear the `gdb_detached' flag of all processes.
7669 In all-stop, stop all threads.
7670 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7671 (process_serial_event): If the remote connection breaks, or if an
7672 exit was forced with "monitor exit", force an event loop exit.
7673 Handle disconnected tracing on detach.
7674 (handle_serial_event): Adjust.
7675 (handle_target_event): If GDB isn't connected, forward events back
7676 to the inferior, unless the last process exited, in which case,
7677 exit gdbserver. Adjust interface.
7678
7679 * remote-utils.c (remote_open): Don't block in accept. Instead
7680 register an event loop source on the listen socket file
7681 descriptor. Refactor bits into ...
7682 (listen_desc): ... this new global.
7683 (gdb_connected): ... this new function.
7684 (enable_async_notification): ... this new function.
7685 (handle_accept_event): ... this new function.
7686 (remote_close): Clear remote_desc.
7687
7688 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7689
7690 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7691 New fields.
7692 (mourn_inferior): Define.
7693 (target_process_qsupported): Avoid the dangling else problem.
7694 (thread_stopped): Define.
7695 (pause_all): Define.
7696 (target_waitstatus_to_string): Declare.
7697 * target.c (target_waitstatus_to_string): New.
7698
7699 * tracepoint.c (tracing): Make extern.
7700 (disconnected_tracing): New.
7701 (stop_tracing): Make extern. Handle tracing stops due to GDB
7702 disconnecting.
7703 (cmd_qtdisconnected): New.
7704 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7705 (handle_tracepoint_general_set): Handle QTDisconnected.
7706
7707 * event-loop.c (event_handler_func): Change return type to int.
7708 (process_event): Bail out if the event handler wants the event
7709 loop to stop.
7710 (handle_file_event): Ditto.
7711 (start_event_loop): Bail out if the event handler wants the event
7712 loop to stop.
7713
7714 * nto-low.c (nto_target_ops): Adjust.
7715 * spu-low.c (spu_wait): Don't remove the process here.
7716 (spu_target_ops): Adjust.
7717 * win32-low.c (win32_wait): Don't remove the process here.
7718 (win32_target_ops): Adjust.
7719
7720 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7721
7722 * regcache.c (realloc_register_cache): Invalidate inferior's
7723 regcache before recreating it.
7724
7725 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7726
7727 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7728
7729 2010-04-09 Stan Shebs <stan@codesourcery.com>
7730 Pedro Alves <pedro@codesourcery.com>
7731
7732 * server.h (LONGEST): New.
7733 (struct thread_info) <while_stepping>: New field.
7734 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7735 Declare.
7736 (initialize_tracepoint, handle_tracepoint_general_set)
7737 (handle_tracepoint_query, tracepoint_finished_step)
7738 (tracepoint_was_hit, release_while_stepping_state_list):
7739 (current_traceframe): Declare.
7740 * server.c (handle_general_set): Handle tracepoint packets.
7741 (read_memory): New.
7742 (write_memory): New.
7743 (handle_search_memory_1): Use read_memory.
7744 (handle_query): Report support for conditional tracepoints, trace
7745 state variables, and tracepoint sources. Handle tracepoint
7746 queries.
7747 (main): Initialize the tracepoints module.
7748 (process_serial_event): Handle traceframe reads/writes.
7749
7750 * linux-low.c (handle_tracepoints): New.
7751 (linux_wait_1): Call it.
7752 (linux_resume_one_lwp): Handle while-stepping.
7753 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7754 (linux_target_ops): Install them.
7755 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7756 New field.
7757 * linux-x86-low.c (x86_supports_tracepoints): New.
7758 (the_low_target). Install it.
7759
7760 * mem-break.h (delete_breakpoint): Declare.
7761 * mem-break.c (delete_breakpoint): Make external.
7762
7763 * target.h (struct target_ops): Add `supports_tracepoints',
7764 `read_pc', and `write_pc' fields.
7765 (target_supports_tracepoints): Define.
7766 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7767 (phex_nz): New.
7768
7769 * regcache.h (struct regcache) <registers_owned>: New field.
7770 (init_register_cache, regcache_cpy): Declare.
7771 (regcache_read_pc, regcache_write_pc): Declare.
7772 (register_cache_size): Declare.
7773 (supply_regblock): Declare.
7774 * regcache.c (init_register_cache): New.
7775 (new_register_cache): Use it.
7776 (regcache_cpy): New.
7777 (register_cache_size): New.
7778 (supply_regblock): New.
7779 (regcache_read_pc, regcache_write_pc): New.
7780
7781 * tracepoint.c: New.
7782
7783 * Makefile.in (OBS): Add tracepoint.o.
7784 (tracepoint.o): New rule.
7785
7786 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7787
7788 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7789 (i386-mmx.o): New.
7790 (i386-mmx.c): Likewise.
7791 (i386-mmx-linux.o): Likewise.
7792 (i386-mmx-linux.c): Likewise.
7793
7794 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7795 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7796 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7797 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7798
7799 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7800 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7801 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7802
7803 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7804
7805 * Makefile.in (clean): Updated.
7806 (i386-avx.o): New.
7807 (i386-avx.c): Likewise.
7808 (i386-avx-linux.o): Likewise.
7809 (i386-avx-linux.c): Likewise.
7810 (amd64-avx.o): Likewise.
7811 (amd64-avx.c): Likewise.
7812 (amd64-avx-linux.o): Likewise.
7813 (amd64-avx-linux.c): Likewise.
7814
7815 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7816 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7817 (srv_amd64_regobj): Add amd64-avx.o.
7818 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7819 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7820 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7821 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7822 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7823 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7824 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7825
7826 * i387-fp.c: Include "i386-xstate.h".
7827 (i387_xsave): New.
7828 (i387_cache_to_xsave): Likewise.
7829 (i387_xsave_to_cache): Likewise.
7830 (x86_xcr0): Likewise.
7831
7832 * i387-fp.h (i387_cache_to_xsave): Likewise.
7833 (i387_xsave_to_cache): Likewise.
7834 (x86_xcr0): Likewise.
7835
7836 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7837 * linux-crisv32-low.c (target_regsets): Likewise.
7838 * linux-m68k-low.c (target_regsets): Likewise.
7839 * linux-mips-low.c (target_regsets): Likewise.
7840 * linux-ppc-low.c (target_regsets): Likewise.
7841 * linux-s390-low.c (target_regsets): Likewise.
7842 * linux-sh-low.c (target_regsets): Likewise.
7843 * linux-sparc-low.c (target_regsets): Likewise.
7844 * linux-xtensa-low.c (target_regsets): Likewise.
7845
7846 * linux-low.c: Include <sys/uio.h>.
7847 (regsets_fetch_inferior_registers): Support nt_type.
7848 (regsets_store_inferior_registers): Likewise.
7849 (linux_process_qsupported): New.
7850 (linux_target_ops): Add linux_process_qsupported.
7851
7852 * linux-low.h (regset_info): Add nt_type.
7853 (linux_target_ops): Add process_qsupported.
7854
7855 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7856 and <sys/uio.h>.
7857 (init_registers_i386_avx_linux): New.
7858 (init_registers_amd64_avx_linux): Likewise.
7859 (xmltarget_i386_linux_no_xml): Likewise.
7860 (xmltarget_amd64_linux_no_xml): Likewise.
7861 (PTRACE_GETREGSET): Likewise.
7862 (PTRACE_SETREGSET): Likewise.
7863 (x86_fill_xstateregset): Likewise.
7864 (x86_store_xstateregset): Likewise.
7865 (use_xml): Likewise.
7866 (x86_linux_update_xmltarget): Likewise.
7867 (x86_linux_process_qsupported): Likewise.
7868 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7869 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7870 init_registers_i386_linux here. Call
7871 x86_linux_update_xmltarget.
7872 (the_low_target): Add x86_linux_process_qsupported.
7873
7874 * server.c (handle_query): Call target_process_qsupported.
7875
7876 * target.h (target_ops): Add process_qsupported.
7877 (target_process_qsupported): New.
7878
7879 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7880
7881 * inferiors.c (add_thread): Set last_status kind to
7882 TARGET_WAITKIND_IGNORE.
7883 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7884 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7885 (linux_wait_1): Move `thread' local definition to block that uses
7886 it. Don't NULL initialize `event_child'.
7887 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7888 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7889 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7890
7891 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7892
7893 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7894 an extended waitstatus, or by a watchpoint.
7895 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7896 thread was stepping or has been stopped by a watchpoint.
7897
7898 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7899
7900 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7901 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7902 of another, then delete the previous, and validate all
7903 breakpoints.
7904 (validate_inserted_breakpoint): New.
7905 (delete_disabled_breakpoints): New.
7906 (validate_breakpoints): New.
7907 (check_mem_read): Validate breakpoints before trusting their
7908 shadow. Delete disabled breakpoints.
7909 (check_mem_write): Validate breakpoints before trusting they
7910 should be inserted. Delete disabled breakpoints.
7911 * mem-break.h (validate_breakpoints):
7912 * server.c (handle_query): Validate breakpoints when we see a
7913 qSymbol query.
7914
7915 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7916
7917 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7918 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7919 if we could tell there's a GDB breakpoint at stop_pc.
7920 (need_step_over_p): Don't do a step over if we find a GDB
7921 breakpoint at the resume PC.
7922
7923 * mem-break.c (struct raw_breakpoint): New.
7924 (enum bkpt_type): New type `gdb_breakpoint'.
7925 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7926 fields. New field `raw'.
7927 (find_raw_breakpoint_at): New.
7928 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7929 breakpoint instead.
7930 (set_breakpoint_at): Adjust.
7931 (delete_raw_breakpoint): New.
7932 (release_breakpoint): New.
7933 (delete_breakpoint): Rename to...
7934 (delete_breakpoint_1): ... this. Add proc parameter. Use
7935 release_breakpoint. Return ENOENT.
7936 (delete_breakpoint): Reimplement.
7937 (find_breakpoint_at): Delete.
7938 (find_gdb_breakpoint_at): New.
7939 (delete_breakpoint_at): Delete.
7940 (set_gdb_breakpoint_at): New.
7941 (delete_gdb_breakpoint_at): New.
7942 (gdb_breakpoint_here): New.
7943 (set_reinsert_breakpoint): Use release_breakpoint.
7944 (uninsert_breakpoint): Rename to ...
7945 (uninsert_raw_breakpoint): ... this.
7946 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7947 (reinsert_raw_breakpoint): Change parameter type to
7948 raw_breakpoint.
7949 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7950 instead.
7951 (check_breakpoints): Adjust. Use release_breakpoint.
7952 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7953 (breakpoint_inserted_here): Ditto.
7954 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7955 Don't trust the breakpoint's shadow if it is not inserted.
7956 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7957 (delete_all_breakpoints): Adjust.
7958 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7959 use delete_breakpoint_1.
7960
7961 * mem-break.h (breakpoints_supported): Delete declaration.
7962 (set_gdb_breakpoint_at): Declare.
7963 (gdb_breakpoint_here): Declare.
7964 (delete_breakpoint_at): Delete.
7965 (delete_gdb_breakpoint_at): Declare.
7966
7967 * server.h (struct raw_breakpoint): Forward declare.
7968 (struct process_info): New field `raw_breakpoints'.
7969
7970 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7971 breakpoints.
7972
7973 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7974
7975 * linux-low.c (status_pending_p_callback): Fix comment.
7976 (linux_wait_for_event_1): Move most of the internal breakpoint
7977 handling from here...
7978 (linux_wait_1): ... to here.
7979 (count_events_callback): New.
7980 (select_singlestep_lwp_callback): New.
7981 (select_event_lwp_callback): New.
7982 (cancel_breakpoints_callback): New.
7983 (select_event_lwp): New.
7984 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7985 priority to all LWPs that have had events that should be reported
7986 to the client. Cancel breakpoints when about to reporting the
7987 event to the client, not while stopping lwps. No longer cancel
7988 finished single-steps here.
7989 (cancel_finished_single_step): Delete.
7990 (cancel_finished_single_steps): Delete.
7991
7992 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7993
7994 * mem-break.c (enum bkpt_type): New.
7995 (struct breakpoint): New field `type'.
7996 (set_breakpoint_at): Change return type to struct breakpoint
7997 pointer. Set type to `other_breakpoint' by default.
7998 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7999 in the breakpoint list.
8000 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8001 (reinsert_breakpoint): Rename to ...
8002 (reinsert_raw_breakpoint): ... this.
8003 (reinsert_breakpoints_at): Adjust.
8004 * mem-break.h (struct breakpoint): Declare.
8005 (set_breakpoint_at): Change return type to struct breakpoint
8006 pointer.
8007
8008 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8009
8010 * server.c (handle_query): Assign, not compare.
8011
8012 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8013
8014 Teach linux gdbserver to step-over-breakpoints.
8015
8016 * linux-low.c (can_hardware_single_step): New.
8017 (supports_breakpoints): New.
8018 (handle_extended_wait): If stopping threads, read the stop pc of
8019 the new cloned LWP.
8020 (get_pc): New.
8021 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8022 low target doesn't support retrieving the PC.
8023 (add_lwp): Set last_resume_kind to resume_continue.
8024 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8025 (linux_attach): Don't clear stop_expected. Set the lwp's
8026 last_resume_kind to resume_stop.
8027 (linux_detach_one_lwp): Don't check for removed breakpoints.
8028 (check_removed_breakpoint): Delete.
8029 (status_pending_p): Rename to ...
8030 (status_pending_p_callback): ... this. Don't check for removed
8031 breakpoints. Don't consider threads that are stopped from GDB's
8032 perspective.
8033 (linux_wait_for_lwp): Always read the stop_pc here.
8034 (cancel_breakpoint): New.
8035 (step_over_bkpt): New global.
8036 (linux_wait_for_event_1): Implement stepping over breakpoints.
8037 (gdb_wants_lwp_stopped): New.
8038 (gdb_wants_all_stopped): New.
8039 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8040 single-step traps here. Store the thread's last reported target
8041 wait status.
8042 (send_sigstop): Don't clear stop_expected. Always set it,
8043 instead.
8044 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8045 (cancel_finished_single_step): New.
8046 (cancel_finished_single_steps): New.
8047 (wait_for_sigstop): Don't cancel finished single-step traps here.
8048 (linux_resume_one_lwp): Don't check for removed breakpoints.
8049 Don't set `step' on non-hardware step archs.
8050 (linux_set_resume_request): Ignore resume_stop requests if already
8051 stopping or stopped. Set the lwp's last_resume_kind.
8052 (resume_status_pending_p): Don't check for removed breakpoints.
8053 (need_step_over_p): New.
8054 (start_step_over): New.
8055 (finish_step_over): New.
8056 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8057 requests. Clear the thread's last reported target waitstatus.
8058 Don't use the `suspended' flag. Don't consider pending breakpoints.
8059 (linux_resume): Start a step-over if necessary.
8060 (proceed_one_lwp): New.
8061 (proceed_all_lwps): New.
8062 (unstop_all_lwps): New.
8063 * linux-low.h (struct lwp_info): Rewrite comment for the
8064 `suspended' flag. Add the `stop_pc' field. Delete the
8065 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8066 Add `'last_resume_kind' and `need_step_over' fields.
8067 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8068 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8069 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8070 (set_raw_breakpoint_at): New.
8071 (set_breakpoint_at): Rewrite to use it.
8072 (reinsert_breakpoint_handler): Delete.
8073 (set_reinsert_breakpoint): New.
8074 (reinsert_breakpoint_by_bp): Delete.
8075 (delete_reinsert_breakpoints): New.
8076 (uninsert_breakpoint): Rewrite.
8077 (uninsert_breakpoints_at): New.
8078 (reinsert_breakpoint): Rewrite.
8079 (reinsert_breakpoints_at): New.
8080 (check_breakpoints): Rewrite.
8081 (breakpoint_here): New.
8082 (breakpoint_inserted_here): New.
8083 (check_mem_read): Adjust.
8084 * mem-break.h (breakpoints_supported, breakpoint_here)
8085 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8086 (reinsert_breakpoint_by_bp): Delete declaration.
8087 (delete_reinsert_breakpoints): Declare.
8088 (reinsert_breakpoint): Delete declaration.
8089 (reinsert_breakpoints_at): Declare.
8090 (uninsert_breakpoint): Delete declaration.
8091 (uninsert_breakpoints_at): Declare.
8092 (check_breakpoints): Adjust prototype.
8093 * server.h: Adjust include order.
8094 (struct thread_info): Declare here. Add a `last_status' field.
8095
8096 2010-03-23 Michael Snyder <msnyder@vmware.com>
8097
8098 * server.c (crc32): New function.
8099 (handle_query): Add handling for 'qCRC:' request.
8100
8101 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8102
8103 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8104 lwp had been stopped by a watchpoint.
8105
8106 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8107
8108 * server.h (internal_error): Declare.
8109 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8110 * utils.c (internal_error): New function.
8111
8112 2010-03-15 Andreas Schwab <schwab@redhat.com>
8113
8114 * configure.srv: Fix typo setting srv_regobj.
8115
8116 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8117
8118 * linux-low.c (fetch_register): Avoid passing a non string literal
8119 format to `error'.
8120 (usr_store_inferior_registers): Ditto.
8121
8122 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8123
8124 * linux-low.c (linux_write_memory): Bail out early if peeking
8125 memory failed.
8126
8127 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8128
8129 * linux-low.h (struct lwp_info): New fields
8130 `stopped_by_watchpoint' and `stopped_data_address'.
8131 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8132 here, and cache them in the lwp object.
8133 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8134 directly.
8135 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8136 field.
8137 (linux_stopped_by_watchpoint): Rewrite.
8138 (linux_stopped_data_address): Rewrite.
8139
8140 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8141
8142 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8143 switching the current inferior, not before.
8144
8145 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8146
8147 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8148 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8149 i386-linux.c and amd64-linux.c.
8150 (reg-i386.o): Removed.
8151 (reg-i386.c): Likewise.
8152 (reg-i386-linux.o): Likewise.
8153 (reg-i386-linux.c): Likewise.
8154 (reg-x86-64.o): Likewise.
8155 (reg-x86-64.c): Likewise.
8156 (reg-x86-64-linux.o): Likewise.
8157 (reg-x86-64-linux.c): Likewise.
8158 (i386.o): New.
8159 (i386.c): Likewise.
8160 (i386-linux.o): Likewise.
8161 (i386-linux.c): Likewise.
8162 (amd64.o): Likewise.
8163 (amd64.c): Likewise.
8164 (amd64-linux.o): Likewise.
8165 (amd64-linux.c): Likewise.
8166
8167 * configure.srv (srv_i386_regobj): New.
8168 (srv_i386_linux_regobj): Likewise.
8169 (srv_amd64_regobj): Likewise.
8170 (srv_amd64_linux_regobj): Likewise.
8171 (srv_i386_32bit_xmlfiles): Likewise.
8172 (srv_i386_64bit_xmlfiles): Likewise.
8173 (srv_i386_xmlfiles): Likewise.
8174 (srv_amd64_xmlfiles): Likewise.
8175 (srv_i386_linux_xmlfiles): Likewise.
8176 (srv_amd64_linux_xmlfiles): Likewise.
8177 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8178 srv_xmlfiles to $srv_i386_xmlfiles.
8179 (i[34567]86-*-mingw32ce*): Likewise.
8180 (i[34567]86-*-mingw*): Likewise.
8181 (i[34567]86-*-nto*): Likewise.
8182 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8183 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8184 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8185 (x86_64-*-linux*): Likewise.
8186
8187 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8188 (init_registers_amd64_linux): New.
8189 (x86_arch_setup): Replace init_registers_x86_64_linux with
8190 init_registers_amd64_linux.
8191
8192 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8193
8194 * configure.ac: Check for libdl. If it is not available link against
8195 static libthread_db.
8196 * configure: Regenerate.
8197
8198 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8199
8200 PR9605
8201
8202 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8203 handing a read watchpoint.
8204 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8205
8206 2010-02-12 Doug Evans <dje@google.com>
8207
8208 * linux-low.c (linux_supports_tracefork_flag): Document.
8209 (linux_look_up_symbols): Add comment.
8210
8211 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8212
8213 * regcache.c (supply_register): Clear regcache if buf is NULL.
8214
8215 2010-02-02 Nicolas Roche <roche@sourceware.org>
8216 Joel Brobecker <brobecker@adacore.com>
8217
8218 * inferiors.c (find_inferior): Add function documentation.
8219 (unloaded_dll): Handle the case where the unloaded dll has not
8220 been previously registered in the dll list.
8221
8222 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8223
8224 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8225 (thumb2_breakpoint): New.
8226 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8227
8228 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8229
8230 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8231 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8232 breakpoints.
8233
8234 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8235
8236 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8237
8238 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8239
8240 * linux-s390-low.c (s390_collect_ptrace_register)
8241 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8242
8243 2010-01-21 Doug Evans <dje@google.com>
8244
8245 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8246 (PTRACE_ARG4_TYPE): New macro.
8247 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8248 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8249 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8250 (usr_store_inferior_registers): Ditto.
8251 (linux_read_memory, linux_write_memory): Ditto.
8252 (linux_test_for_tracefork): Ditto.
8253
8254 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8255 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8256
8257 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8258
8259 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8260 target.
8261
8262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8263
8264 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8265 prototype to take a regcache. Adjust.
8266
8267 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8268
8269 * regcache.h (struct thread_info): Forward declare.
8270 (struct regcache): New.
8271 (new_register_cache): Adjust prototype.
8272 (get_thread_regcache): Declare.
8273 (free_register_cache): Adjust prototype.
8274 (registers_to_string, registers_from_string): Ditto.
8275 (supply_register, supply_register_by_name, collect_register)
8276 (collect_register_as_string, collect_register_by_name): Ditto.
8277 * regcache.c (struct inferior_regcache_data): Delete.
8278 (get_regcache): Rename to ...
8279 (get_thread_regcache): ... this. Adjust. Switch inferior before
8280 fetching registers.
8281 (regcache_invalidate_one): Adjust.
8282 (regcache_invalidate): Fix prototype.
8283 (new_register_cache): Return the new register cache.
8284 (free_register_cache): Change prototype.
8285 (realloc_register_cache): Adjust.
8286 (registers_to_string): Change prototype to take a regcache. Adjust.
8287 (registers_from_string): Ditto.
8288 (register_data): Ditto.
8289 (supply_register): Ditto.
8290 (supply_register_by_name): Ditto.
8291 (collect_register): Ditto.
8292 (collect_register_as_string): Ditto.
8293 (collect_register_by_name): Ditto.
8294 * server.c (process_serial_event): Adjust.
8295 * linux-low.h (regset_fill_func, regset_store_func): Change
8296 prototype.
8297 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8298 Change prototype.
8299 * linux-low.c (get_stop_pc): Adjust.
8300 (check_removed_breakpoint): Adjust.
8301 (linux_wait_for_event): Adjust.
8302 (linux_resume_one_lwp): Adjust.
8303 (fetch_register): Add regcache parameter. Adjust.
8304 (usr_store_inferior_registers): Ditto.
8305 (regsets_fetch_inferior_registers): Ditto.
8306 (regsets_store_inferior_registers): Ditto.
8307 (linux_fetch_registers, linux_store_registers): Ditto.
8308 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8309 regcache. Adjust.
8310 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8311 Ditto.
8312 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8313 prototype to take a regcache.
8314 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8315 * remote-utils.c (convert_ascii_to_int, outreg)
8316 (prepare_resume_reply): Change prototype to take a regcache.
8317 Adjust.
8318 * target.h (struct target_ops) <fetch_registers, store_registers>:
8319 Change prototype to take a regcache.
8320 (fetch_inferior_registers, store_inferior_registers): Change
8321 prototype to take a regcache. Adjust.
8322 * proc-service.c (ps_lgetregs): Adjust.
8323 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8324 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8325 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8326 take a regcache. Adjust.
8327 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8328 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8329 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8330 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8331 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8332 (cris_cannot_fetch_register):
8333 (cris_breakpoint_at): Change prototype to take a regcache.
8334 Adjust.
8335 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8336 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8337 to take a regcache. Adjust.
8338 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8339 Adjust.
8340 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8341 take a regcache. Adjust.
8342 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8343 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8344 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8345 * linux-mips-low.c (mips_get_pc):
8346 (mips_set_pc): Change prototype to take a regcache. Adjust.
8347 (mips_reinsert_addr): Adjust.
8348 (mips_collect_register): Change prototype to take a regcache.
8349 Adjust.
8350 (mips_supply_register):
8351 (mips_collect_register_32bit, mips_supply_register_32bit)
8352 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8353 (mips_store_fpregset): Ditto.
8354 * linux-ppc-low.c (ppc_supply_ptrace_register)
8355 (ppc_supply_ptrace_register): Ditto.
8356 (parse_spufs_run): Adjust.
8357 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8358 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8359 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8360 take a regcache. Adjust.
8361 * linux-s390-low.c (s390_collect_ptrace_register)
8362 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8363 (s390_set_pc): Change prototype to take a regcache. Adjust.
8364 (s390_arch_setup): Adjust.
8365 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8366 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8367 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8368 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8369 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8370 regcache. Adjust.
8371 (sparc_breakpoint_at): Adjust.
8372 * linux-xtensa-low.c (xtensa_fill_gregset):
8373 (xtensa_store_gregset):
8374 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8375 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8376 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8377 prototype to take a regcache. Adjust.
8378 * win32-arm-low.c (arm_fetch_inferior_register)
8379 (arm_store_inferior_register): Change prototype to take a
8380 regcache. Adjust.
8381 * win32-i386-low.c (i386_fetch_inferior_register)
8382 (i386_store_inferior_register): Change prototype to take a
8383 regcache. Adjust.
8384 * win32-low.c (child_fetch_inferior_registers)
8385 (child_store_inferior_registers): Change prototype to take a
8386 regcache. Adjust.
8387 (win32_wait): Adjust.
8388 (win32_fetch_inferior_registers): Change prototype to take a
8389 regcache. Adjust.
8390 (win32_store_inferior_registers): Adjust.
8391 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8392 store_inferior_register>: Change prototype to take a regcache.
8393
8394 2010-01-20 Doug Evans <dje@google.com>
8395
8396 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8397 #ifdef.
8398 (linux_wait_for_event1, linux_init_signals): Ditto.
8399 (W_STOPCODE): Provide definition if missing.
8400
8401 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8402
8403 * linux-low.c (linux_core_of_thread): New.
8404 (compare_ints, show_process, list_threads): New.
8405 (linux_qxfer_osdata): Report threads and cores.
8406 (linux_target_op): Register linux_core_of_thread.
8407 * remote-utils.c (prepare_resume_reply): Report the core.
8408 (buffer_xml_printf): Support %d specifier.
8409 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8410 New.
8411 (handle_query): Handle qXfer:threads. Announce availability
8412 thereof.
8413 * target.h (struct target_ops): New field core_of_thread.
8414
8415 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8416
8417 * Makefile.in (clean): Remove new generated files.
8418 (reg-s390.o, reg-s390.c): Remove rules.
8419 (reg-s390x.o, reg-s390x.c): Likewise.
8420 (s390-linux32.o, s390-linux32.c): Add rules.
8421 (s390-linux64.o, s390-linux64.c): Likewise.
8422 (s390x-linux64.o, s390x-linux64.c): Likewise.
8423 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8424 * linux-s390-low.c: Include <elf.h>.
8425 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8426 (init_registers_s390): Remove prototype.
8427 (init_registers_s390x): Likewise.
8428 (init_registers_s390_linux32): Add prototype.
8429 (init_registers_s390_linux64): Likewise.
8430 (init_registers_s390x_linux64): Likewise.
8431 (s390_num_regs_3264): New define.
8432 (s390_regmap_3264): New global variable.
8433 (s390_cannot_fetch_register): Remove obsolete check.
8434 (s390_cannot_store_register): Likewise.
8435 (s390_collect_ptrace_register): Handle upper/lower register halves.
8436 (s390_supply_ptrace_register): Likewise.
8437 (s390_fill_gregset): Update to register number changes.
8438 (s390_get_hwcap): New routine.
8439 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8440 Install appropriate regmap and register set.
8441
8442 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8443
8444 * server.c (gdbserver_version): Update copyright year to 2010.
8445 * gdbreplay.c (gdbreplay_version): Likewise.
8446
8447 2009-12-28 Doug Evans <dje@google.com>
8448
8449 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8450 elf/external.h. Include <elf.h> instead but only if necessary.
8451
8452 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8453
8454 * linux-low.c (linux_remove_process): Remove `detaching'
8455 parameter. Don't release/detach from thread_db here.
8456 (linux_kill): Release/detach from thread_db here, ...
8457 (linux_detach): ... and here, before actually detaching.
8458 (linux_wait_1): ... and here, when a process exits.
8459 * thread-db.c (any_thread_of): New.
8460 (thread_db_free): Switch the current inferior to a thread of the
8461 passed in process.
8462
8463 2009-12-21 Doug Evans <dje@google.com>
8464
8465 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8466
8467 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8468 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8469 warning ifndef __NR_tkill. Move setting of errno there too.
8470 Delete unnecessary resetting of errno after syscall.
8471 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8472
8473 * configure.ac: Check for dladdr.
8474 * config.in: Regenerate.
8475 * configure: Regenerate.
8476 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8477 (try_thread_db_load): Update.
8478
8479 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8480
8481 2009-12-18 Doug Evans <dje@google.com>
8482
8483 * event-loop.c: Include unistd.h if it exists.
8484
8485 * linux-low.c (my_waitpid): Move definition away from being in
8486 between linux_tracefork_child/linux_test_for_tracefork.
8487
8488 * gdb_proc_service.h (psaddr_t): Fix type.
8489 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8490 signature to match glibc.
8491
8492 2009-12-16 Doug Evans <dje@google.com>
8493
8494 * linux-low.c (linux_read_memory): Fix argument to read.
8495
8496 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8497
8498 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8499 events, don't leave current_inferior pointing at null.
8500
8501 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8502
8503 * win32-low.c (LOG): Delete.
8504 (OUTMSG): Output to stderr.
8505 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8506 on compile time LOG macro.
8507 (win32_wait): Fix debug output.
8508
8509 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8510
8511 * win32-low.c (win32_add_one_solib): If the dll name is
8512 "ntdll.dll", prepend the system directory to the dll path.
8513
8514 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8515
8516 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8517
8518 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8519 Vladimir Prus <vladimir@codesourcery.com>
8520
8521 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8522 * configure.ac: Check for __mcoldfire__ and set
8523 gdb_cv_m68k_is_coldfire.
8524 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8525 reg-cf.o and reg-m68k.o.
8526 * configure: Regenerated.
8527
8528 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8529
8530 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8531 Pass it to thread_db_free.
8532 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8533 proper `detaching' argument to linux_remove_process.
8534 * linux-low.h (thread_db_free): Add `detaching' parameter.
8535 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8536 to thread_db_free.
8537 (thread_db_free): Add `detaching' parameter. Only
8538 call td_ta_clear_event if detaching from process.
8539
8540 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8541
8542 * thread-db.c (thread_db_free): Fix typo.
8543
8544 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8545
8546 PR gdb/10838
8547 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8548
8549 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8550
8551 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8552 with an i686 compiler.
8553 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8554 needed.
8555 * configure: Rebuilt.
8556
8557 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8558
8559 PR gdb/10783
8560
8561 * server.c (handle_search_memory_1): Correct read_addr initialization
8562 in loop for searching subsequent chunks.
8563
8564 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8565
8566 * configure.ac: New --with-libthread-db option.
8567 * thread-db.c: Allow direct dependence on libthread_db.
8568 (thread_db_free): Adjust.
8569 * config.in: Regenerate.
8570 * configure: Likewise.
8571
8572 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8573
8574 PR gdb/10757
8575 * thread-db.c (attach_thread): New function.
8576 (maybe_attach_thread): Return success/failure.
8577 (find_new_threads_callback): Adjust.
8578 (thread_db_find_new_threads): Loop until no new threads.
8579
8580 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8581
8582 * proc-service.c (ps_lgetregs): Formatting.
8583
8584 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8585
8586 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8587 * configure.ac: Adjust.
8588 * linux-low.h (struct process_info_private): Move members to struct
8589 thread_db.
8590 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8591 * linux-low.c (linux_remove_process): Adjust.
8592 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8593 * server.c (handle_query): Move code ...
8594 (handle_monitor_command): ... here. New function.
8595 * target.h (struct target_ops): New member.
8596 * thread-db.c (struct thread_db): New.
8597 (libthread_db_search_path): New variable.
8598 (thread_db_create_event, thread_db_enable_reporting)
8599 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8600 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8601 (try_thread_db_load_1, dladdr_to_soname): New functions.
8602 (try_thread_db_load, thread_db_load_search): New functions.
8603 (thread_db_init): Search for libthread_db.
8604 (thread_db_free): New function.
8605 (thread_db_handle_monitor_command): Likewise.
8606 * config.in: Regenerate.
8607 * configure: Regenerate.
8608
8609 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8610
8611 * spu-low.c (spu_kill): Wait for inferior to terminate.
8612 Call clear_inferiors.
8613 (spu_detach): Call clear_inferiors.
8614
8615 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8616
8617 * aclocal.m4: Regenerate.
8618 * config.in: Likewise.
8619 * configure: Likewise.
8620
8621 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8622
8623 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8624 (parse_spufs_run): New function.
8625 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8626 (ppc_breakpoint_at): Handle SPU breakpoints.
8627
8628 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8629
8630 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8631 (SPUFS_MAGIC): Define.
8632 (spu_enumerate_spu_ids): New function.
8633 (linux_qxfer_spu): New function.
8634 (linux_target_ops): Install linux_qxfer_spu.
8635
8636 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8637
8638 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8639 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8640 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8641 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8642 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8643 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8644 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8645 (init_registers_powerpc_cell32l): Add prototype.
8646 (init_registers_powerpc_cell64l): Likewise.
8647 (ppc_arch_setup): Detect Cell/B.E. architecture.
8648
8649 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8650
8651 * Makefile.in (datarootdir): New variable.
8652
8653 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8654
8655 * linux-low.c (linux_write_memory): Update debugging output.
8656 * Makefile.in (clean): Add new descriptions.
8657 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8658 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8659 * configure.srv: Add new files for arm*-*-linux*.
8660 * linux-arm-low.c: Add new declarations.
8661 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8662 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8663 (HWCAP_VFPv3D16): New.
8664 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8665 instead of __IWMMXT__.
8666 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8667 (arm_arch_setup): New.
8668 (target_regsets): Remove #ifdef. Add VFP regset.
8669 (the_low_target): Use arm_arch_setup.
8670
8671 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8672
8673 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8674 the main thread again.
8675
8676 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8677
8678 Adding Neutrino gdbserver.
8679 * configure: Regenerated.
8680 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8681 * configure.srv (i[34567]86-*-nto*): New target.
8682 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8683 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8684 (nto_comctrl) [__QNX__]: New function.
8685 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8686
8687 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8688
8689 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8690 srv_tgtobj.
8691
8692 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8693 Pedro Alves <pedro@codesourcery.com>
8694
8695 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8696 don't support CONTEXT_EXTENDED_REGISTERS.
8697 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8698 (the_low_target): Install them.
8699 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8700 failing with ERROR_PIPE_NOT_CONNECTED.
8701
8702 2009-06-30 Doug Evans <dje@google.com>
8703 Pierre Muller <muller@ics.u-strasbg.fr>
8704
8705 Add h/w watchpoint support to x86-linux, win32-i386.
8706 * Makefile.in (SFILES): Add i386-low.c
8707 (i386_low_h): Define.
8708 (i386-low.o): Add dependencies.
8709 (linux-x86-low.o): Add i386-low.h dependency.
8710 (win32-i386-low.o): Ditto.
8711 * i386-low.c: New file.
8712 * i386-low.h: New file.
8713 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8714 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8715 * linux-low.c (linux_add_process): Initialize arch_private.
8716 (linux_remove_process): Free arch_private.
8717 (add_lwp): Initialize arch_private.
8718 (delete_lwp): Free arch_private.
8719 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8720 provided.
8721 * linux-low.h (process_info_private): New member arch_private.
8722 (lwp_info): New member arch_private.
8723 (linux_target_ops): New members new_process, new_thread,
8724 prepare_to_resume.
8725 (ptid_of): New macro.
8726 * linux-x86-low.c: Include stddef.h, i386-low.h.
8727 (arch_process_info): New struct.
8728 (arch_lwp_info): New struct.
8729 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8730 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8731 (i386_dr_low_get_status): New function.
8732 (x86_insert_point, x86_remove_point): New functions.
8733 (x86_stopped_by_watchpoint): New function.
8734 (x86_stopped_data_address): New function.
8735 (x86_linux_new_process, x86_linux_new_thread): New functions.
8736 (x86_linux_prepare_to_resume): New function.
8737 (the_low_target): Add entries for insert_point, remove_point,
8738 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8739 prepare_to_resume.
8740 * server.c (debug_hw_points): New global.
8741 (monitor_show_help): Document set debug-hw-points.
8742 (handle_query): Process "set debug-hw-points".
8743 * server.h (debug_hw_points): Declare.
8744 (paddress): Declare.
8745 * utils.c (NUMCELLS, CELLSIZE): New macros.
8746 (get_sell, xsnprintf, paddress): New functions.
8747 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8748 remove_point, stopped_by_watchpoint, stopped_data_address.
8749 * win32-i386-low.c: Include i386-low.h.
8750 (debug_reg_state): Replaces dr.
8751 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8752 (i386_dr_low_get_status): New function.
8753 (i386_insert_point, i386_remove_point): New functions.
8754 (i386_stopped_by_watchpoint): New function.
8755 (i386_stopped_data_address): New function.
8756 (i386_initial_stuff): Update.
8757 (get_thread_context,set_thread_context,i386_thread_added): Update.
8758 (the_low_target): Add entries for insert_point,
8759 remove_point, stopped_by_watchpoint, stopped_data_address.
8760 * win32-low.c (win32_insert_watchpoint): New function.
8761 (win32_remove_watchpoint): New function.
8762 (win32_stopped_by_watchpoint): New function.
8763 (win32_stopped_data_address): New function.
8764 (win32_target_ops): Add entries for insert_watchpoint,
8765 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8766 * win32-low.h (win32_target_ops): New members insert_point,
8767 remove_point, stopped_by_watchpoint, stopped_data_address.
8768
8769 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8770
8771 * server.c (process_serial_event): Re-return unsupported, not
8772 error, if the type isn't recognized. Re-allow supporting only
8773 insert or remove packets. Also call require_running for
8774 breakpoints. Add missing break statement to default case. Tidy.
8775 * target.h (struct target_ops): Rename insert_watchpoint to
8776 insert_point, and remove_watchpoint to remove_point.
8777
8778 * linux-low.h (struct linux_target_ops): Likewise.
8779 * linux-low.c (linux_insert_watchpoint): Rename to ...
8780 (linux_insert_point): ... this. Adjust.
8781 (linux_remove_watchpoint): Rename to ...
8782 (linux_remove_point): ... this. Adjust.
8783 (linux_target_ops): Adjust.
8784 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8785 (cris_insert_point): ... this.
8786 (cris_remove_watchpoint): Rename to ...
8787 (cris_remove_point): ... this.
8788 (the_low_target): Adjust.
8789
8790 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8791
8792 * server.c (handle_v_kill): Pass signal_pid to
8793 kill_inferior if multi_process is zero.
8794
8795 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8796
8797 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8798 * target.h (target_ops): Comment for *_watchpoint to make it clear
8799 the functions can get types '0' and '1'.
8800
8801 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8802
8803 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8804 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8805 * regcache.c (get_regcache): Likewise.
8806 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8807 * win32-low.c (child_fetch_inferior_registers): Remove check for
8808 regno 0.
8809
8810 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8811 Pedro Alves <pedro@codesourcery.com>
8812
8813 * target.h (struct target_ops) <supports_multi_process>: New
8814 callback.
8815 (target_supports_multi_process): New.
8816 * server.c (handle_query): Even if GDB reports support, only
8817 enable multi-process if the target also supports it. Report
8818 multi-process support only if the target backend supports it.
8819 * linux-low.c (linux_supports_multi_process): New function.
8820 (linux_target_ops): Install it as target_supports_multi_process
8821 callback.
8822
8823 2009-05-24 Doug Evans <dje@google.com>
8824
8825 Global renaming of find_thread_pid to find_thread_ptid.
8826 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8827 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8828 All callers updated.
8829
8830 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8831 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8832 directly.
8833
8834 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8835 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8836 (linux_resume_one_lwp): Ditto.
8837
8838 2009-05-23 Doug Evans <dje@google.com>
8839
8840 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8841 from struct inferior_list_entry * to struct lwp_info *.
8842 All callers updated.
8843
8844 2009-05-13 Doug Evans <dje@google.com>
8845
8846 * linux-x86-low.c: Don't include assert.h.
8847 (x86_siginfo_fixup): Use fatal, not assert.
8848 (x86_arch_setup): Fix comment.
8849
8850 2009-05-12 Doug Evans <dje@google.com>
8851
8852 Biarch support for i386/amd64 gdbserver.
8853 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8854 Add linux-x86-low.c.
8855 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8856 (linux-x86-low.o): Add.
8857 * linux-x86-64-low.c: Delete.
8858 * linux-i386-low.c: Delete.
8859 * linux-x86-low.c: New file.
8860 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8861 linux-x86-low.o.
8862 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8863 linux-x86-low.o.
8864 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8865 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8866 (linux_child_pid_to_exec_file): New function.
8867 (elf_64_header_p, elf_64_file_p): New functions.
8868 (siginfo_fixup): New function.
8869 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8870 give target a chance to convert layout.
8871 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8872 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8873
8874 2009-05-07 Doug Evans <dje@google.com>
8875
8876 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8877 (regsets_store_inferior_registers): Ditto.
8878
8879 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8880
8881 PR server/10048
8882
8883 * linux-low.c (must_set_ptrace_flags): Delete.
8884 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8885 of the global.
8886 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8887 `lwp->must_set_ptrace_flags' instead.
8888 (linux_wait_for_event_1): Set ptrace options here.
8889 (linux_wait_1): ... not here.
8890
8891 2009-04-30 Doug Evans <dje@google.com>
8892
8893 * inferiors.c (started_inferior_callback): New function.
8894 (attached_inferior_callback): New function.
8895 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8896 * server.c (print_started_pid, print_attached_pid): New functions.
8897 (detach_or_kill_for_exit): New function.
8898 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8899 * server.h (have_started_inferiors_p): Declare.
8900 (have_attached_inferiors_p): Declare.
8901
8902 * inferiors.c (remove_process): Fix memory leak, free process.
8903 * linux-low.c (linux_remove_process): New function.
8904 (linux_kill): Call it instead of remove_process.
8905 (linux_detach, linux_wait_1): Ditto.
8906
8907 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8908
8909 * configure.srv: Add x86 Windows CE target.
8910
8911 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8912
8913 * inferiors.c (get_thread_process): Make global.
8914 * server.h (get_thread_process): Add prototype.
8915 * thread-db.c (find_one_thread): Use get_thread_process
8916 instead of current_process.
8917 (thread_db_get_tls_address): Do not crash if called when
8918 thread layer is not yet initialized.
8919
8920 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8921
8922 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8923 * spu-low.c (current_tid): Rename to ...
8924 (current_ptid): ... this.
8925 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8926 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8927 ptid_get_lwp (current_ptid) instead of current_tid.
8928 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8929 instead of current_tid. Use find_process_pid to verify pid
8930 argument is valid. Pass proper argument to remove_process.
8931 (spu_thread_alive): Compare current_ptid instead of current_tid.
8932 (spu_resume): Likewise.
8933
8934 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8935
8936 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8937 variable.
8938
8939 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8940
8941 Implement the multiprocess extensions, and add linux multiprocess
8942 support.
8943
8944 * server.h (ULONGEST): Declare.
8945 (struct ptid, ptid_t): New.
8946 (minus_one_ptid, null_ptid): Declare.
8947 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8948 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8949 (struct inferior_list_entry): Change `id' type from unsigned from
8950 to ptid_t.
8951 (struct sym_cache, struct breakpoint, struct
8952 process_info_private): Forward declare.
8953 (struct process_info): Declare.
8954 (current_process): Declare.
8955 (all_processes): Declare.
8956 (initialize_inferiors): Declare.
8957 (add_thread): Adjust to use ptid_t.
8958 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8959 (add_process, remove_process, find_thread_pid): Declare.
8960 (find_inferior_id): Adjust to use ptid_t.
8961 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8962 (multi_process): Declare.
8963 (push_event): Adjust to use ptid_t.
8964 (read_ptid, write_ptid): Declare.
8965 (prepare_resume_reply): Adjust to use ptid_t.
8966 (clear_symbol_cache): Declare.
8967 * inferiors.c (all_processes): New.
8968 (null_ptid, minus_one_ptid): New.
8969 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8970 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8971 (add_thread): Change unsigned long to ptid. Remove gdb_id
8972 parameter. Adjust.
8973 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8974 (gdb_id_to_thread): Rename to ...
8975 (find_thread_pid): ... this. Change unsigned long to ptid.
8976 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8977 (loaded_dll, pull_pid_from_list): Adjust.
8978 (add_process, remove_process, find_process_pid)
8979 (get_thread_process, current_process, initialize_inferiors): New.
8980 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8981 (struct target_waitstatus) <related_pid>: Ditto.
8982 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8983 return type to int.
8984 (struct target_ops) <join>: Add `pid' argument.
8985 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8986 (struct target_ops) <wait>: Add `ptid' field. Change return type
8987 to ptid.
8988 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8989 (mywait): Add `ptid' argument. Change return type to ptid_t.
8990 (target_pid_to_str): Declare.
8991 * target.c (set_desired_inferior): Adjust to use ptids.
8992 (mywait): Add new `ptid' argument. Adjust.
8993 (target_pid_to_str): New.
8994 * mem-break.h (free_all_breakpoints): Declare.
8995 * mem-break.c (breakpoints): Delelete.
8996 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8997 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8998 to use per-process breakpoint list.
8999 (free_all_breakpoints): New.
9000 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9001 (symbol_cache, all_symbols_looked_up): Delete.
9002 (hexchars): New.
9003 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9004 read_ptid): New.
9005 (prepare_resume_reply): Change ptid argument's type from unsigned
9006 long to ptid_t. Adjust. Implement W;process and X;process.
9007 (free_sym_cache, clear_symbol_cache): New.
9008 (look_up_one_symbol): Adjust to per-process symbol cache. *
9009 * server.c (cont_thread, general_thread, step_thread): Change type
9010 to ptid_t.
9011 (attached): Delete.
9012 (multi_process): New.
9013 (last_ptid): Change type to ptid_t.
9014 (struct vstop_notif) <ptid>: Change type to ptid_t.
9015 (queue_stop_reply, push_event): Change `ptid' argument's type to
9016 ptid_t.
9017 (discard_queued_stop_replies): Add `pid' argument.
9018 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9019 changes. Don't reference the `attached' global.
9020 (attach_inferior): Adjust to mywait interface changes.
9021 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9022 features. Handle and report "multiprocess+". Handle
9023 "qAttached:PID".
9024 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9025 changes.
9026 (handle_v_kill): New.
9027 (handle_v_stopped): Adjust to use target_pid_to_str.
9028 (handle_v_requests): Allow multiple attaches and runs when
9029 multiprocess extensions are in effect. Handle "vKill".
9030 (myresume): Adjust to use ptids.
9031 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9032 (handle_status): Adjust to discard_queued_stop_replies interface
9033 change.
9034 (first_thread_of, kill_inferior_callback)
9035 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9036 (main): Call initialize_inferiors. Adjust to use ptids, killing
9037 and detaching from all inferiors. Handle multiprocess packet
9038 variants.
9039 * linux-low.h: Include gdb_proc_service.h.
9040 (struct process_info_private): New.
9041 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9042 <lwpid_of>: Use ptid_get_lwp.
9043 (get_lwp_thread): Adjust.
9044 (struct lwp_info): Add `dead' member.
9045 (find_lwp_pid): Declare.
9046 * linux-low.c (thread_db_active): Delete.
9047 (new_inferior): Adjust comment.
9048 (inferior_pid): Delete.
9049 (linux_add_process): New.
9050 (handle_extended_wait): Adjust.
9051 (add_lwp): Change unsigned long to ptid.
9052 (linux_create_inferior): Add process to processes table. Adjust
9053 to use ptids. Don't set new_inferior here.
9054 (linux_attach_lwp): Rename to ...
9055 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9056 it. Adjust to use ptids.
9057 (linux_attach_lwp): New.
9058 (linux_attach): Add process to processes table. Don't set
9059 new_inferior here.
9060 (struct counter): New.
9061 (second_thread_of_pid_p, last_thread_of_process_p): New.
9062 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9063 multiple processes.
9064 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9065 processes. Remove process from process table.
9066 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9067 to multiple processes.
9068 (any_thread_of): New.
9069 (linux_detach): Add `pid' argument, and handle it. Remove process
9070 from processes table.
9071 (linux_join): Add `pid' argument. Handle it.
9072 (linux_thread_alive): Change unsighed long argument to ptid_t.
9073 Consider dead lwps as not being alive.
9074 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9075 threads we're not interested in.
9076 (same_lwp, find_lwp_pid): New.
9077 (linux_wait_for_lwp): Change `pid' argument's type from int to
9078 ptid_t. Adjust.
9079 (linux_wait_for_event): Rename to ...
9080 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9081 from int to ptid_t. Adjust.
9082 (linux_wait_for_event): New.
9083 (linux_wait_1): Add `ptid' argument. Change return type to
9084 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9085 that exit from the process table.
9086 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9087 Adjust.
9088 (mark_lwp_dead): New.
9089 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9090 stopping all threads, mark its main lwp as dead.
9091 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9092 ptids.
9093 (fetch_register, usr_store_inferior_registers)
9094 (regsets_fetch_inferior_registers)
9095 (regsets_store_inferior_registers, linux_read_memory)
9096 (linux_write_memory): Inline `inferior_pid'.
9097 (linux_look_up_symbols): Adjust to use per-process
9098 `thread_db_active'.
9099 (linux_request_interrupt): Adjust to use ptids.
9100 (linux_read_auxv): Inline `inferior_pid'.
9101 (initialize_low): Don't reference thread_db_active.
9102 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9103 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9104 (ps_getpid): Return the pid of the current inferior.
9105 * thread-db.c (proc_handle, thread_agent): Delete.
9106 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9107 per-process data.
9108 (find_one_thread): Change argument type to ptid_t. Adjust to
9109 per-process data.
9110 (maybe_attach_thread): Adjust to per-process data and ptids.
9111 (thread_db_find_new_threads): Ditto.
9112 (thread_db_init): Ditto.
9113 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9114 processes table. Adjust to use ptids.
9115 (spu_kill, spu_detach): Adjust interface. Remove process from
9116 processes table.
9117 (spu_join, spu_thread_alive): Adjust interface.
9118 (spu_wait): Adjust interface. Remove process from processes
9119 table. Adjust to use ptids.
9120 * win32-low.c (current_inferior_tid): Delete.
9121 (current_inferior_ptid): New.
9122 (debug_event_ptid): New.
9123 (thread_rec): Take a ptid. Adjust.
9124 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9125 (child_delete_thread): Ditto.
9126 (do_initial_child_stuff): Add `attached' argument. Add process to
9127 processes table.
9128 (child_fetch_inferior_registers, child_store_inferior_registers):
9129 Adjust.
9130 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9131 (win32_attach): Pass 1 to do_initial_child_stuff.
9132 (win32_kill): Adjust interface. Remove process from processes
9133 table.
9134 (win32_detach): Ditto.
9135 (win32_join): Adjust interface.
9136 (win32_thread_alive): Take a ptid.
9137 (win32_resume): Adjust to use ptids.
9138 (get_child_debug_event): Ditto.
9139 (win32_wait): Adjust interface. Remove exiting process from
9140 processes table.
9141
9142 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9143
9144 Non-stop mode support.
9145
9146 * server.h (non_stop): Declare.
9147 (gdb_client_data, handler_func): Declare.
9148 (delete_file_handler, add_file_handler, start_event_loop):
9149 Declare.
9150 (handle_serial_event, handle_target_event, push_event)
9151 (putpkt_notif): Declare.
9152 * target.h (enum resume_kind): New.
9153 (struct thread_resume): Replace `step' field by `kind' field.
9154 (TARGET_WNOHANG): Define.
9155 (struct target_ops) <wait>: Add `options' argument.
9156 <supports_non_stop, async, start_non_stop>: New fields.
9157 (target_supports_non_stop, target_async): New.
9158 (start_non_stop): Declare.
9159 (mywait): Add `options' argument.
9160 * target.c (mywait): Add `options' argument. Print child exit
9161 notifications here.
9162 (start_non_stop): New.
9163 * server.c (non_stop, own_buf, mem_buf): New globals.
9164 (struct vstop_notif): New.
9165 (notif_queue): New global.
9166 (queue_stop_reply, push_event, discard_queued_stop_replies)
9167 (send_next_stop_reply): New.
9168 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9169 interface changes.
9170 (attach_inferior): In non-stop mode, don't wait for the target
9171 here.
9172 (handle_general_set): Handle QNonStop.
9173 (handle_query): When handling qC, return the current general
9174 thread, instead of the first thread of the list.
9175 (handle_query): If the backend supports non-stop mode, include
9176 QNonStop+ in the qSupported query response.
9177 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9178 and non-stop mode.
9179 (handle_v_attach, handle_v_run): Handle non-stop mode.
9180 (handle_v_stopped): New.
9181 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9182 (myresume): Adjust to use resume_kind. Handle non-stop.
9183 (queue_stop_reply_callback): New.
9184 (handle_status): Handle non-stop mode.
9185 (main): Clear non_stop flag on reconnection. Use the event-loop.
9186 Refactor serial protocol handling from here ...
9187 (process_serial_event): ... to this new function. When GDB
9188 selects any thread, select one here. In non-stop mode, wait until
9189 GDB acks all pending events before exiting.
9190 (handle_serial_event, handle_target_event): New.
9191 * remote-utils.c (remote_open): Install remote_desc in the event
9192 loop.
9193 (remote_close): Remove remote_desc from the event loop.
9194 (putpkt_binary): Rename to...
9195 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9196 (putpkt_binary): New as wrapper around putpkt_binary_1.
9197 (putpkt_notif): New.
9198 (prepare_resume_reply): In non-stop mode, don't change the
9199 general_thread.
9200 * event-loop.c: New.
9201 * Makefile.in (OBJ): Add event-loop.o.
9202 (event-loop.o): New rule.
9203
9204 * linux-low.h (pid_of): Moved here.
9205 (lwpid_of): New.
9206 (get_lwp_thread): Use lwpid_of.
9207 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9208 * linux-low.c (pid_of): Delete.
9209 (inferior_pid): Use lwpid_of.
9210 (linux_event_pipe): New.
9211 (target_is_async_p): New.
9212 (delete_lwp): New.
9213 (handle_extended_wait): Use lwpid_of.
9214 (add_lwp): Don't set lwpid field.
9215 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9216 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9217 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9218 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9219 first. Adjust to linux_wait_for_event interface changes. Use
9220 lwpid_of.
9221 (linux_detach): Don't delete the main lwp here.
9222 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9223 (status_pending_p): Don't consider explicitly suspended lwps.
9224 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9225 pointer. Add OPTIONS argument. Change return type to int. Use
9226 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9227 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9228 pointer. Add status pointer argument. Return a pid instead of a
9229 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9230 changes. In non-stop mode, don't switch to a random thread.
9231 (linux_wait): Rename to...
9232 (linux_wait_1): ... this. Add target_options argument, and handle
9233 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9234 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9235 clean exit and signal exit code. Don't stop all threads in
9236 non-stop mode. In all-stop mode, only stop all threads when
9237 reporting a stop to GDB. Handle explicit thread stop requests.
9238 (async_file_flush, async_file_mark): New.
9239 (linux_wait): New.
9240 (send_sigstop): Use lwpid_of.
9241 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9242 interface changes. In non-stop mode, don't switch to a random
9243 thread.
9244 (linux_resume_one_lwp): Use lwpid_of.
9245 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9246 (linux_resume_one_thread): ... this. Handle resume_stop. In
9247 non-stop mode, don't look for pending flag in all threads.
9248 (resume_status_pending_p): Don't consider explicitly suspended
9249 threads.
9250 (my_waitpid): Reimplement. Emulate __WALL.
9251 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9252 Use lwpid_of.
9253 (sigchld_handler, linux_supports_non_stop, linux_async)
9254 (linux_start_non_stop): New.
9255 (linux_target_ops): Register linux_supports_non_stop, linux_async
9256 and linux_start_non_stop.
9257 (initialize_low): Install SIGCHLD handler.
9258 * thread-db.c (thread_db_create_event, find_one_thread)
9259 (thread_db_get_tls_address): Use lwpid_of.
9260 * win32-low.c (win32_detach): Adjust to use resume_kind.
9261 (win32_wait): Add `options' argument.
9262 * spu-low.c (spu_resume): Adjust to use resume_kind.
9263 (spu_wait): Add `options' argument.
9264
9265 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9266
9267 Decouple target code from remote protocol.
9268
9269 * target.h (enum target_waitkind): New.
9270 (struct target_waitstatus): New.
9271 (struct target_ops) <wait>: Return an unsigned long. Take a
9272 target_waitstatus pointer instead of a char pointer.
9273 (mywait): Likewise.
9274 * target.c (mywait): Change prototype to return an unsigned long.
9275 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9276 * server.h (thread_from_wait, old_thread_from_wait): Delete
9277 declarations.
9278 (prepare_resume_reply): Change prototype to take a
9279 target_waitstatus.
9280 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9281 (last_status, last_ptid): New.
9282 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9283 pid instead of a signal.
9284 (attach_inferior): Remove "status" and "signal" parameters.
9285 Adjust.
9286 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9287 not as an address.
9288 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9289 (handle_v_requests, myresume): Remove "status" and "signal"
9290 parameters. Adjust.
9291 (handle_status): New.
9292 (main): Delete local `status'. Adjust.
9293 * remote-utils.c: Include target.h.
9294 (prepare_resume_reply): Change prototype to take a
9295 target_waitstatus. Adjust.
9296
9297 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9298 interface.
9299 * spu-low.c (spu_wait): Adjust.
9300 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9301 Delete.
9302 (win32_wait): Adjust.
9303
9304 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9305
9306 * target.h (struct thread_resume): Delete leave_stopped member.
9307 (struct target_ops): Add a `n' argument to the `resume' callback.
9308 * server.c (start_inferior): Adjust.
9309 (handle_v_cont, myresume): Adjust.
9310 * linux-low.c (check_removed_breakpoint): Adjust to resume
9311 interface change, and to removed leave_stopped field.
9312 (resume_ptr): Delete.
9313 (struct thread_resume_array): New.
9314 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9315 resume interface change.
9316 (linux_continue_one_thread, linux_queue_one_thread)
9317 (resume_status_pending_p): Check if the resume field is NULL
9318 instead of checking the leave_stopped member.
9319 (linux_resume): Adjust to the target resume interface change.
9320 * spu-low.c (spu_resume): Adjust to the target resume interface
9321 change.
9322 * win32-low.c (win32_detach, win32_resume): Ditto.
9323
9324 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9325
9326 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9327 flag.
9328 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9329 pending.
9330 (linux_continue_one_thread): Only preserve the stepping flag if
9331 there's a pending breakpoint.
9332
9333 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9334
9335 * server.c (main): After the inferior having exited, call
9336 remote_close before exiting gdbserver.
9337
9338 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9339
9340 Fix size of FPSCR in Power 7 processors.
9341 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9342 (PPC_FEATURE_HAS_DFP): New #define.
9343 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9344 size of the FPSCR.
9345
9346 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9347
9348 * server.c (handle_query) Whitespace and formatting.
9349
9350 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9351
9352 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9353 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9354 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9355 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9356 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9357 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9358 Makefile.in, configure.ac: Fix whitespace throughout.
9359 * configure: Regenerate.
9360
9361 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9362
9363 * inferiors.c (find_inferior): Make it safe for the callback
9364 function to delete the currently iterated inferior.
9365
9366 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9367
9368 * Makefile.in (linuw_low_h): Move higher.
9369 (thread-db.o): Depend on $(linux_low_h).
9370
9371 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9372
9373 Rename "process" to "lwp" throughout.
9374
9375 * linux-low.c (all_processes): Rename to...
9376 (all_lwps): ... this.
9377 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9378 (add_process): Rename to ...
9379 (add_lwp): ... this. Adjust.
9380 (linux_create_inferior): Adjust.
9381 (linux_attach_lwp): Adjust.
9382 (linux_attach): Adjust.
9383 (linux_kill_one_process): Rename to ...
9384 (linux_kill_one_lwp): ... this. Adjust.
9385 (linux_kill): Adjust.
9386 (linux_detach_one_process): Rename to ...
9387 (linux_detach_one_lwp): ... this. Adjust.
9388 (linux_detach): Adjust.
9389 (check_removed_breakpoint): Adjust.
9390 (status_pending_p): Adjust.
9391 (linux_wait_for_process): Rename to ...
9392 (linux_wait_for_lwp): ... this. Adjust.
9393 (linux_wait_for_event): Adjust.
9394 (send_sigstop): Adjust.
9395 (wait_for_sigstop): Adjust.
9396 (stop_all_processes): Rename to ...
9397 (stop_all_lwps): ... this.
9398 (linux_resume_one_process): Rename to ...
9399 (linux_resume_one_lwp): ... this. Adjust.
9400 (linux_set_resume_request, linux_continue_one_thread)
9401 (linux_queue_one_thread, resume_status_pending_p)
9402 (usr_store_inferior_registers, regsets_store_inferior_registers)
9403 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9404 Adjust.
9405 * linux-low.h (get_process): Rename to ...
9406 (get_lwp): ... this. Adjust.
9407 (get_thread_process): Rename to ...
9408 (get_thread_lwp): ... this. Adjust.
9409 (get_process_thread): Rename to ...
9410 (get_lwp_thread): ... this. Adjust.
9411 (struct process_info): Rename to ...
9412 (struct lwp_info): ... this.
9413 (all_processes): Rename to ...
9414 (all_lwps): ... this.
9415 * proc-service.c (ps_lgetregs): Adjust.
9416 * thread-db.c (thread_db_create_event, find_one_thread)
9417 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9418
9419 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9420
9421 * server.c (handle_query): Handle "qAttached".
9422
9423 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9424
9425 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9426 GPLv3, update license URL.
9427
9428 2009-03-01 Doug Evans <dje@google.com>
9429
9430 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9431 (server_h): Add gdb_signals.h.
9432 (signals.o): Update.
9433 * server.h (target_signal_from_host,target_signal_to_host_p)
9434 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9435
9436 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9437
9438 * remote-utils.c (getpkt): Also generate remote-debug
9439 information if noack_mode is set.
9440
9441 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9442
9443 * server.c (handle_query): Report qXfer:siginfo:read and
9444 qXfer:siginfo:write as supported and handle them.
9445 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9446 * linux-low.c (linux_xfer_siginfo): New.
9447 (linux_target_ops): Set it.
9448
9449 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9450
9451 * server.c (gdbserver_usage): Mention --remote-debug.
9452 (main): Accept '--remote-debug' switch.
9453
9454 2009-01-18 Doug Evans <dje@google.com>
9455
9456 * regcache.c (new_register_cache): No need to check result of xcalloc.
9457 * server.c (handle_search_memory): Back out calls to xmalloc,
9458 result is checked and error is returned to user upon failure.
9459 (handle_query): Ditto. Add more checks for result of malloc.
9460 (handle_v_cont): Check result of malloc, report error back to
9461 user upon failure.
9462 (handle_v_run): Ditto. Call freeargv.
9463 * server.h (freeargv): Declare.
9464 * utils.c (freeargv): New fn.
9465
9466 2009-01-15 Doug Evans <dje@google.com>
9467
9468 * gdbreplay.c (perror_with_name): Make arg const char *.
9469 * server.h (target_signal_to_name): Make return type const char *.
9470 * thread-db.c (thread_db_err_str): Make return type const char *.
9471 * utils.c (perror_with_name): Make arg const char *.
9472
9473 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9474
9475 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9476 when handling a EXIT_PROCESS_DEBUG_EVENT.
9477
9478 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9479
9480 * gdbreplay.c (gdbreplay_version): Update copyright year.
9481 * server.c (gdbserver_version): Likewise.
9482
9483 2009-01-05 Doug Evans <dje@google.com>
9484
9485 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9486 (handle_extended_wait): Improve comment.
9487
9488 2008-12-13 Doug Evans <dje@google.com>
9489
9490 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9491 * server.h (ATTR_MALLOC): New macro.
9492 (xmalloc,xcalloc,xstrdup): Declare.
9493 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9494 * inferiors.c: Ditto.
9495 * linux-low.c: Ditto.
9496 * mem-break.c: Ditto.
9497 * regcache.c: Ditto.
9498 * remote-utils.c: Ditto.
9499 * server.c: Ditto.
9500 * target.c: Ditto.
9501 * win32-low.c: Ditto.
9502
9503 2008-12-12 Doug Evans <dje@google.com>
9504
9505 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9506 in debugging printf.
9507
9508 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9509
9510 2008-12-09 Doug Evans <dje@google.com>
9511
9512 * linux-low.h (struct process_info): Delete member tid, unused.
9513 * thread-db.c (find_one_thread): Update.
9514 (maybe_attach_thread): Update.
9515
9516 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9517
9518 * target.h (struct target_ops): Add qxfer_osdata member.
9519 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9520 and dirent.h.
9521 (linux_qxfer_osdata): New functions.
9522 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9523 callback.
9524 * server.c (handle_query): Handle "qXfer:osdata:read:".
9525 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9526 (buffer_xml_printf): New functions.
9527 * server.h (struct buffer): New.
9528 (buffer_grow_str, buffer_grow_str0): New macros.
9529 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9530 (buffer_xml_printf): Declare.
9531
9532 2008-11-24 Doug Evans <dje@google.com>
9533
9534 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9535
9536 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9537
9538 * server.c (handle_v_run): Always use the supplied argument list.
9539
9540 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9541
9542 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9543 (xtensa_regmap_table): Add entry for scompare1.
9544
9545 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9546
9547 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9548 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9549 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9550 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9551 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9552 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9553 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9554 XML target descriptions.
9555 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9556 when inferior is running on an ISA 2.05 or later processor. Add
9557 special case to return offset for full 64-bit slot of FPSCR when
9558 in 32-bits.
9559
9560 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9561
9562 * Makefile.in (SFILES, clean): Added sparc64 files.
9563 (reg-sparc64.o, reg-sparc64.c): New.
9564 * configure.srv (sparc*-*-linux*): New configuration.
9565 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9566 syscall arguments for SPARC.
9567 (regsets_store_inferior_registers): Likewise.
9568 * linux-sparc-low.c: New file.
9569
9570 2008-10-21 Doug Evans <dje@google.com>
9571
9572 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9573 (READLINE_DIR,READLINE_DEP): Delete.
9574 (INTERNAL_CFLAGS): Update.
9575 (LINTFLAGS): Update.
9576
9577 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9578
9579 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9580 whole argv from the last run, not just argv[0].
9581
9582 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9583
9584 * regcache.c (new_register_cache): Return NULL if the register
9585 cache size isn't known yet.
9586 (free_register_cache): Avoid dereferencing a NULL regcache.
9587
9588 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9589
9590 * configure.srv: Merge MIPS and MIPS64.
9591
9592 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9593
9594 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9595
9596 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9597
9598 * Makefile.in: Add required vsx dependencies.
9599
9600 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9601 Declare init_registers_powerpc_vsx32l.
9602 Declare init_registers_powerpc_vsx64l.
9603 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9604 (ppc_arch_setup): Check for VSX in hwcap.
9605 (ppc_fill_vsxregset): New function.
9606 (ppc_store_vsxregset): New function.
9607 Add new VSX entry in regset_info target_regsets.
9608
9609 * configure.srv: Add new VSX dependencies.
9610
9611 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9612
9613 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9614 (remote_open): Set or clear transport_is_reliable.
9615 (putpkt_binary): Don't expect acks in noack mode.
9616 (getpkt): Don't send ack/nac in noack mode.
9617 * server.c (handle_general_set): Handle QStartNoAckMode.
9618 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9619 qSupported.
9620 (main): Reset noack_mode on every connection.
9621 * server.h (noack_mode): Declare.
9622
9623 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9624
9625 * Makefile.in (GDBREPLAY_OBS): New variable.
9626 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9627
9628 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9629 Daniel Jacobowitz <dan@codesourcery.com>
9630
9631 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9632 (usr_store_inferior_registers): Likewise.
9633 (regsets_store_inferior_registers): Likewise.
9634
9635 2008-07-31 Rolf Jansen <rj@surtec.com>
9636 Pedro Alves <pedro@codesourcery.com>
9637
9638 * configure.ac: Check for memmem declaration.
9639 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9640 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9641 (disable_packet_qfThreadInfo): Unconditionally compile.
9642 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9643 * configure, config.in: Regenerate.
9644
9645 2008-07-28 Doug Kwan <dougkwan@google.com>
9646
9647 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9648 (linux_write_memory): Remove declaration of errno.
9649
9650 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9651
9652 * linux-low.c (handle_extended_wait): Do not use "status"
9653 variable uninitialized.
9654
9655 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9656
9657 * server.c (handle_v_attach): Inhibit reporting dll changes.
9658
9659 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9660
9661 * remote-utils.c (prepare_resume_reply): If requested, don't
9662 output "thread:TID" in the T stop reply.
9663
9664 * server.c (disable_packet_vCont, disable_packet_Tthread)
9665 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9666 (handle_query): If requested, disable support for qC, qfThreadInfo
9667 and qsThreadInfo.
9668 (handle_v_requests): If requested, disable support for vCont.
9669 (gdbserver_show_disableable): New.
9670 (main): Handle --disable-packet and --disable-packet=LIST.
9671
9672 * server.h (disable_packet_vCont, disable_packet_Tthread)
9673 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9674
9675 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9676
9677 * server.c (gdbserver_usage): Mention --version.
9678
9679 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9680
9681 * Makefile.in (gdbreplay.o): New rule.
9682
9683 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9684
9685 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9686 message, not gdbserver.
9687
9688 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9689 Nathan Sidwell <nathan@codesourcery.com>
9690 Joseph Myers <joseph@codesourcery.com>
9691
9692 * acinclude.m4: Include ../../config/acx.m4.
9693 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9694 * configure, config.in: Regenerate.
9695 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9696 * server.c (gdbserver_version): Print PKGVERSION.
9697 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9698 (main): Adjust gdbserver_usage calls.
9699 * gdbreplay.c (version, host_name): Add declarations.
9700 (gdbreplay_version, gdbreplay_usage): New.
9701 (main): Accept --version and --help options.
9702
9703 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9704
9705 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9706 (arm_breakpoint_at): Handle Thumb.
9707 (the_low_target): Add comment.
9708
9709 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9710
9711 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9712
9713 2008-05-09 Doug Evans <dje@google.com>
9714
9715 * server.h (decode_search_memory_packet): Declare.
9716 * remote-utils.c (decode_search_memory_packet): New fn.
9717 * server.c (handle_search_memory_1): New fn.
9718 (handle_search_memory): New fn.
9719 (handle_query): Process qSearch:memory packets.
9720
9721 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9722
9723 * regcache.c (registers_length): Remove.
9724 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9725 full register packet.
9726 * regcache.h (registers_length): Remove prototype.
9727 * server.h (PBUFSIZ): Define to 16384.
9728
9729 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9730
9731 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9732 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9733 powerpc-64l.o, and powerpc-altivec64l.o.
9734 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9735 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9736 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9737 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9738 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9739 to srv_xmlfiles.
9740
9741 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9742 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9743 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9744 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9745 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9746 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9747 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9748 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9749 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9750 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9751 (clean): Update.
9752
9753 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9754 (init_registers_powerpc_32l): ... this new prototype.
9755 (init_registers_powerpc_32): Remove, replace by ...
9756 (init_registers_powerpc_altivec32l): ... this new prototype.
9757 (init_registers_powerpc_e500): Remove, replace by ...
9758 (init_registers_powerpc_e500l): ... this new prototype.
9759 (init_registers_ppc64): Remove, replace by ...
9760 (init_registers_powerpc_64l): ... this new prototype.
9761 (init_registers_powerpc_64): Remove, replace by ...
9762 (init_registers_powerpc_altivec64l): ... this new prototype.
9763 (ppc_num_regs): Set to 73.
9764 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9765 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9766 (ppc_cannot_store_register): Handle orig_r3 and trap.
9767 (ppc_arch_setup): Update init_registers_... calls.
9768 (ppc_fill_gregset): Handle orig_r3 and trap.
9769
9770 * inferiors.c (clear_inferiors): Reset current_inferior.
9771
9772 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9773
9774 * acinclude.m4: Add override.m4.
9775 * configure: Regenerate.
9776
9777 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9778
9779 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9780 initial call to init_register_ppc64.
9781
9782 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9783
9784 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9785 single powerpc*-*-linux* case.
9786 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9787
9788 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9789
9790 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9791 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9792 from reg_xmlfiles.
9793 * linux-ppc-low.c: Include <elf.h>.
9794 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9795 (ppc_hwcap): New global variable.
9796 (ppc_regmap): Remove __SPE__ #ifdef sections.
9797 (ppc_regmap_e500): New global variable.
9798 (ppc_cannot_store_register): Update __SPE__ special case.
9799 (ppc_get_hwcap): New function.
9800 (ppc_arch_setup): Use it to determine whether inferior supports
9801 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9802 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9803 Do not access registers if target does not support AltiVec.
9804 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9805 Do not access registers if target does not support SPE.
9806 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9807
9808 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9809
9810 * linux-low.c (disabled_regsets, num_regsets): New.
9811 (use_regsets_p): Delete.
9812 (linux_wait_for_process): Clear disabled_regsets.
9813 (regsets_fetch_inferior_registers): Check and set it.
9814 (regsets_store_inferior_registers): Likewise.
9815 (linux_fetch_registers, linux_store_registers): Do not use
9816 use_regsets_p.
9817 (initialize_low): Allocate disabled_regsets.
9818
9819 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9820
9821 * Makefile.in (LIBOBJS): New.
9822 (OBS): Use LIBOBJS.
9823 (memmem.o): New rule.
9824 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9825 * configure: Regenerated.
9826
9827 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9828
9829 * server.c (handle_query): Never return "unsupported" for
9830 qXfer:features:read queries.
9831
9832 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9833
9834 * server.c (get_features_xml): Fix inverted condition.
9835 (handle_query): Always support qXfer:feature:read.
9836
9837 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9838
9839 * server.c (wrapper_argv): New.
9840 (start_inferior): Handle wrapper_argv. If set, expect an extra
9841 trap.
9842 (gdbserver_usage): Document --wrapper.
9843 (main): Parse --wrapper.
9844
9845 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9846
9847 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9848 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9849 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9850 (ppc_set_pc): Likewise.
9851 (ppc_arch_setup): New function.
9852 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9853 of collect_register.
9854 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9855
9856 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9857
9858 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9859 instead of linux-ppc64-low.o.
9860 * linux-ppc64-low.c: Remove file.
9861 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9862 (linux-ppc64-low.o): Remove rule.
9863
9864 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9865 (init_registers_powerpc_64): Likewise.
9866 (ppc_regmap): Conditionally define depending on __powerpc64__.
9867 (ppc_cannot_store_register): Do not special-case "fpscr" when
9868 compiled on __powerpc64__.
9869 (ppc_collect_ptrace_register): New function.
9870 (ppc_supply_ptrace_register): New function.
9871 (ppc_breakpoint): Change type to "unsigned int".
9872 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9873 (the_low_target): Conditionally provide initializers for the
9874 arch_setup member depending on __powerpc64__. Install
9875 collect_ptrace_register and supply_ptrace_register members.
9876
9877 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9878
9879 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9880 * server.c (gdbserver_xmltarget): Define.
9881 (get_features_xml): Use it to replace "target.xml" and arch_string.
9882
9883 * configure.srv: Remove srv_xmltarget. Add XML files that were
9884 mentioned there to srv_xmlfiles instead. Remove conditional tests
9885 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9886 srv_xmlfiles and srv_regobj to include all possible choices.
9887 * configure.ac (srv_xmltarget): Remove.
9888 (srv_xmlfiles): Do not add "target.xml".
9889 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9890 checks for supplementary target information.
9891 * configure: Regenerate.
9892 * Makefile.in (XML_TARGET): Remove.
9893 (target.xml): Remove rule.
9894 (clean): Do not clean up target.xml.
9895 (.PRECIOUS): Do not mention target.xml.
9896
9897 * target.h (struct target_ops): Remove arch_string member.
9898 * linux-low.c (linux_arch_string): Remove.
9899 (linux_target_ops): Remove arch_string initializer.
9900 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9901 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9902 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9903 * spu-low.c (spu_arch_string): Remove.
9904 (spu_target_ops): Remove arch_string initializer.
9905 * win32-low.c (win32_arch_string): Remove.
9906 (win32_target_ops): Remove arch_string initializer.
9907 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9908 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9909 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9910
9911 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9912
9913 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9914 by collect_ptrace_register and supply_ptrace_register hooks.
9915 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9916 instead of checking for the_low_target.left_pad_xfer.
9917 (usr_store_inferior_registers): Use collect_ptrace_register callback
9918 instead of checking for the_low_target.left_pad_xfer.
9919
9920 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9921 (s390_supply_ptrace_register): Likewise.
9922 (s390_fill_gregset): Call s390_collect_ptrace_register.
9923 (the_low_target): Update.
9924
9925 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9926 (ppc_supply_ptrace_register): Likewise.
9927 (the_low_target): Update.
9928
9929 * linux-i386-low.c (the_low_target): Update.
9930 * linux-x86-64-low.c (the_low_target): Update.
9931
9932 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9933
9934 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9935 reg-s390.o and reg-s390x.o.
9936
9937 * linux-low.c (new_inferior): New global variable.
9938 (linux_create_inferior, linux_attach): Set it.
9939 (linux_wait_for_process): Call the_low_target.arch_setup after the
9940 target has stopped for the first time.
9941 (initialize_low): Do not call the_low_target.arch_setup.
9942
9943 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9944 (s390_set_pc): Likewise.
9945 (s390_arch_setup): New function.
9946 (the_low_target): Use s390_arch_setup as arch_setup routine.
9947
9948 * regcache.c (realloc_register_cache): New function.
9949 (set_register_cache): Call it for each existing regcache.
9950
9951 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9952
9953 * server.h (init_registers): Remove prototype.
9954
9955 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9956 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9957 instead of init_registers ().
9958 * linux-arm-low.c (init_registers_arm): Add prototype.
9959 (init_registers_arm_with_iwmmxt): Likewise.
9960 (the_low_target): Add initializer for arch_setup field.
9961 * linux-cris-low.c (init_registers_cris): Add prototype.
9962 (the_low_target): Add initializer for arch_setup field.
9963 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9964 (the_low_target): Add initializer for arch_setup field.
9965 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9966 (the_low_target): Add initializer for arch_setup field.
9967 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9968 (the_low_target): Add initializer for arch_setup field.
9969 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9970 (the_low_target): Add initializer for arch_setup field.
9971 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9972 (the_low_target): Add initializer for arch_setup field.
9973 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9974 (init_registers_mips64_linux): Likewise.
9975 (the_low_target): Add initializer for arch_setup field.
9976 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9977 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9978 (the_low_target): Add initializer for arch_setup field.
9979 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9980 (init_registers_powerpc_64): Likewise.
9981 (the_low_target): Add initializer for arch_setup field.
9982 * linux-s390-low.c (init_registers_s390): Add prototype.
9983 (init_registers_s390x): Likewise.
9984 (the_low_target): Add initializer for arch_setup field.
9985 * linux-sh-low.c (init_registers_sh): Add prototype.
9986 (the_low_target): Add initializer for arch_setup field.
9987 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9988 (the_low_target): Add initializer for arch_setup field.
9989 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9990 (the_low_target): Add initializer for arch_setup field.
9991
9992 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9993 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9994 instead of init_registers ().
9995 * win32-arm-low.c (init_registers_arm): Add prototype.
9996 (the_low_target): Add initializer for arch_setup field.
9997 * win32-i386-low.c (init_registers_i386): Add prototype.
9998 (the_low_target): Add initializer for arch_setup field.
9999
10000 * spu-low.c (init_registers_spu): Add prototype.
10001 (initialize_low): Call initialie_registers_spu () instead of
10002 initialize_registers ().
10003
10004 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10005
10006 * server.c (handle_v_requests): When handling the vRun and vAttach
10007 packets, if already debugging a process, don't kill it. Return an
10008 error instead.
10009
10010 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10011
10012 * server.c (handle_query): Correct length check.
10013
10014 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10015
10016 * win32-low.c (do_initial_child_stuff): Add process handle
10017 parameter. Set current_process_handle and current_process_id from the
10018 parameters. Clear globals.
10019 (win32_create_inferior): Don't set current_process_handle and
10020 current_process_id here. Instead pass them on the call to
10021 do_initial_child_stuff.
10022 (win32_attach): Likewise.
10023 (win32_clear_inferiors): New.
10024 (win32_kill): Don't close the current process handle or the
10025 current thread handle here. Instead call win32_clear_inferiors.
10026 (win32_detach): Don't open a new handle to the process. Call
10027 win32_clear_inferiors.
10028 (win32_join): Don't rely on current_process_handle; open a new
10029 handle using the process id.
10030 (win32_wait): Call win32_clear_inferiors when the inferior process
10031 has exited.
10032
10033 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10034
10035 * server.c (monitor_show_help): Add "exit".
10036
10037 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10038
10039 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10040 (clean): Add reg-xtensa.c.
10041 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10042 * configure.srv (xtensa*-*-linux*) New target.
10043 * linux-xtensa-low.c: New.
10044 * xtensa-xtregs.c: New.
10045
10046 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10047
10048 * hostio.c: Don't include errno.h.
10049 (errno_to_fileio_errno): Move to hostio-errno.
10050 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10051 error number outputting to the target->hostio_last_error callback.
10052 (hostio_packet_error): Use FILEIO_EINVAL directly.
10053 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10054 calls to hostio_error.
10055 * hostio-errno.c: New.
10056 * server.h (hostio_last_error_from_errno): Declare.
10057 * target.h (target_ops): Add hostio_last_error member.
10058 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10059 as hostio_last_error handler.
10060 * spu-low.c (spu_target_ops): Likewise.
10061 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10062 (wince_hostio_last_error): New functions.
10063 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10064 as hostio_last_error handler.
10065 (win32_target_ops) [!_WIN32_WCE]: Register
10066 hostio_last_error_from_errno as hostio_last_error handler.
10067 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10068 (hostio-errno.o): New rule.
10069 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10070 * configure.srv (srv_hostio_err_objs): New variable. Default to
10071 hostio-errno.o.
10072 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10073 * configure: Regenerate.
10074
10075 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10076
10077 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10078 (linux_kill, linux_detach): Clean up the process list.
10079 * remote-utils.c (remote_open): Improve port number parsing.
10080 (putpkt_binary, input_interrupt): Only send interrupts if the target
10081 is running.
10082 * server.c (extended_protocol): Make static.
10083 (attached): Define earlier.
10084 (exit_requested, response_needed, program_argv): New variables.
10085 (target_running): New.
10086 (start_inferior): Clear attached here.
10087 (attach_inferior): Set attached here.
10088 (require_running): Define.
10089 (handle_query): Use require_running and target_running. Implement
10090 "monitor exit".
10091 (handle_v_attach, handle_v_run): New.
10092 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10093 (gdbserver_usage): Update.
10094 (main): Redo argument parsing. Handle --debug and --multi. Handle
10095 --attach along with other options or after the port. Save
10096 program_argv. Support no initial program. Resynchronize
10097 communication with GDB after an error. Handle "monitor exit".
10098 Use require_running and target_running. Always allow the extended
10099 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10100 restart in extended mode.
10101 * README: Refer to the GDB manual. Update --attach usage.
10102
10103 2007-12-20 Andreas Schwab <schwab@suse.de>
10104
10105 * linux-low.c (STACK_SIZE): Define.
10106 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10107 (linux_test_for_tracefork): Likewise.
10108
10109 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10110
10111 * linux-low.c (linux_wait_for_event): Update messages. Do not
10112 reinsert auto-delete breakpoints.
10113 * mem-break.c (struct breakpoint): Change return type of handler to
10114 int.
10115 (set_breakpoint_at): Update handler type.
10116 (reinsert_breakpoint_handler): Return 1 instead of calling
10117 delete_breakpoint.
10118 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10119 setting a new one.
10120 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10121 * mem-break.h (set_breakpoint_at): Update handler type.
10122 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10123 * win32-low.c (auto_delete_breakpoint): New.
10124 (get_child_debug_event): Use it.
10125
10126 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * configure.ac: Check for pread and pwrite.
10129 * hostio.c (handle_pread): Fall back to lseek and read.
10130 (handle_pwrite): Fall back to lseek and write.
10131 * config.in, configure: Regenerated.
10132
10133 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10134
10135 * server.c (myresume): Add own_buf argument.
10136 (main): Update calls.
10137
10138 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10141 * remote-utils.c (remote_open): Do not call disable_async_io.
10142 (block_async_io): Delete.
10143 (unblock_async_io): Make static.
10144 (initialize_async_io): New.
10145 * server.c (handle_v_cont): Handle async I/O here.
10146 (myresume): Likewise. Move other common resume tasks here...
10147 (main): ... from here. Call initialize_async_io. Disable async
10148 I/O before the main loop.
10149 * server.h (initialize_async_io): Declare.
10150 (block_async_io, unblock_async_io): Delete prototypes.
10151 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10152
10153 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10154
10155 * remote-utils.c (readchar): Allow binary data in received messages.
10156
10157 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10158
10159 * win32-low.c (attaching): New global.
10160 (win32_create_inferior): Clear the `attaching' global.
10161 (win32_attach): Set the `attaching' global.
10162 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10163 attaching. Only set a breakpoint at the entry point if not
10164 attaching.
10165
10166 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10167
10168 * server.c (main): Don't report dll events on the initial
10169 connection on attaches.
10170
10171 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10172
10173 * server.c (main): Relax numerical bases supported for the pid of
10174 the --attach command line argument.
10175
10176 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10177
10178 * win32-low.c (win32_attach): Call OpenProcess before
10179 DebugActiveProcess, not after. Add last error output to error
10180 call.
10181
10182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10183
10184 * win32-low.c (win32_get_thread_context)
10185 (win32_set_thread_context): New functions.
10186 (thread_rec): Use win32_get_thread_context.
10187 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10188 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10189 field.
10190
10191 2007-12-03 Leo Zayas
10192 Pedro Alves <pedro_alves@portugalmail.pt>
10193
10194 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10195 global variables.
10196 (child_add_thread): Minor cleanup.
10197 (child_continue): Resume artificially suspended threads before
10198 calling ContinueDebugEvent.
10199 (suspend_one_thread): New.
10200 (fake_breakpoint_event): New.
10201 (get_child_debug_event): Change return type to int. Check here if
10202 gdb sent an interrupt request. If a soft interrupt was requested,
10203 fake a breakpoint event. Return 0 if there is no event to handle,
10204 and 1 otherwise.
10205 (win32_wait): Don't check here if gdb sent an interrupt request.
10206 Ensure there is a valid event to handle.
10207 (win32_request_interrupt): Add soft interruption method as last
10208 resort.
10209
10210 2007-12-03 Leo Zayas
10211 Pedro Alves <pedro_alves@portugalmail.pt>
10212
10213 * win32-low.h (win32_thread_info): Add descriptions to the
10214 structure members. Replace `suspend_count' counter by a
10215 `suspended' flag.
10216 * win32-low.c (thread_rec): Update condition of when to get the
10217 context from the inferior. Rely on ContextFlags being set if it
10218 has already been retrieved. Only suspend the inferior thread if
10219 we haven't already. Warn if that fails.
10220 (continue_one_thread): s/suspend_count/suspended/. Only call
10221 ResumeThread once. Warn if that fails.
10222
10223 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10224
10225 * win32-low.c (win32_wait): Don't read from the inferior when it
10226 has already exited.
10227
10228 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10229
10230 * Makefile.in (win32_low_h): New variable.
10231 (win32-low.o): Add dependency on $(win32_low_h).
10232 (win32-arm-low.o, win32-i386-low.o): New rules.
10233
10234 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10235
10236 * hostio.c: Correct copyright year.
10237
10238 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10239
10240 * Makefile.in (OBS): Add hostio.o.
10241 (hostio.o): New rule.
10242 * server.h (handle_vFile): Declare.
10243 * hostio.c: New file.
10244 * server.c (handle_v_requests): Take packet_len and new_packet_len
10245 for binary packets. Call handle_vFile.
10246 (main): Update call to handle_v_requests.
10247
10248 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10249
10250 * linux-low.c: Include <sched.h>.
10251
10252 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10253
10254 * linux-low.c (linux_tracefork_grandchild): New.
10255 (linux_tracefork_child): Use clone.
10256 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10257
10258 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10259
10260 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10261
10262 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10263
10264 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10265
10266 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10267
10268 * inferiors.c (change_inferior_id): Delete.
10269 (add_pid_to_list, pull_pid_from_list): New.
10270 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10271 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10272 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10273 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10274 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10275 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10276 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10277 (using_threads): Always set to 1.
10278 (handle_extended_wait): New.
10279 (add_process): Do not set TID.
10280 (linux_create_inferior): Set must_set_ptrace_flags.
10281 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10282 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10283 (linux_thread_alive): Rename TID argument to LWPID.
10284 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10285 (linux_wait_for_event): Do not use TID or check using_threads. Update
10286 call to dead_thread_notify. Call handle_extended_wait.
10287 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10288 (send_sigstop): Delete sigstop_sent.
10289 (wait_for_sigstop): Avoid TID.
10290 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10291 (linux_test_for_tracefork): New.
10292 (linux_lookup_signals): Use thread_db_active and
10293 linux_supports_tracefork_flag.
10294 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10295 * linux-low.h (get_process_thread): Avoid TID.
10296 (struct process_ifo): Move thread_known and tid to the end. Remove
10297 sigstop_sent.
10298 (linux_attach_lwp, thread_db_init): Update prototypes.
10299 * server.h (change_inferior_id): Delete prototype.
10300 (add_pid_to_list, pull_pid_from_list): New prototypes.
10301 * thread-db.c (thread_db_use_events): New.
10302 (find_first_thread): Rename to...
10303 (find_one_thread): ...this. Update callers and messages. Do not
10304 call fatal. Check thread_db_use_events. Do not call
10305 change_inferior_id or new_thread_notify.
10306 (maybe_attach_thread): Update. Do not call new_thread_notify.
10307 (thread_db_init): Set thread_db_use_events. Check use_events.
10308 * utils.c (fatal, warning): Correct message prefix.
10309
10310 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10311
10312 * Makefile.in (clean): Remove new files.
10313 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10314 (powerpc-64.o, powerpc-64.c): New rules.
10315 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10316 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10317 with SPE.
10318 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10319 SPE targets.
10320 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10321 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10322 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10323 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10324 (target_regsets): Add AltiVec and SPE register sets.
10325 * configure.ac: Check for AltiVec and SPE.
10326 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10327 (ppc_fill_vrregset, ppc_store_vrregset): New.
10328 (target_regsets): Add AltiVec register set.
10329 * configure: Regenerated.
10330
10331 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10332
10333 * linux-low.c (O_LARGEFILE): Define.
10334 (linux_read_memory): Use /proc/PID/mem.
10335 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10336 * configure, config.in: Regenerated.
10337
10338 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10339
10340 * linux-low.c (linux_wait_for_event): Do not pass signals while
10341 single-stepping.
10342
10343 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10344
10345 * win32-low.c (create_process): New.
10346 (win32_create_inferior): Use create_process instead of
10347 CreateProcess. If create_process failed retry appending an ".exe"
10348 suffix. Store the GetLastError result immediatelly after
10349 create_process calls and use it on the call to error.
10350
10351 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10352
10353 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10354
10355 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10356
10357 * configure.ac: Switch license to GPLv3.
10358
10359 2007-08-01 Michael Snyder <msnyder@access-company.com>
10360
10361 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10362
10363 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10364
10365 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10366 typedef.
10367 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10368 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10369 CloseToolhelp32Snapshot.
10370 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10371 CloseToolhelp32Snapshot.
10372
10373 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10374
10375 * server.c (main): Check for inferior exit before main loop.
10376
10377 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10378
10379 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10380 instead of on tmp_desc.
10381
10382 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10383 Daniel Jacobowitz <dan@codesourcery.com>
10384
10385 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10386 (add_thread): Minor cleanups.
10387 (clear_inferiors): Move lower in the file. Clear the DLL
10388 list.
10389 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10390 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10391 (xml_escape_text): New.
10392 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10393 for qSupported.
10394 (handle_v_cont): Report errors.
10395 (gdbserver_version): Update.
10396 (main): Correct size of own_buf. Do not report initial DLL events.
10397 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10398 (unloaded_dll, xml_escape_text): New.
10399 * win32-low.c (enum target_waitkind): Update comments.
10400 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10401 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10402 (win32_EnumProcessModules, win32_GetModuleInformation)
10403 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10404 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10405 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10406 (win32_Module32First, win32_Module32Next, load_toolhelp)
10407 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10408 (get_child_debug_event): Handle DLL events.
10409 (win32_wait): Likewise.
10410
10411 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10412
10413 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10414 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10415
10416 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10417
10418 * win32-low.c (handle_output_debug_string): Ignore event if not
10419 waiting.
10420
10421 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10422
10423 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10424
10425 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10428
10429 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10430
10431 * inferiors.c (change_inferior_id): Add comment.
10432 * linux-low.c (check_removed_breakpoint): Add an early
10433 prototype. Improve debug output.
10434 (linux_attach): Doc update.
10435 (linux_detach_one_process, linux_detach): Clean up before releasing
10436 each process.
10437 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10438 * linux-low.h (struct process_info): Doc improvement.
10439 * mem-break.c (delete_all_breakpoints): New.
10440 * mem-break.h (delete_all_breakpoints): New prototype.
10441 * thread-db.c (find_first_thread): New.
10442 (thread_db_create_event): Call it instead of
10443 thread_db_find_new_threads. Clean up unused variables.
10444 (maybe_attach_thread): Remove first thread handling.
10445 (thread_db_find_new_threads): Use find_first_thread.
10446 (thread_db_get_tls_address): Likewise.
10447
10448 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10449
10450 * thread-db.c (thread_db_find_new_threads): Add prototype.
10451 (thread_db_create_event): Check for the main thread before adding
10452 a new thread.
10453 (maybe_attach_thread): Only enable event reporting if TID == 0.
10454 (thread_db_get_tls_address): Check for new threads.
10455
10456 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10457
10458 * linux-low.c (linux_create_inferior): Try execv before execvp.
10459 * spu-low.c (spu_create_inferior): Likewise.
10460
10461 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10462
10463 * linux-low.c (linux_create_inferior): Change execv to execvp.
10464 * spu-low.c (spu_create_inferior): Likewies.
10465
10466 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10467
10468 * Makefile.in (clean): Clean new files instead of deleted ones.
10469 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10470 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10471 rules.
10472 * configure.srv: Specify XML files and new regformats for MIPS and
10473 MIPS64 GNU/Linux.
10474 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10475 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10476 an entry for the restart register.
10477 (mips_cannot_fetch_register, mips_cannot_store_register)
10478 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10479 register names to match the XML descriptions.
10480 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10481 restart register instead of $0.
10482
10483 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10484 Markus Deuling <deuling@de.ibm.com>
10485
10486 * remote-utils.c (decode_xfer_write): New function.
10487 * server.h (decode_xfer_write): Add prototype.
10488 * server.c (handle_query): Add PACKET_LEN argument. Support
10489 qXfer:spu:read and qXfer:spu:write packets.
10490 (main): Pass packet_len to handle_query.
10491 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10492 * target.h (target_ops): Add qxfer_spu.
10493
10494 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10495
10496 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10497 accessing non-seekable spufs files.
10498
10499 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10500
10501 * server.c (handle_query): Add reply for qC packet.
10502
10503 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10504 Leo Zayas <lerele@champenstudios@com>
10505
10506 * server.h (check_remote_input_interrupt_request): New function.
10507 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10508 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10509 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10510 (check_remote_input_interrupt_request): New function.
10511 * server.h (check_remote_input_interrupt_request): Declare.
10512 * win32-low.c (winapi_DebugBreakProcess,
10513 winapi_GenerateConsoleCtrlEvent): New typedefs.
10514 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10515 to 250 ms.
10516 (win32_wait): Check for remote interrupt request
10517 with check_remote_input_interrupt_request.
10518 (win32_request_interrupt): New function.
10519 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10520
10521 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10522
10523 * win32-low.c (debug_registers_changed,
10524 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10525 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10526 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10527 (thread_rec): Get context using the low target.
10528 (child_add_thread): Call thread_added on the low target,
10529 which does the same thing.
10530 (regptr): Delete.
10531 (do_initial_child_stuff): Remove debug registers references.
10532 Set context using the low target. Resume threads after
10533 setting the contexts.
10534 (child_continue): Remove dead variable. Remove debug
10535 registers references.
10536 (child_fetch_inferior_registers): Go through the low target.
10537 (do_child_store_inferior_registers): Remove.
10538 (child_store_inferior_registers): Go through the low target.
10539 (win32_resume): Remove debug registers references.
10540 Set context using the low target.
10541 (handle_exception): Change return type to void. Don't record
10542 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10543 first chance exception.
10544 (get_child_debug_event): Change return type to void. Remove
10545 goto loop. Always return after waiting for debug event.
10546 (win32_wait): Convert to switch statement. Handle spurious
10547 events.
10548
10549 * win32-i386-low.c (debug_registers_changed,
10550 debug_registers_used): New.
10551 (initial_stuff): Rename to ...
10552 (i386_initial_stuff): ... this. Clear debug registers
10553 state variables.
10554 (store_debug_registers): Delete.
10555 (i386_get_thread_context): New.
10556 (load_debug_registers): Delete.
10557 (i386_set_thread_context): New.
10558 (i386_thread_added): New.
10559 (single_step): Rename to ...
10560 (i386_single_step): ... this.
10561 (do_fetch_inferior_registers): Rename to ...
10562 (i386_fetch_inferior_register): ... this.
10563 (i386_store_inferior_register): New.
10564 (the_low_target): Adapt to new interface.
10565
10566 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10567 (arm_get_thread_context): New.
10568 (arm_set_thread_context): New.
10569 (regptr): New.
10570 (do_fetch_inferior_registers): Rename to ...
10571 (arm_fetch_inferior_register): ... this.
10572 (arm_store_inferior_register): New.
10573 (arm_wince_breakpoint): Reimplement as unsigned long.
10574 (arm_wince_breakpoint_len): Define.
10575 (the_low_target): Adapt to new interface.
10576
10577 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10578 load_debug_registers. Add get_thread_context, set_thread_context,
10579 thread_added and store_inferior_register. Rename
10580 fetch_inferior_registers to fetch_inferior_register.
10581 (regptr): Remove declaration.
10582
10583 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10584
10585 * linux-low.c (linux_detach): Change return type to int. Return 0.
10586 * spu-low.c (spu_detach): Likewise.
10587
10588 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10589
10590 * target.h (target_ops): Change return type of detach to int.
10591 Add join.
10592 (join_inferior): New.
10593 * server.c (main): Don't skip detach support on mingw32.
10594 If the inferior doesn't support detaching return error.
10595 Call join_inferior instead of using waitpid.
10596 * linux-low.c (linux_join): New.
10597 (linux_target_op): Add linux_join.
10598 * spu-low.c (spu_join): New.
10599 (spu_target_ops): Add spu_join.
10600 * win32-low.c (win32_detach): Adapt to new interface.
10601 Reopen current_process_handle before detaching. Issue a child
10602 resume before detaching.
10603 (win32_join): New.
10604 (win32_target_op): Add win32_join.
10605
10606 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10607
10608 * win32-low.c (win32-attach): Fix return value.
10609 * target.h (target_ops): Describe ATTACH return values.
10610
10611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10612
10613 * win32-low.c (GETPROCADDRESS): Define.
10614 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10615 (winapi_DebugSetProcessKillOnExit): Likewise.
10616 (win32_create_inferior): Force usage of ansi CreateProcessA.
10617 (win32_attach): Use GETPROCADDRESS.
10618 (win32_detach): Likewise.
10619
10620 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10621
10622 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10623
10624 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10625
10626 * win32-low.c: Commit leftover changes from 2007-03-29.
10627
10628 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10629
10630 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10631 fields short instead of int. Add explicit padding.
10632 (i387_cache_to_fsave): Remove unnecessary casts.
10633 (i387_fsave_to_cache): Doc fix.
10634 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10635
10636 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10637
10638 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10639 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10640
10641 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10642
10643 * configure.srv (arm*-*-mingw32ce*): Move near the other
10644 arm targets.
10645
10646 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10647
10648 * configure.ac: Add errno checking.
10649 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10650 sys/file.h and malloc.h.
10651 (AC_CHECK_DECLS): Add perror.
10652 (srv_mingwce): Handle.
10653 * configure.srv (i[34567]86-*-cygwin*): Add
10654 win32-i386-low.o to srv_tgtobj.
10655 (i[34567]86-*-mingw*): Likewise.
10656 (arm*-*-mingw32ce*): Add case.
10657 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10658 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10659 [__MINGW32CE__] (strerror): New function.
10660 [__MINGW32CE__] (errno): Define to GetLastError.
10661 [__MINGW32CE__] (COUNTOF): New macro.
10662 (remote_open): Remove extra close call.
10663 * mem-break.c (delete_breakpoint_at): New function.
10664 * mem-break.h (delete_breakpoint_at): Declare.
10665 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10666 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10667 [USE_WIN32API] (read, write): Add char* casts.
10668 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10669 * server.h: Include wincecompat.h on Windows CE.
10670 [HAVE_ERRNO_H]: Check.
10671 (perror): Declare if not declared.
10672 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10673 (perror_with_name): Remove errno declaration.
10674 * wincecompat.h: New.
10675 * wincecompat.c: New.
10676 * win32-low.h: New.
10677 * win32-arm-low.c: New.
10678 * win32-i386-low.c: New.
10679 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10680 (OUTMSG2): Make it safe.
10681 (_T): New macro.
10682 (COUNTOF): New macro.
10683 (NUM_REGS): Get it from the low target.
10684 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10685 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10686 (thread_rec): Let low target handle debug registers.
10687 (child_add_thread): Likewise.
10688 (child_init_thread_list): Likewise.
10689 (continue_one_thread): Likewise.
10690 (regptr): New.
10691 (do_child_fetch_inferior_registers): Move to ...
10692 * win32-i386-low.c: ... here, and rename to ...
10693 (do_fetch_inferior_registers): ... this.
10694 * win32-low.c (child_fetch_inferior_registers):
10695 Go through the low target.
10696 (do_child_store_inferior_registers): Use regptr.
10697 (strwinerror): New function.
10698 (win32_create_inferior): Handle Windows CE.
10699 Use strwinerror instead of strerror on Windows error
10700 codes. Add program to the error output.
10701 Don't close the main thread handle on Windows CE.
10702 (win32_attach): Use coredll.dll on Windows CE.
10703 (win32_kill): Close current process and current
10704 thread handles.
10705 (win32_detach): Use coredll.dll on Windows CE.
10706 (win32_resume): Let low target handle debug registers, and
10707 step request.
10708 (handle_exception): Add/Remove initial breakpoint. Avoid
10709 non-existant WSTOPSIG on Windows CE.
10710 (win32_read_inferior_memory): Cast to remove warning.
10711 (win32_arch_string): Go through the low target.
10712 (initialize_low): Call set_breakpoint_data with the low
10713 target's breakpoint.
10714 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10715 FOP_REGNUM, mappings): Move to ...
10716 * win32-i386-low.c: ... here.
10717 * win32-low.c (win32_thread_info): Move to ...
10718 * win32-low.h: ... here.
10719 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10720 win32-arm-low.c and wincecompat.c.
10721 (all:): Add $EXEEXT.
10722 (install-only:): Likewise.
10723 (gdbserver:): Likewise.
10724 (gdbreplay:): Likewise.
10725 * config.in: Regenerate.
10726 * configure: Regenerate.
10727
10728 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10729
10730 * win32-low.c: Rename typedef thread_info to
10731 win32_thread_info throughout.
10732
10733 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10734
10735 * win32-i386-low.c: Rename to ...
10736 * win32-low.c: ... this.
10737 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10738 * Makefile.in: Likewise.
10739
10740 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10741
10742 * remote-utils.c (monitor_output): Constify msg parameter.
10743 * server.h (monitor_output): Likewise.
10744 * win32-i386-low.c (handle_output_debug_string): New.
10745 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10746 handle_output_debug_string.
10747 (get_child_debug_event): Likewise.
10748
10749 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10750
10751 * server.c (main): Correct strtoul check.
10752
10753 2007-03-27 Jon Ringle <jon@ringle.org>
10754
10755 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10756
10757 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10758
10759 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10760
10761 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10762
10763 * terminal.h: Check HAVE_SGTTY_H.
10764
10765 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10766
10767 * remote-utils.c (remote_open): Print out the assigned port number.
10768
10769 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10770
10771 * remote-utils.c (monitor_output): New function.
10772 * server.c (debug_threads): Define here.
10773 (monitor_show_help): New function.
10774 (handle_query): Handle qRcmd.
10775 (main): Do not handle 'd' packet.
10776 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10777 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10778 of debug_threads.
10779
10780 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10781
10782 * Makefile.in (EXEEXT): New.
10783 (clean): Use $(EXEEXT).
10784
10785 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10786
10787 * target.h (target_ops): Rename send_signal to request_interrupt,
10788 and remove enum target_signal parameter.
10789 * linux-low.c (linux_request_interrupt): Rename from
10790 linux_send_signal, and always send SIGINT.
10791 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10792 and always send SIGINT.
10793 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10794 of send_signal.
10795 (input_interrupt): Likewise.
10796
10797 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10798
10799 * server.c (get_features_xml): Check if target implemented
10800 arch_string.
10801 * win32-i386-low.c (win32_arch_string): New.
10802 (win32_target_ops): Add win32_arch_string as arch_string member.
10803
10804 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10805
10806 * spu-low.c (spu_arch_string): New.
10807 (spu_target_ops): Add spu_arch_string.
10808
10809 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10810
10811 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10812 * configure.ac: Do not check for terminal.h.
10813 * configure, config.in: Regenerated.
10814
10815 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * Makefile.in (OBS): Add $(XML_BUILTIN).
10818 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10819 (clean): Update.
10820 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10821 (arm-with-iwmmxt.c): New.
10822 * config.in, configure: Regenerate.
10823 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10824 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10825 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10826 (arm*-*-linux*): Add iWMMXt and regset support.
10827 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10828 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10829 (arm_store_wmmxregset, target_regsets): New.
10830 * server.c (get_features_xml): Take annex argument. Check builtin
10831 XML documents.
10832 (handle_query): Handle multiple annexes.
10833
10834 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10835
10836 * remote-utils.c [USE_WIN32API] (read, write): Define.
10837 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10838 write.
10839
10840 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10841
10842 * linux-i386-low.c (the_low_target): Set arch_string.
10843 * linux-x86-64-low.c (the_low_target): Likewise.
10844 * linux-low.c (linux_arch_string): New.
10845 (linux_target_ops): Add it.
10846 * linux-low.h (struct linux_target_ops): Add arch_string.
10847 * server.c (write_qxfer_response): Use const void * for DATA.
10848 (get_features_xml): New.
10849 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10850 * target.h (struct target_ops): Add arch_string method.
10851
10852 2007-01-03 Denis Pilat <denis.pilat@st.com>
10853 Daniel Jacobowitz <dan@codesourcery.com>
10854
10855 * linux-low.c (linux_kill): Handle being called with no threads.
10856 * win32-i386-low.c (win32_kill): Likewise.
10857 (get_child_debug_event): Clear current_process_handle.
10858
10859 2006-12-30 Denis PILAT <denis.pilat@st.com>
10860 Daniel Jacobowitz <dan@codesourcery.com>
10861
10862 * remote-utils.c (remote_open): Check the type of specified
10863 serial port devices before opening them.
10864 * server.c (main): Kill the inferior if an error occurs during
10865 the first remote_open.
10866
10867 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10868
10869 * README: Update supported targets.
10870
10871 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10872
10873 * Makefile.in (clean): Remove reg-mips64.c.
10874 (reg-mips64.c, reg-mips64.o): New rules.
10875 * configure.srv: Handle mips64. Include regset support for mips.
10876 * linux-mips-low.c (union mips_register): New.
10877 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10878 (mips_breakpoint, mips_breakpoint_at): Use int.
10879 (mips_collect_register, mips_supply_register)
10880 (mips_collect_register_32bit, mips_supply_register_32bit)
10881 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10882 (mips_store_fpregset, target_regsets): New.
10883 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10884
10885 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10886
10887 * configure.srv: Add target "spu*-*-*".
10888 * Makefile.in (clean): Remove reg-spu.c.
10889 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10890 * spu-low.c: New file.
10891
10892 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10893
10894 * configure.ac: Correct td_thr_tls_get_addr test.
10895 * configure: Regenerated.
10896
10897 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10898
10899 * linux-low.c (linux_wait_for_event): Reformat. Use the
10900 pass_signals array.
10901 * remote-utils.c (decode_address_to_semicolon): New.
10902 * server.c (pass_signals, handle_general_set): New.
10903 (handle_query): Mention QPassSignals for qSupported.
10904 (main): Call handle_general_set.
10905 * server.h (pass_signals, decode_address_to_semicolon): New.
10906
10907 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10908
10909 * server.c (handle_query): Correct error handling for read_auxv.
10910
10911 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10912
10913 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10914 and srv_linux_thread_db to yes.
10915 * linux-s390-low.c (s390_fill_gregset): New function.
10916 (target_regsets): Define data structure.
10917
10918 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10919
10920 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10921 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10922 * config.in, configure: Regenerated.
10923 * inferiors.c (gdb_id_to_thread): New function.
10924 (gdb_id_to_thread_id): Use it.
10925 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10926 * linux-low.h (struct process_info): Add th member.
10927 (thread_db_get_tls_address): New prototype.
10928 * remote-utils.c (decode_address): Make non-static.
10929 * server.c (handle_query): Handle qGetTLSAddr.
10930 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10931 * target.h (struct target_ops): Add get_tls_address.
10932 * thread-db.c (maybe_attach_thread): Save the thread handle.
10933 (thread_db_get_tls_address): New.
10934
10935 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10936
10937 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10938 (linux_resume_one_process): Take a siginfo_t *. Update all
10939 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10940 (struct pending_signals): Add a siginfo_t.
10941 (linux_wait_for_process): Always set last_status.
10942 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10943 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10944 * linux-low.h (struct process_info): Add last_status.
10945
10946 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10947
10948 * remote-utils.c (try_rle): New function.
10949 (putpkt_binary): Use it.
10950
10951 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10952
10953 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10954 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10955 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10956 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10957 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10958 point registers.
10959
10960 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10961
10962 * server.c (terminal_fd): New variable.
10963 (old_foreground_pgrp): Likewise.
10964 (restore_old_foreground_pgrp): New function.
10965 (start_inferior): Record the terminal file descriptor in terminal_fd
10966 and its original foreground group in old_foreground_pgrp. Register
10967 restore_old_foreground_pgrp with atexit().
10968
10969 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10970
10971 * server.c (handle_query): Correct qPart to qXfer.
10972
10973 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10974
10975 * configure.ac: Check for more headers which are missing on
10976 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10977 * configure.srv: Add Cygwin and mingw32.
10978 * remote-utils.c: Don't include headers unconditionally which
10979 are missing on mingw32. Include <winsock.h> for mingw32.
10980 (remote_open): Adjust for mingw32 support. Flush
10981 standard error after writing to it.
10982 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10983 (unblock_async_io, enable_async_io, disable_async_io)
10984 (readchar, getpkt): Update for Winsock support.
10985 (prepare_resume_reply): Expect a protocol signal number.
10986 * server.c: Disable <sys/wait.h> on mingw32.
10987 (start_inferior): Adjust for mingw32 support. Flush
10988 standard error after writing to it.
10989 (attach_inferior): Likewise. Use protocol signal
10990 numbers.
10991 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10992 and names.
10993 * win32-i386-low.c: New file.
10994 * Makefile.in (XM_CLIBS): Set.
10995 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10996 (win32-i386-low.o): New dependency rule.
10997 * linux-low.c (linux_wait): Use target signal numbers.
10998 * target.h (struct target_ops): Doc fix.
10999 * server.h (target_signal_to_name): New prototype.
11000 * gdbreplay.c: Don't include headers unconditionally which
11001 are missing on mingw32. Include <winsock.h> for mingw32.
11002 (remote_close, remote_open): Adjust for Winsock support.
11003 * configure, config.in: Regenerated.
11004
11005 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11006
11007 * server.c (decode_xfer_read, write_qxfer_response): New.
11008 (handle_query): Take a packet length argument. Handle
11009 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11010 the qSupported response.
11011 (main): Update call to handle_query.
11012
11013 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11014
11015 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11016 (putpkt_binary): Renamed from putpkt and adjusted for binary
11017 data.
11018 (putpkt): New wrapper for putpkt_binary.
11019 (readchar): Don't mask off the high bit.
11020 (decode_X_packet): New function.
11021 * server.c (main): Call putpkt_binary if a handler sets the packet
11022 length. Save the length of the incoming packet. Handle 'X'.
11023 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11024
11025 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11026
11027 * server.c (handle_query): Handle qSupported.
11028
11029 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11030
11031 * remote-utils.c (all_symbols_looked_up): New variable.
11032 (look_up_one_symbol): Check it.
11033 * server.h (look_up_one_symbol): New declaration.
11034 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11035
11036 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11037
11038 * Makefile.in (linux-arm-low.o): Update dependencies.
11039 * linux-arm-low.c: Include "gdb_proc_service.h".
11040 (PTRACE_GET_THREAD_AREA): Define.
11041 (ps_get_thread_area): New function.
11042
11043 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11044
11045 * configure.srv (m68k*-*-uclinux*): New target.
11046 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11047 (linux_resume_one_process): Remove extraneous cast.
11048 (linux_read_offsets): New.
11049 (linux_target_op): Add linux_read_offsets on mmuless systems.
11050 * server.c (handle_query): Add qOffsets logic.
11051 * target.h (struct target_ops): Add read_offsets.
11052
11053 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11054
11055 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11056 (PTRACE_GET_THREAD_AREA): Define.
11057 (ps_get_thread_area): New function.
11058 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11059 (linux-x86-64-low.o): Update.
11060
11061 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11062
11063 * configure.ac: Remove checks for prfpregset_t.
11064 * gdb_proc_service.h: New file.
11065 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11066 new "gdb_proc_service.h".
11067 * proc-service.c: Likewise.
11068 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11069 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11070 * Makefile.in (gdb_proc_service_h): Updated.
11071 * configure, config.in: Regenerated.
11072
11073 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11074
11075 * remote-utils.c (prepare_resume_reply): Move declaration
11076 of gdb_id_from_wait to the top of the block.
11077
11078 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11079
11080 * linux-low.c (regsets_store_inferior_registers): Read the regset
11081 from the target before filling it.
11082
11083 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11084
11085 * server.c (attach_inferior): Return SIGTRAP for a successful
11086 attach.
11087
11088 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11089
11090 * Makefile.in (OBS): Add version.o.
11091 (STAGESTUFF): Delete.
11092 (version.o): Add dependencies.
11093 (version.c): Replace rule.
11094 (clean): Remove version.c.
11095 * server.c (gdbserver_version): New.
11096 (gdbserver_usage): Use printf.
11097 (main): Handle --version and --help.
11098 * server.h (version, host_name): Add declarations.
11099
11100 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11101
11102 * linux-arm-low.c:
11103 * linux-arm-low.c:
11104 * inferiors.c:
11105 * i387-fp.h:
11106 * i387-fp.c:
11107 * gdbreplay.c:
11108 * regcache.c:
11109 * proc-service.c:
11110 * mem-break.h:
11111 * mem-break.c:
11112 * linux-x86-64-low.c:
11113 * linux-sh-low.c:
11114 * linux-s390-low.c:
11115 * linux-ppc64-low.c:
11116 * linux-ppc-low.c:
11117 * linux-mips-low.c:
11118 * linux-m68k-low.c:
11119 * linux-m32r-low.c:
11120 * linux-low.h:
11121 * linux-low.c:
11122 * linux-ia64-low.c:
11123 * linux-i386-low.c:
11124 * linux-crisv32-low.c:
11125 * thread-db.c:
11126 * terminal.h:
11127 * target.h:
11128 * target.c:
11129 * server.h:
11130 * server.c:
11131 * remote-utils.c:
11132 * regcache.h:
11133 * utils.c:
11134 * Makefile.in:
11135 * configure.ac:
11136 * gdbserver.1: Add (C) after Copyright. Update the FSF
11137 address.
11138
11139 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11140
11141 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11142 (arm_breakpoint_at): Recognize both breakpoints.
11143 (the_low_target): Use the correct breakpoint instruction.
11144
11145 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11146
11147 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11148 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11149 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11150 (the_low_target): Update.
11151
11152 2005-10-25 Andreas Schwab <schwab@suse.de>
11153
11154 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11155
11156 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11157 (ia64_num_regs): Reduce to 462.
11158
11159 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11160
11161 * acinclude.m4: Correct quoting.
11162 * aclocal.m4: Regenerated.
11163
11164 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11165 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11166 (thread_db_init): Call thread_db_err_str.
11167 * configure.ac: Check for TD_VERSION.
11168 * config.in, configure: Regenerated.
11169
11170 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11171
11172 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11173
11174 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11175
11176 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11177 is not available. Define HAVE_PTRACE_GETREGS if it is.
11178 * config.in, configure: Regenerated.
11179 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11180 * linux-i386-low.c, linux-m68k-low.c: Update to use
11181 HAVE_PTRACE_GETREGS.
11182 * linux-low.c (regsets_fetch_inferior_registers)
11183 (regsets_store_inferior_registers): Only return 0 if we processed
11184 GENERAL_REGS.
11185 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11186 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11187
11188 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11189
11190 * inferiors.c (struct thread_info): Add gdb_id.
11191 (add_thread): Add gdb_id argument.
11192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11193 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11194 calls to add_thread.
11195 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11196 * server.c (handle_query): Use thread_to_gdb_id.
11197 (handle_v_cont, main): Use gdb_id_to_thread_id.
11198 * server.h (add_thread): Update prototype.
11199 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11200 prototypes.
11201
11202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11203
11204 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11205 left-padded registers.
11206 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11207 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11208
11209 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11210
11211 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11212 * configure: Regenerate.
11213 * config.in: Regenerate.
11214 * server.h (NEED_DECLARATION_STRERROR):
11215 Replace with !HAVE_DECL_STRERROR.
11216
11217 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11218
11219 * linux-low.c (linux_wait, linux_send_signal): Don't test
11220 an unsigned long variable for > 0 if it could be MAX_ULONG.
11221 * server.c (myresume): Likewise.
11222 * target.c (set_desired_inferior): Likewise.
11223
11224 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11225
11226 * configure.ac: Simplify and improve check for socklen_t.
11227 * configure, config.in: Regenerate.
11228
11229 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11230
11231 * acconfig.h: Remove.
11232 * configure.ac: Add a test for socklen_t. Use three-argument
11233 AC_DEFINE throughout.
11234 * config.in: Regenerated using autoheader 2.59.
11235 * configure: Regenerated.
11236
11237 * gdbreplay.c (socklen_t): Provide a default.
11238 (remote_open): Use socklen_t.
11239 * remote-utils.c (socklen_t): Provide a default.
11240 (remote_open): Use socklen_t.
11241 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11242 unsigned char.
11243
11244 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11245 char for buffers.
11246 * linux-low.c (linux_read_memory, linux_write_memory)
11247 (linux_read_auxv): Likewise.
11248 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11249 (check_mem_write): Likewise.
11250 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11251 Likewise.
11252 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11253 (registers_from_string, register_data): Likewise.
11254 * server.c (handle_query, main): Likewise.
11255 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11256 (decode_M_packet): Likewise.
11257 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11258 * target.h (struct target_ops): Update read_memory, write_memory,
11259 and read_auxv.
11260 (read_inferior_memory, write_inferior_memory): Update.
11261 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11262 to unsigned char *.
11263 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11264 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11265 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11266 linux-s390-low.c, linux-sh-low.c: Update for changes in
11267 read_inferior_memory and the_low_target->breakpoint.
11268
11269 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11270
11271 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11272 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11273 * configure.srv: Add powerpc64-*-linux*.
11274 * linux-ppc64-low.c: New file.
11275
11276 2005-05-23 Orjan Friberg <orjanf@axis.com>
11277
11278 * linux-cris-low.c: New file with support for CRIS.
11279 * linux-crisv32-low.c: Ditto for CRISv32.
11280 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11281 (clean): Add reg-cris.c and reg-crisv32.c.
11282 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11283 reg-crisv32.o, and reg-crisv32.c to make rules.
11284 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11285 recognized targets.
11286
11287 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11288
11289 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11290 of sizeof (PTRACE_XFER_TYPE).
11291 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11292
11293 2005-05-12 Orjan Friberg <orjanf@axis.com>
11294
11295 * target.h (struct target_ops): Add insert_watchpoint,
11296 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11297 pointers for hardware watchpoint support.
11298 * linux-low.h (struct linux_target_ops): Ditto.
11299 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11300 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11301 to linux_target_ops.
11302 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11303 reply packet.
11304 * server.c (main): Recognize 'Z' and 'z' packets.
11305
11306 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11307
11308 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11309 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11310 (the_low_target): Add new members.
11311
11312 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11313
11314 * proc-service.c (ps_lgetregs): Search all_processes instead of
11315 all_threads.
11316
11317 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11318
11319 * server.c (start_inferior): Change return type to int.
11320 (attach_inferior): Change sigptr to int *.
11321 (handle_v_cont, handle_v_requests): Change signal to int *.
11322 (main): Change signal to int.
11323
11324 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11325
11326 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11327 * configure.srv: Add m32r*-*-linux*.
11328 * linux-m32r-low.c: New file.
11329
11330 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11331
11332 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11333
11334 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11337 Take unsigned long arguments for PIDs.
11338 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11339 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11340 (wait_for_sigstop, linux_resume_one_process)
11341 (regsets_fetch_inferior_registers, linux_send_signal)
11342 (linux_read_auxv): Likewise. Update the types of variables holding
11343 PIDs. Update format string specifiers.
11344 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11345 * remote-utils.c (prepare_resume_reply): Likewise.
11346 * server.c (cont_thread, general_thread, step_thread)
11347 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11348 unsigned long.
11349 (handle_query): Update format specifiers.
11350 (handle_v_cont, main): Use strtoul for thread IDs.
11351 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11352 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11353 (general_thread, step_thread, thread_from_wait)
11354 (old_thread_from_wait): Update.
11355 * target.h (struct thread_resume): Use unsigned long for THREAD.
11356 (struct target_ops): Use unsigned long for arguments to attach and
11357 thread_alive.
11358
11359 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * acinclude.m4: Include bfd/bfd.m4 directly.
11362 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11363 <agriffis@toolchain.org>.
11364 * aclocal.m4, configure: Regenerated.
11365
11366 2005-01-07 Andrew Cagney <cagney@gnu.org>
11367
11368 * configure.ac: Rename configure.in, require autoconf 2.59.
11369 * configure: Re-generate.
11370
11371 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11372
11373 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11374 LIBS when finished.
11375 * aclocal.m4: Regenerated.
11376 * configure: Regenerated.
11377
11378 2004-11-21 Andreas Schwab <schwab@suse.de>
11379
11380 * linux-m68k-low.c (m68k_num_gregs): Define.
11381 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11382 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11383 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11384 (m68k_breakpoint_at): New. Add to the_low_target.
11385
11386 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11387 srv_linux_thread_db to yes.
11388
11389 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11390
11391 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11392 (ARCH_SET_FS): Likewise.
11393 (ARCH_GET_FS): Likewise.
11394 (ARCH_GET_GS): Likewise.
11395
11396 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11397
11398 * linux-i386-low.c (ps_get_thread_area): New.
11399 * linux-x86-64-low.c (ps_get_thread_area): New.
11400 * linux-low.c: Include <sys/syscall.h>.
11401 (linux_kill_one_process): Don't kill the first thread here.
11402 (linux_kill): Kill the first thread here.
11403 (kill_lwp): New function.
11404 (send_sigstop, linux_send_signal): Use it.
11405 * proc-service.c: Clean up #ifdefs.
11406 (fpregset_info): Delete.
11407 (ps_lgetregs): Update and enable implementation.
11408 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11409 implementations.
11410 * remote-utils.c (struct sym_cache, symbol_cache): New.
11411 (input_interrupt): Print a clearer message.
11412 (async_io_enabled): New variable.
11413 (enable_async_io, disable_async_io): Use it. Update comments.
11414 (look_up_one_symbol): Use the symbol cache.
11415 * thread-db.c (thread_db_look_up_symbols): New function.
11416 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11417
11418 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11419
11420 * configure.in: Test for -rdynamic.
11421 * configure: Regenerated.
11422 * Makefile (INTERNAL_LDFLAGS): New.
11423 (gdbserver, gdbreplay): Use it.
11424
11425 2004-09-02 Andrew Cagney <cagney@gnu.org>
11426
11427 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11428
11429 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11430
11431 * linux-low.c (linux_wait): Clear all_processes list also.
11432
11433 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11434
11435 * linux-low.c: Include <errno.h>. Remove extern declaration of
11436 errno.
11437
11438 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11439
11440 * gdbreplay.c, server.h, utils.c: Update copyright years.
11441
11442 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11443
11444 * server.c (main): Print child status or termination signal from
11445 variable 'signal', not 'sig'.
11446
11447 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11448
11449 * linux-low.c (linux_read_memory): Change return type to
11450 int. Check for and return error from ptrace().
11451 * target.c (read_inferior_memory): Change return type to int. Pass
11452 back return status from the_target->read_memory().
11453 * target.h (struct target_ops): Adapt *read_memory() prototype.
11454 Update comment.
11455 (read_inferior_memory): Adapt prototype.
11456 * server.c (main): Return an error packet if
11457 read_inferior_memory() returns an error.
11458
11459 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11460
11461 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11462 Unify with other clean targets.
11463
11464 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11465
11466 * server.c (handle_v_cont): Call set_desired_inferior.
11467
11468 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11469
11470 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11471
11472 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11473
11474 * linux-low.c (linux_wait): Unblock async I/O.
11475 (linux_resume): Block and enable async I/O.
11476 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11477 * server.h (block_async_io, unblock_async_io): Add prototypes.
11478
11479 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11480
11481 * remote-utils.c (remote_open): Print a status notice after
11482 opening a TCP port.
11483 * server.c (attach_inferior): Print a status notice after
11484 attaching.
11485
11486 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11487
11488 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11489
11490 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11491
11492 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11493 error packet.
11494 * server.c, target.h: Update copyright years.
11495
11496 2004-02-25 Roland McGrath <roland@redhat.com>
11497
11498 * target.h (struct target_ops): New member `read_auxv'.
11499 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11500 * linux-low.c (linux_read_auxv): New function.
11501 (linux_target_ops): Initialize `read_auxv' member to that.
11502
11503 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11504
11505 Committed by Jim Blandy <jimb@redhat.com>.
11506
11507 * linux-s390-low.c (s390_num_regs): Update.
11508 (s390_regmap): Remove control registers. Use __s390x__ predefine
11509 instead of GPR_SIZE to distiguish s390 and s390x targets.
11510
11511 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11512
11513 * linux-low.c: Update copyright year.
11514 (check_removed_breakpoint): Clear pending_is_breakpoint.
11515 (linux_set_resume_request, linux_queue_one_thread)
11516 (resume_status_pending_p): New functions.
11517 (linux_continue_one_thread): Use process->resume.
11518 (linux_resume): Only resume threads if there are no pending events.
11519 * linux-low.h (struct process_info): Add resume request
11520 pointer.
11521
11522 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11523
11524 * regcache.c (new_register_cache): Clear the allocated register
11525 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11526
11527 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11528
11529 * linux-low.c (linux_resume): Take a struct thread_resume *
11530 argument.
11531 (linux_wait): Update call.
11532 (resume_ptr): New static variable.
11533 (linux_continue_one_thread): Renamed from
11534 linux_continue_one_process. Use resume_ptr.
11535 (linux_resume): Use linux_continue_one_thread.
11536 * server.c (handle_v_cont, handle_v_requests): New functions.
11537 (myresume): New function.
11538 (main): Handle 'v' case.
11539 * target.h (struct thread_resume): New type.
11540 (struct target_ops): Change argument of "resume" to struct
11541 thread_resume *.
11542 (myresume): Delete macro.
11543
11544 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11545
11546 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11547 (uninstall): Support DESTDIR.
11548
11549 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11550
11551 * configure.srv: Add xscale*linux copy of arm*linux entry.
11552
11553 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11554
11555 * linux-arm-low.c (arm_reinsert_addr): New function.
11556 (the_low_target): Add arm_reinsert_addr.
11557
11558 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11559
11560 * mem-break.c: Remove whitespace at end of file.
11561
11562 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11563
11564 * configure.in: Check whether we need to prototype strerror.
11565 * server.h: Optionally prototype strerror.
11566 * gdbreplay.c (perror_with_name): Use strerror.
11567 * linux-low.c (linux_attach_lwp): Use strerror.
11568 * utils.c (perror_with_name): Use strerror.
11569 * config.in, configure: Regenerated.
11570
11571 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11572
11573 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11574 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11575
11576 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11577
11578 * Makefile.in (SFILES): Update.
11579 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11580 low-sun3.c: Remove files.
11581
11582 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11583
11584 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11585 (linux_detach_one_process, linux_detach): New functions.
11586 (linux_target_ops): Add linux_detach.
11587 * server.c (main): Handle 'D' packet.
11588 * target.h (struct target_ops): Add "detach" member.
11589 (detach_inferior): Define.
11590
11591 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11592
11593 From Kelley Cook <kelleycook@wideopenwest.com>:
11594 * configure.srv: Accept i[34567]86 variants.
11595
11596 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11597
11598 * linux-low.c (linux_wait_for_event): Correct comment typos.
11599 (linux_resume_one_process): Call check_removed_breakpoint.
11600 (linux_send_signal): New function.
11601 (linux_target_ops): Add linux_send_signal.
11602 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11603 of kill.
11604 * target.h (struct target_ops): Add send_signal.
11605
11606 2003-05-29 Jim Blandy <jimb@redhat.com>
11607
11608 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11609 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11610 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11611 away part of the register's value.
11612
11613 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11614
11615 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11616 (linux_wait_for_event, linux_init_signals): Likewise.
11617
11618 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11619
11620 * configure.in: Check for stdlib.h.
11621 * configure: Regenerated.
11622 * config.in: Regenerated.
11623
11624 2003-01-04 Andreas Schwab <schwab@suse.de>
11625
11626 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11627
11628 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11629
11630 * Makefile.in: Remove obsolete code.
11631
11632 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11633
11634 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11635 defined(PT_FPR0_HI).
11636
11637 2002-11-17 Stuart Hughes <seh@zee2.com>
11638
11639 * linux-arm-low.c (arm_num_regs): Increase.
11640 (arm_regmap): Include status register.
11641
11642 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11643
11644 * linux-low.c (register_addr): Remove incorrect -1 check.
11645
11646 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11647
11648 * linux-low.c (linux_create_inferior): Call setpgid. Return
11649 the new PID.
11650 (unstopped_p, linux_signal_pid): Remove.
11651 (linux_target_ops): Remove linux_signal_pid.
11652 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11653 global instead of target method.
11654 * target.h (struct target_ops): Remove signal_pid. Update comment
11655 for create_inferior.
11656 * server.c (signal_pid): New variable.
11657 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11658 gdbserver. Set the child to be the foreground process group.
11659 (attach_inferior): Set signal_pid.
11660
11661 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11662
11663 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11664
11665 2002-08-20 Jim Blandy <jimb@redhat.com>
11666
11667 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11668 default for this.
11669
11670 2002-08-01 Andrew Cagney <cagney@redhat.com>
11671
11672 * Makefile.in: Make chill references obsolete.
11673
11674 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11675
11676 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11677 * configure: Regenerate.
11678 * config.in: Regenerate.
11679
11680 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11681
11682 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11683 (perror_with_name, remote_close, remote_open, expect, play): Static.
11684
11685 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11686
11687 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11688 byte offsets instead of an array of indexes.
11689 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11690
11691 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11692
11693 * regcache.c: Add comment.
11694
11695 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11696
11697 * thread-db.c: New file.
11698 * proc-service.c: New file.
11699 * acinclude.m4: New file.
11700 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11701 proc-service.o, and thread-db.o.
11702 (linux-low.o): Add USE_THREAD_DB.
11703 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11704 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11705 * aclocal.m4: Regenerated.
11706 * config.in: Regenerated.
11707 * configure: Regenerated.
11708 * configure.in: Check for proc_service.h, sys/procfs.h,
11709 thread_db.h, and linux/elf.h headrs.
11710 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11711 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11712 Check for -lthread_db and thread support.
11713 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11714 PowerPC, and SuperH.
11715 * i387-fp.c: Constify arguments.
11716 * i387-fp.h: Likewise.
11717 * inferiors.c: (struct thread_info): Renamed from
11718 `struct inferior_info'. Remove PID member. Use generic inferior
11719 list header. All uses updated.
11720 (inferiors, signal_pid): Removed.
11721 (all_threads): New variable.
11722 (get_thread): Define.
11723 (add_inferior_to_list): New function.
11724 (for_each_inferior): New function.
11725 (change_inferior_id): New function.
11726 (add_inferior): Removed.
11727 (remove_inferior): New function.
11728 (add_thread): New function.
11729 (free_one_thread): New function.
11730 (remove_thread): New function.
11731 (clear_inferiors): Use for_each_inferior and free_one_thread.
11732 (find_inferior): New function.
11733 (find_inferior_id): New function.
11734 (inferior_target_data): Update argument type.
11735 (set_inferior_target_data): Likewise.
11736 (inferior_regcache_data): Likewise.
11737 (set_inferior_regcache_data): Likewise.
11738 * linux-low.c (linux_bp_reinsert): Remove.
11739 (all_processes, stopping_threads, using_thrads)
11740 (struct pending_signals, debug_threads, pid_of): New.
11741 (inferior_pid): Replace with macro.
11742 (struct inferior_linux_data): Remove.
11743 (get_stop_pc, add_process): New functions.
11744 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11745 Use add_process and add_thread.
11746 (linux_attach_lwp): New function, based on old linux_attach. Use
11747 add_process and add_thread. Set stop_expected for new threads.
11748 (linux_attach): New function.
11749 (linux_kill_one_process): New function.
11750 (linux_kill): Kill all LWPs.
11751 (linux_thread_alive): Use find_inferior_id.
11752 (check_removed_breakpoints, status_pending_p): New functions.
11753 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11754 Update. Use WNOHANG. Wait for cloned processes also. Update process
11755 struct for the found process.
11756 (linux_wait_for_event): New function.
11757 (linux_wait): Use it. Support LWPs.
11758 (send_sigstop, wait_for_sigstop, stop_all_processes)
11759 (linux_resume_one_process, linux_continue_one_process): New functions.
11760 (linux_resume): Support LWPs.
11761 (REGISTER_RAW_SIZE): Remove.
11762 (fetch_register): Use register_size instead. Call supply_register.
11763 (usr_store_inferior_registers): Likewise. Call collect_register.
11764 Fix recursive case.
11765 (regsets_fetch_inferior_registers): Improve error message.
11766 (regsets_store_inferior_registers): Add debugging.
11767 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11768 (unstopped_p, linux_signal_pid): New functions.
11769 (linux_target_ops): Add linux_signal_pid.
11770 (linux_init_signals): New function.
11771 (initialize_low): Call it. Initialize using_threads.
11772 * regcache.c (inferior_regcache_data): Add valid
11773 flag.
11774 (get_regcache): Fetch registers lazily. Add fetch argument
11775 and update all callers.
11776 (regcache_invalidate_one, regcache_invalidate): New
11777 functions.
11778 (new_register_cache): Renamed from create_register_cache.
11779 Return the new regcache.
11780 (free_register_cache): Change argument to a void *.
11781 (registers_to_string, registers_from_string): Call get_regcache
11782 with fetch flag set.
11783 (register_data): Make static. Pass fetch flag to get_regcache.
11784 (supply_register): Call get_regcache with fetch flag clear.
11785 (collect_register): Call get_regcache with fetch flag set.
11786 (collect_register_as_string): New function.
11787 * regcache.h: Update.
11788 * remote-utils.c (putpkt): Flush after debug output and use
11789 stderr.
11790 Handle input interrupts while waiting for an ACK.
11791 (input_interrupt): Use signal_pid method.
11792 (getpkt): Flush after debug output and use stderr.
11793 (outreg): Use collect_register_as_string.
11794 (new_thread_notify, dead_thread_notify): New functions.
11795 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11796 and general_thread.
11797 (look_up_one_symbol): Flush after debug output.
11798 * server.c (step_thread, server_waiting): New variables.
11799 (start_inferior): Don't use signal_pid. Update call to mywait.
11800 (attach_inferior): Update call to mywait.
11801 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11802 (main): Don't fetch/store registers explicitly. Use
11803 set_desired_inferior. Support proposed ``Hs'' packet. Update
11804 calls to mywait.
11805 * server.h: Update.
11806 (struct inferior_list, struct_inferior_list_entry): New.
11807 * target.c (set_desired_inferior): New.
11808 (write_inferior_memory): Constify.
11809 (mywait): New function.
11810 * target.h: Update.
11811 (struct target_ops): New signal_pid method.
11812 (mywait): Removed macro, added prototype.
11813
11814 * linux-low.h (regset_func): Removed.
11815 (regset_fill_func, regset_store_func): New.
11816 (enum regset_type): New.
11817 (struct regset_info): Add type field. Use new operation types.
11818 (struct linux_target_ops): stop_pc renamed to get_pc.
11819 Add decr_pc_after_break and breakpoint_at.
11820 (get_process, get_thread_proess, get_process_thread)
11821 (strut process_info, all_processes, linux_attach_lwp)
11822 (thread_db_init): New.
11823
11824 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11825 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11826 (the_low_target): Add new members.
11827 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11828 (i386_store_fpxregset): Constify.
11829 (target_regsets): Add new kind identifier.
11830 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11831 (i386_set_pc): Add debugging.
11832 (i386_breakpoint_at): New function.
11833 (the_low_target): Add new members.
11834 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11835 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11836 (mips_breakpoint_at): New.
11837 (the_low_target): Add new members.
11838 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11839 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11840 (the_low_target): Add new members.
11841 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11842 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11843 (the_low_target): Add new members.
11844 * linux-x86-64-low.c (target_regsets): Add new kind
11845 identifier.
11846
11847 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11848
11849 From Martin Pool <mbp@samba.org>:
11850 * server.c (gdbserver_usage): New function.
11851 (main): Call it.
11852
11853 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11854
11855 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11856 stop_at -> stop_pc.
11857
11858 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11859
11860 * Makefile.in: Remove obsolete code.
11861
11862 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11863
11864 * linux-low.c (regsets_fetch_inferior_registers),
11865 (regsets_store_inferior_registers): Removed cast to int from
11866 ptrace() calls.
11867 * regcache.h: Added declaration of struct inferior_info.
11868
11869 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11870
11871 * inferiors.c (struct inferior_info): Add regcache_data.
11872 (add_inferior): Call create_register_cache.
11873 (clear_inferiors): Call free_register_cache.
11874 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11875 * regcache.c (struct inferior_regcache_data): New.
11876 (registers): Remove.
11877 (get_regcache): New function.
11878 (create_register_cache, free_register_cache): New functions.
11879 (set_register_cache): Don't initialize the register cache here.
11880 (registers_to_string, registers_from_string, register_data): Call
11881 get_regcache.
11882 * regcache.h: Add prototypes.
11883 * server.h: Likewise.
11884
11885 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11886
11887 * mem-break.c: New file.
11888 * mem-break.h: New file.
11889 * Makefile.in: Add mem-break.o rule; update server.h
11890 dependencies.
11891 * inferiors.c (struct inferior_info): Add target_data
11892 member.
11893 (clear_inferiors): Free target_data member if set.
11894 (inferior_target_data, set_inferior_target_data): New functions.
11895 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11896 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11897 * linux-low.c (linux_bp_reinsert): New variable.
11898 (struct inferior_linux_data): New.
11899 (linux_create_inferior): Use set_inferior_target_data.
11900 (linux_attach): Likewise. Call add_inferior.
11901 (linux_wait_for_one_inferior): New function.
11902 (linux_wait): Call it.
11903 (linux_write_memory): Add const.
11904 (initialize_low): Call set_breakpoint_data.
11905 * linux-low.h (struct linux_target_ops): Add breakpoint
11906 handling members.
11907 * server.c (attach_inferior): Remove extra add_inferior
11908 call.
11909 * server.h: Include mem-break.h. Update inferior.c
11910 prototypes.
11911 * target.c (read_inferior_memory)
11912 (write_inferior_memory): New functions.
11913 * target.h (read_inferior_memory)
11914 (write_inferior_memory): Change macros to prototypes.
11915 (struct target_ops): Update comments. Add const to write_memory
11916 definition.
11917
11918 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11919
11920 * linux-low.c (usr_store_inferior_registers): Support
11921 registers which are allowed to fail to store.
11922 * linux-low.h (linux_target_ops): Likewise.
11923 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11924 (ppc_cannot_store_register): FPSCR may not be storable.
11925
11926 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11927
11928 * server.h: Include <string.h> if HAVE_STRING_H.
11929 * ChangeLog: Correct paths in last ChangeLog entry.
11930
11931 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11932
11933 * linux-low.h: Remove obsolete prototypes.
11934 (struct linux_target_ops): New.
11935 (extern the_low_target): New.
11936 * linux-low.c (num_regs, regmap): Remove declarations.
11937 (register_addr): Use the_low_target explicitly.
11938 (fetch_register): Likewise.
11939 (usr_fetch_inferior_registers): Likewise.
11940 (usr_store_inferior_registers): Likewise.
11941 * linux-arm-low.c (num_regs): Remove.
11942 (arm_num_regs): Define.
11943 (arm_regmap): Renamed from regmap, made static.
11944 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11945 made static.
11946 (arm_cannot_store_register): Renamed from cannot_store_register,
11947 made static.
11948 (the_low_target): New.
11949 * linux-i386-low.c (num_regs): Remove.
11950 (i386_num_regs): Define.
11951 (i386_regmap): Renamed from regmap, made static.
11952 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11953 made static.
11954 (i386_cannot_store_register): Renamed from cannot_store_register,
11955 made static.
11956 (the_low_target): New.
11957 * linux-ia64-low.c (num_regs): Remove.
11958 (ia64_num_regs): Define.
11959 (ia64_regmap): Renamed from regmap, made static.
11960 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11961 made static.
11962 (ia64_cannot_store_register): Renamed from cannot_store_register,
11963 made static.
11964 (the_low_target): New.
11965 * linux-m68k-low.c (num_regs): Remove.
11966 (m68k_num_regs): Define.
11967 (m68k_regmap): Renamed from regmap, made static.
11968 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11969 made static.
11970 (m68k_cannot_store_register): Renamed from cannot_store_register,
11971 made static.
11972 (the_low_target): New.
11973 * linux-mips-low.c (num_regs): Remove.
11974 (mips_num_regs): Define.
11975 (mips_regmap): Renamed from regmap, made static.
11976 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11977 made static.
11978 (mips_cannot_store_register): Renamed from cannot_store_register,
11979 made static.
11980 (the_low_target): New.
11981 * linux-ppc-low.c (num_regs): Remove.
11982 (ppc_num_regs): Define.
11983 (ppc_regmap): Renamed from regmap, made static.
11984 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11985 made static.
11986 (ppc_cannot_store_register): Renamed from cannot_store_register,
11987 made static.
11988 (the_low_target): New.
11989 * linux-s390-low.c (num_regs): Remove.
11990 (s390_num_regs): Define.
11991 (s390_regmap): Renamed from regmap, made static.
11992 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11993 made static.
11994 (s390_cannot_store_register): Renamed from cannot_store_register,
11995 made static.
11996 (the_low_target): New.
11997 * linux-sh-low.c (num_regs): Remove.
11998 (sh_num_regs): Define.
11999 (sh_regmap): Renamed from regmap, made static.
12000 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12001 made static.
12002 (sh_cannot_store_register): Renamed from cannot_store_register,
12003 made static.
12004 (the_low_target): New.
12005 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12006 (the_low_target): New.
12007
12008 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12009
12010 * Makefile.in: Add stamp-h target.
12011 * configure.in: Create stamp-h.
12012 * configure: Regenerated.
12013
12014 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12015
12016 * inferiors.c: New file.
12017 * target.c: New file.
12018 * target.h: New file.
12019 * Makefile.in: Add target.o and inferiors.o. Update
12020 dependencies.
12021 * linux-low.c (inferior_pid): New static variable,
12022 moved from server.c.
12023 (linux_create_inferior): Renamed from create_inferior.
12024 Call add_inferior. Return 0 on success instead of a PID.
12025 (linux_attach): Renamed from myattach.
12026 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12027 (linux_thread_alive): Renamed from mythread_alive.
12028 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12029 child dies.
12030 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12031 (regsets_store_inferior_registers): Correct error message.
12032 Add missing ``return 0''.
12033 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12034 (linux_store_registers): Renamed from store_inferior_registers.
12035 (linux_read_memory): Renamed from read_inferior_memory.
12036 (linux_write_memory): Renamed from write_inferior_memory.
12037 (linux_target_ops): New structure.
12038 (initialize_low): Call set_target_ops ().
12039 * remote-utils.c (unhexify): New function.
12040 (hexify): New function.
12041 (input_interrupt): Send signals to ``signal_pid''.
12042 * server.c (inferior_pid): Remove.
12043 (start_inferior): Update create_inferior call.
12044 (attach_inferior): Call add_inferior.
12045 (handle_query): New function.
12046 (main): Call handle_query for `q' packets.
12047 * server.h: Include "target.h". Remove obsolete prototypes.
12048 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12049
12050 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12051
12052 * Makefile.in: Add WARN_CFLAGS. Update configury
12053 dependencies.
12054 * configure.in: Check for <string.h>
12055 * configure: Regenerate.
12056 * config.in: Regenerate.
12057 * gdbreplay.c: Include needed system headers.
12058 (remote_open): Remove strchr prototype.
12059 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12060 * regcache.c (supply_register): Change buf argument to const void *.
12061 (supply_register_by_name): Likewise.
12062 (collect_register): Change buf argument to void *.
12063 (collect_register_by_name): Likewise.
12064 * regcache.h: Add missing prototypes.
12065 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12066 * server.c (handle_query): New function.
12067 (attached): New static variable, moved out of main.
12068 (main): Quiet longjmp clobber warnings.
12069 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12070 * utils.c (error): Remove NORETURN.
12071 (fatal): Likewise.
This page took 0.28763 seconds and 5 git commands to generate.