Make aarch64_decode_adrp handle both ADR and ADRP instructions
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2
3 * Makefile.in (aarch64-insn.o): New rule.
4 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5
6 2015-09-21 Yao Qi <yao.qi@linaro.org>
7
8 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9
10 2015-09-21 Yao Qi <yao.qi@linaro.org>
11
12 * tracepoint.c (max_jump_pad_size): Remove.
13
14 2015-09-18 Yao Qi <yao.qi@linaro.org>
15
16 * linux-aarch64-low.c: Don't include sys/uio.h.
17 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
18
19 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
20
21 * tracepoint.c (eval_result_type): Change prototype.
22 (condition_true_at_tracepoint): Fix argument to compiled_cond.
23
24 2015-09-15 Pedro Alves <palves@redhat.com>
25
26 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
27 Check whether to report exec events instead of checking whether
28 multiprocess is enabled.
29
30 2015-09-15 Pedro Alves <palves@redhat.com>
31
32 PR remote/18965
33 * remote-utils.c (prepare_resume_reply): Merge
34 TARGET_WAITKIND_VFORK_DONE switch case with the
35 TARGET_WAITKIND_FORKED case.
36
37 2015-09-15 Yao Qi <yao.qi@linaro.org>
38
39 * server.c (handle_query): Check string comparison using
40 "else if" instead of "if".
41
42 2015-09-15 Yao Qi <yao.qi@linaro.org>
43
44 * server.c (vCont_supported): New global variable.
45 (handle_query): Set vCont_supported to 1 if "vContSupported+"
46 matches. Append ";vContSupported+" to own_buf.
47 (handle_v_requests): Append ";s;S" to own_buf if target supports
48 hardware single step or vCont_supported is false.
49 (capture_main): Set vCont_supported to zero.
50
51 2015-09-15 Yao Qi <yao.qi@linaro.org>
52
53 * linux-low.c (linux_supports_conditional_breakpoints): Rename
54 it to ...
55 (linux_supports_hardware_single_step): ... New function.
56 (linux_target_ops): Update.
57 * lynx-low.c (lynx_target_ops): Set field
58 supports_hardware_single_step to target_can_do_hardware_single_step.
59 * nto-low.c (nto_target_ops): Likewise.
60 * spu-low.c (spu_target_ops): Likewise.
61 * win32-low.c (win32_target_ops): Likewise.
62 * target.c (target_can_do_hardware_single_step): New function.
63 * target.h (struct target_ops) <supports_conditional_breakpoints>:
64 Remove. <supports_hardware_single_step>: New field.
65 (target_supports_conditional_breakpoints): Remove.
66 (target_supports_hardware_single_step): New macro.
67 (target_can_do_hardware_single_step): Declare.
68 * server.c (handle_query): Use target_supports_hardware_single_step
69 instead of target_supports_conditional_breakpoints.
70
71 2015-09-15 Yao Qi <yao.qi@linaro.org>
72
73 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
74 function.
75 (struct linux_target_ops the_low_target): Install
76 aarch64_linux_siginfo_fixup.
77
78 2015-09-11 Don Breazeal <donb@codesourcery.com>
79 Luis Machado <lgustavo@codesourcery.com>
80
81 * linux-low.c (linux_mourn): Static declaration.
82 (linux_arch_setup): Move in front of
83 handle_extended_wait.
84 (linux_arch_setup_thread): New function.
85 (handle_extended_wait): Handle exec events. Call
86 linux_arch_setup_thread. Make event_lwp argument a
87 pointer-to-a-pointer.
88 (check_zombie_leaders): Do not check stopped threads.
89 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
90 (linux_low_filter_event): Add lwp and thread for exec'ing
91 non-leader thread if leader thread has been deleted.
92 Refactor code into linux_arch_setup_thread and call it.
93 Pass child lwp pointer by reference to handle_extended_wait.
94 (linux_wait_for_event_filtered): Update comment.
95 (linux_wait_1): Prevent clobbering exec event status.
96 (linux_supports_exec_events): New function.
97 (linux_target_ops) <supports_exec_events>: Initialize new member.
98 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
99 new member.
100 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
101 * server.c (report_exec_events): New global variable.
102 (handle_query): Handle qSupported query for exec-events feature.
103 (captured_main): Initialize report_exec_events.
104 * server.h (report_exec_events): Declare new global variable.
105 * target.h (struct target_ops) <supports_exec_events>: New
106 member.
107 (target_supports_exec_events): New macro.
108 * win32-low.c (win32_target_ops) <supports_exec_events>:
109 Initialize new member.
110
111 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
112
113 * linux-low.c (linux_low_enable_btrace): Remove.
114 (linux_target_ops): Replace linux_low_enable_btrace with
115 linux_enable_btrace.
116
117 2015-09-03 Yao Qi <yao.qi@linaro.org>
118
119 * linux-aarch64-low.c (aarch64_insert_point): Call
120 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
121 returns true.
122
123 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
124
125 * linux-low.c (check_stopped_by_breakpoint): Use
126 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
127
128 2015-08-27 Pedro Alves <palves@redhat.com>
129
130 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
131
132 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
133
134 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
135 the XNEW-family equivalent.
136 (compile_bytecodes): Likewise.
137 * dll.c (loaded_dll): Likewise.
138 * event-loop.c (append_callback_event): Likewise.
139 (create_file_handler): Likewise.
140 (create_file_event): Likewise.
141 * hostio.c (handle_open): Likewise.
142 * inferiors.c (add_thread): Likewise.
143 (add_process): Likewise.
144 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
145 * linux-arm-low.c (arm_new_process): Likewise.
146 (arm_new_thread): Likewise.
147 * linux-low.c (add_to_pid_list): Likewise.
148 (linux_add_process): Likewise.
149 (handle_extended_wait): Likewise.
150 (add_lwp): Likewise.
151 (enqueue_one_deferred_signal): Likewise.
152 (enqueue_pending_signal): Likewise.
153 (linux_resume_one_lwp_throw): Likewise.
154 (linux_resume_one_thread): Likewise.
155 (linux_read_memory): Likewise.
156 (linux_write_memory): Likewise.
157 * linux-mips-low.c (mips_linux_new_process): Likewise.
158 (mips_linux_new_thread): Likewise.
159 (mips_add_watchpoint): Likewise.
160 * linux-x86-low.c (initialize_low_arch): Likewise.
161 * lynx-low.c (lynx_add_process): Likewise.
162 * mem-break.c (set_raw_breakpoint_at): Likewise.
163 (set_breakpoint): Likewise.
164 (add_condition_to_breakpoint): Likewise.
165 (add_commands_to_breakpoint): Likewise.
166 (clone_agent_expr): Likewise.
167 (clone_one_breakpoint): Likewise.
168 * regcache.c (new_register_cache): Likewise.
169 * remote-utils.c (look_up_one_symbol): Likewise.
170 * server.c (queue_stop_reply): Likewise.
171 (start_inferior): Likewise.
172 (queue_stop_reply_callback): Likewise.
173 (handle_target_event): Likewise.
174 * spu-low.c (fetch_ppc_memory): Likewise.
175 (store_ppc_memory): Likewise.
176 * target.c (set_target_ops): Likewise.
177 * thread-db.c (thread_db_load_search): Likewise.
178 (try_thread_db_load_1): Likewise.
179 * tracepoint.c (add_tracepoint): Likewise.
180 (add_tracepoint_action): Likewise.
181 (create_trace_state_variable): Likewise.
182 (cmd_qtdpsrc): Likewise.
183 (cmd_qtro): Likewise.
184 (add_while_stepping_state): Likewise.
185 * win32-low.c (child_add_thread): Likewise.
186 (get_image_name): Likewise.
187
188 2015-08-25 Yao Qi <yao.qi@linaro.org>
189
190 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
191
192 2015-08-25 Yao Qi <yao.qi@linaro.org>
193
194 * Makefile.in (aarch64-linux.o): New rule.
195 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
196 srv_tgtobj.
197 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
198 (aarch64_init_debug_reg_state): Make it extern.
199 (aarch64_linux_prepare_to_resume): Remove.
200
201 2015-08-25 Yao Qi <yao.qi@linaro.org>
202
203 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
204 lwp_arch_private_info and ptid_of_lwp.
205
206 2015-08-25 Yao Qi <yao.qi@linaro.org>
207
208 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
209 Find proc_info by find_process_pid. All callers updated.
210
211 2015-08-25 Yao Qi <yao.qi@linaro.org>
212
213 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
214 Remove.
215 (debug_reg_change_callback): Remove.
216 (aarch64_notify_debug_reg_change): Remove.
217
218 2015-08-25 Yao Qi <yao.qi@linaro.org>
219
220 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
221 Call current_lwp_ptid.
222
223 2015-08-25 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-low.c (debug_reg_change_callback): Use
226 debug_printf.
227
228 2015-08-25 Yao Qi <yao.qi@linaro.org>
229
230 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
231
232 2015-08-25 Yao Qi <yao.qi@linaro.org>
233
234 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
235
236 2015-08-25 Yao Qi <yao.qi@linaro.org>
237
238 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
239 the code.
240
241 2015-08-25 Yao Qi <yao.qi@linaro.org>
242
243 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
244 Remove.
245 (debug_reg_change_callback): Remove argument entry and add argument
246 lwp. Remove local variable thread. Don't print thread id in the
247 debugging output. Don't check whether pid of thread equals to pid.
248 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
249 iterate_over_lwps instead find_inferior.
250
251 2015-08-24 Pedro Alves <palves@redhat.com>
252
253 * inferiors.c (get_first_process): New function.
254 * inferiors.h (get_first_process): New declaration.
255 * remote-utils.c (read_ptid): Default to the first process in the
256 list, instead of to the current thread's process.
257
258 2015-08-24 Pedro Alves <palves@redhat.com>
259
260 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
261 * event-loop.c: Likewise.
262 * remote-utils.c: Likewise.
263 * tracepoint.c: Likewise.
264
265 2015-08-24 Pedro Alves <palves@redhat.com>
266
267 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
268 ptid_get_lwp.
269
270 2015-08-21 Pedro Alves <palves@redhat.com>
271
272 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
273 instead of literal 1.
274
275 2015-08-21 Pedro Alves <palves@redhat.com>
276
277 * tdesc.c (default_description): Explicitly zero-initialize.
278
279 2015-08-21 Pedro Alves <palves@redhat.com>
280
281 PR gdb/18749
282 * inferiors.c (remove_thread): Discard any pending stop reply for
283 this thread.
284 * server.c (remove_all_on_match_pid): Rename to ...
285 (remove_all_on_match_ptid): ... this. Work with a filter ptid
286 instead of a pid.
287 (discard_queued_stop_replies): Change parameter to a ptid. Now
288 extern.
289 (handle_v_kill, kill_inferior_callback, captured_main)
290 (process_serial_event): Adjust.
291 * server.h (discard_queued_stop_replies): Declare.
292
293 2015-08-21 Pedro Alves <palves@redhat.com>
294
295 * linux-low.c (wait_for_sigstop): Always switch to no thread
296 selected if the previously current thread dies.
297 * lynx-low.c (lynx_request_interrupt): Use the first thread's
298 process instead of the current thread's.
299 * remote-utils.c (input_interrupt): Don't check if there's no
300 current thread.
301 * server.c (gdb_read_memory, gdb_write_memory): If setting the
302 current thread to the general thread fails, error out.
303 (handle_qxfer_auxv, handle_qxfer_libraries)
304 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
305 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
306 (handle_query): Check if there's a thread selected instead of
307 checking whether there's any thread in the thread list.
308 (handle_qxfer_threads, handle_qxfer_btrace)
309 (handle_qxfer_btrace_conf): Don't error out early if there's no
310 thread in the thread list.
311 (handle_v_cont, myresume): Don't set the current thread to the
312 continue thread.
313 (process_serial_event) <Hg handling>: Also set thread_id if the
314 previous general thread is still alive.
315 (process_serial_event) <g/G handling>: If setting the current
316 thread to the general thread fails, error out.
317 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
318 thread's lwp instead of the current thread's.
319 * target.c (set_desired_thread): If the desired thread was not
320 found, leave the current thread pointing to NULL. Return an int
321 (boolean) indicating success.
322 * target.h (set_desired_thread): Change return type to int.
323
324 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
325
326 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
327 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
328 #includes.
329 (ps_get_thread_area): New function.
330
331 2015-08-19 Gary Benson <gbenson@redhat.com>
332
333 * hostio.c (handle_pread): Do not attempt to read more data
334 than hostio_reply_with_data can fit in a packet.
335
336 2015-08-18 Joel Brobecker <brobecker@adacore.com>
337
338 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
339
340 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
341
342 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
343
344 2015-08-06 Pedro Alves <palves@redhat.com>
345
346 * tracepoint.c (expr_eval_result): Now an int.
347
348 2015-08-06 Pedro Alves <palves@redhat.com>
349
350 * gdbthread.h (struct regcache): Forward declare.
351 (struct thread_info) <regcache_data>: Now a struct regcache
352 pointer.
353 * inferiors.c (inferior_regcache_data)
354 (set_inferior_regcache_data): Now work with struct regcache
355 pointers.
356 * inferiors.h (struct regcache): Forward declare.
357 (inferior_regcache_data, set_inferior_regcache_data): Now work
358 with struct regcache pointers.
359 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
360 (free_register_cache_thread): Remove struct regcache pointer
361 casts.
362
363 2015-08-06 Pedro Alves <palves@redhat.com>
364
365 * server.c (captured_main): On error, print the exception message
366 to stderr, and if run_once is set, throw a quit.
367
368 2015-08-06 Pedro Alves <palves@redhat.com>
369
370 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
371 the current thread.
372
373 2015-08-06 Pedro Alves <palves@redhat.com>
374
375 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
376 reading beyond the passed in buffer length.
377
378 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
379
380 * tracepoint.c (symbol_list) <required>: Remove.
381
382 2015-08-06 Pedro Alves <palves@redhat.com>
383
384 * linux-low.c (handle_extended_wait): Set the fork child's suspend
385 count if stopping and suspending threads.
386 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
387 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
388 (linux_detach): Complete an ongoing step-over.
389 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
390 throughout.
391 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
392 (linux_wait_1): If passing a signal to the inferior after
393 finishing a step-over, unsuspend and re-resume all lwps. If we
394 see a single-step event but the thread should be continuing, don't
395 pass the trap to gdb.
396 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
397 internal_error instead of gdb_assert.
398 (enqueue_pending_signal): New function.
399 (check_ptrace_stopped_lwp_gone): Add debug output.
400 (start_step_over): Use internal_error instead of gdb_assert.
401 (complete_ongoing_step_over): New function.
402 (linux_resume_one_thread): Don't resume a suspended thread.
403 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
404 it stepping.
405
406 2015-08-06 Pedro Alves <palves@redhat.com>
407
408 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
409 (linux_thread_alive): Use lwp_is_marked_dead.
410 (extended_event_reported): Delete.
411 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
412 instead of extended_event_reported.
413 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
414 as well.
415 (lwp_is_marked_dead): New function.
416 (lwp_running): Use lwp_is_marked_dead.
417 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
418 comment.
419
420 2015-08-06 Pedro Alves <palves@redhat.com>
421
422 * linux-low.c (linux_wait_1): Move fork event output out of the
423 !report_to_gdb check. Pass event_child->waitstatus to
424 target_waitstatus_to_string instead of ourstatus.
425
426 2015-08-04 Yao Qi <yao.qi@linaro.org>
427
428 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
429 if current_thread is 32 bit.
430
431 2015-08-04 Yao Qi <yao.qi@linaro.org>
432
433 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
434 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
435 * server.c (extended_protocol): Remove "static".
436 * server.h (extended_protocol): Declare it.
437
438 2015-08-04 Yao Qi <yao.qi@linaro.org>
439
440 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
441 both aarch64 and aarch32.
442 (aarch64_set_pc): Likewise.
443
444 2015-08-04 Yao Qi <yao.qi@linaro.org>
445
446 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
447 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
448 arm-with-neon.xml to srv_xmlfiles.
449 * linux-aarch64-low.c: Include linux-aarch32-low.h.
450 (is_64bit_tdesc): New function.
451 (aarch64_linux_read_description): New function.
452 (aarch64_arch_setup): Call aarch64_linux_read_description.
453 (regs_info): Rename to regs_info_aarch64.
454 (aarch64_regs_info): Return right regs_info.
455 (initialize_low_arch): Call initialize_low_arch_aarch32.
456
457 2015-08-04 Yao Qi <yao.qi@linaro.org>
458
459 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
460 * linux-aarch32-low.c: New file.
461 * linux-aarch32-low.h: New file.
462 * linux-arm-low.c (arm_fill_gregset): Move it to
463 linux-aarch32-low.c.
464 (arm_store_gregset): Likewise.
465 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
466 (arm_store_vfpregset): Call arm_store_vfpregset_num.
467 (arm_arch_setup): Check if PTRACE_GETREGSET works.
468 (regs_info): Rename to regs_info_arm.
469 (arm_regs_info): Return regs_info_aarch32 if
470 have_ptrace_getregset is 1 and target description is
471 arm_with_neon or arm_with_vfpv3.
472 (initialize_low_arch): Don't call init_registers_arm_with_neon.
473 Call initialize_low_arch_aarch32 instead.
474
475 2015-08-04 Yao Qi <yao.qi@linaro.org>
476
477 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
478 * linux-low.c: ... here.
479 * linux-low.h (have_ptrace_getregset): Declare it.
480
481 2015-08-04 Pedro Alves <palves@redhat.com>
482
483 * thread-db.c (struct thread_db): Use new typedefs.
484 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
485 CHK calls.
486 (disable_thread_event_reporting): Cast result of dlsym to
487 destination function pointer type.
488 (thread_db_mourn): Use td_ta_delete_ftype.
489
490 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
491
492 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
493 arch variant.
494 (CDX_BREAKPOINT): Define for R2.
495 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
496 (the_low_target): Add comments.
497
498 2015-07-30 Yao Qi <yao.qi@linaro.org>
499
500 * linux-arm-low.c (arm_hwcap): Remove it.
501 (arm_read_description): New local variable arm_hwcap. Don't
502 set arm_hwcap to zero.
503
504 2015-07-30 Yao Qi <yao.qi@linaro.org>
505
506 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
507 Use regcache->tdesc instead.
508 (arm_store_wmmxregset): Likewise.
509 (arm_fill_vfpregset): Likewise.
510 (arm_store_vfpregset): Likewise.
511
512 2015-07-30 Yao Qi <yao.qi@linaro.org>
513
514 * linux-arm-low.c: Include arch/arm.h.
515 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
516 (arm_store_gregset): Likewise.
517
518 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
519
520 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
521 ptrace's 4th parameter.
522
523 2015-07-27 Yao Qi <yao.qi@linaro.org>
524
525 * configure.srv (case aarch64*-*-linux*): Don't set
526 srv_linux_usrregs.
527
528 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
529
530 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
531 sys/ptrace.h.
532 * linux-arm-low.c: Likewise.
533 * linux-cris-low.c: Likewise.
534 * linux-crisv32-low.c: Likewise.
535 * linux-low.c: Likewise.
536 * linux-m68k-low.c: Likewise.
537 * linux-mips-low.c: Likewise.
538 * linux-nios2-low.c: Likewise.
539 * linux-s390-low.c: Likewise.
540 * linux-sparc-low.c: Likewise.
541 * linux-tic6x-low.c: Likewise.
542 * linux-tile-low.c: Likewise.
543 * linux-x86-low.c: Likewise.
544
545 2015-07-24 Pedro Alves <palves@redhat.com>
546
547 * config.in: Regenerate.
548 * configure: Regenerate.
549
550 2015-07-24 Pedro Alves <palves@redhat.com>
551
552 * acinclude.m4: Include ../ptrace.m4.
553 * configure.ac: Call GDB_AC_PTRACE.
554 * config.in, configure: Regenerate.
555
556 2015-07-24 Yao Qi <yao.qi@linaro.org>
557
558 * linux-low.c (linux_create_inferior): Remove setting to
559 proc->priv->new_inferior.
560 (linux_attach): Likewise.
561 (linux_low_filter_event): Likewise.
562 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
563
564 2015-07-24 Yao Qi <yao.qi@linaro.org>
565
566 * linux-low.c (linux_arch_setup): New function.
567 (linux_low_filter_event): If proc->tdesc is NULL and
568 proc->attached is true, call the_low_target.arch_setup.
569 Otherwise, keep status pending, and return.
570 (linux_resume_one_lwp_throw): Don't call get_pc if
571 thread->while_stepping isn't NULL. Don't call
572 get_thread_regcache if proc->tdesc is NULL.
573 (need_step_over_p): Return 0 if proc->tdesc is NULL.
574 (linux_target_ops): Install arch_setup.
575 * server.c (start_inferior): Call the_target->arch_setup.
576 * target.h (struct target_ops) <arch_setup>: New field.
577 (target_arch_setup): New marco.
578 * lynx-low.c (lynx_target_ops): Update.
579 * nto-low.c (nto_target_ops): Update.
580 * spu-low.c (spu_target_ops): Update.
581 * win32-low.c (win32_target_ops): Update.
582
583 2015-07-24 Yao Qi <yao.qi@linaro.org>
584
585 * linux-low.c (linux_add_process): Don't set
586 proc->priv->new_inferior.
587 (linux_create_inferior): Set proc->priv->new_inferior to 1.
588 (linux_attach): Likewise.
589
590 2015-07-24 Yao Qi <yao.qi@linaro.org>
591
592 * server.c (start_inferior): Code refactor.
593
594 2015-07-24 Yao Qi <yao.qi@linaro.org>
595
596 * server.c (process_serial_event): Set general_thread.
597
598 2015-07-21 Yao Qi <yao.qi@linaro.org>
599
600 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
601 aarch64_linux_get_debug_reg_capacity.
602
603 2015-07-17 Yao Qi <yao.qi@linaro.org>
604
605 * Makefile.in (aarch64-linux-hw-point.o): New rule.
606 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
607 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
608 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
609 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
610 (AARCH64_HWP_ALIGNMENT): Likewise.
611 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
612 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
613 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
614 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
615 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
616 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
617 (struct aarch64_debug_reg_state): Likewise.
618 (struct arch_lwp_info): Likewise.
619 (aarch64_align_watchpoint): Likewise.
620 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
621 (aarch64_watchpoint_length): Likewise.
622 (aarch64_point_encode_ctrl_reg): Likewise
623 (aarch64_point_is_aligned): Likewise.
624 (aarch64_align_watchpoint): Likewise.
625 (aarch64_linux_set_debug_regs):
626 (aarch64_dr_state_insert_one_point): Likewise.
627 (aarch64_dr_state_remove_one_point): Likewise.
628 (aarch64_handle_breakpoint): Likewise.
629 (aarch64_handle_aligned_watchpoint): Likewise.
630 (aarch64_handle_unaligned_watchpoint): Likewise.
631 (aarch64_handle_watchpoint): Likewise.
632
633 2015-07-17 Yao Qi <yao.qi@linaro.org>
634
635 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
636 and don't aarch64_get_debug_reg_state. All callers update.
637 (aarch64_handle_aligned_watchpoint): Likewise.
638 (aarch64_handle_unaligned_watchpoint): Likewise.
639 (aarch64_handle_watchpoint): Likewise.
640 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
641 (aarch64_remove_point): Likewise.
642
643 2015-07-17 Yao Qi <yao.qi@linaro.org>
644
645 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
646 debug_printf.
647 (aarch64_handle_unaligned_watchpoint): Likewise.
648
649 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
650
651 Revert the previous 3 commits:
652 Move gdb_regex* to common/
653 Move linux_find_memory_regions_full & co.
654 gdbserver build-id attribute generator
655
656 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
657 Jan Kratochvil <jan.kratochvil@redhat.com>
658
659 gdbserver build-id attribute generator.
660 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
661 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
662 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
663 (find_phdr): New.
664 (get_dynamic): Use find_pdhr to traverse program headers.
665 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
666 (compare_mapping_entry_range, struct find_memory_region_callback_data)
667 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
668 (get_hex_build_id): New.
669 (linux_qxfer_libraries_svr4): Add optional build-id attribute
670 to reply XML document.
671
672 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
673 Jan Kratochvil <jan.kratochvil@redhat.com>
674
675 * target.c: Include target/target-utils.h and fcntl.h.
676 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
677 (target_fileio_read_stralloc): New functions.
678
679 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
680
681 * Makefile.in (OBS): Add gdb_regex.o.
682 (gdb_regex.o): New.
683 * config.in: Rebuilt.
684 * configure: Rebuilt.
685
686 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
687 Jan Kratochvil <jan.kratochvil@redhat.com>
688
689 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
690 * Makefile.in (OBS): Add target-utils.o.
691 (linux-maps.o, target-utils.o): New.
692 * configure.srv (srv_linux_obj): Add linux-maps.o.
693
694 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
695
696 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
697 function, return 1.
698 (the_low_target): Install it.
699
700 2015-07-14 Pedro Alves <palves@redhat.com>
701
702 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
703 Instead, ignore ECHILD, and throw an error for other errnos.
704
705 2015-07-10 Pedro Alves <palves@redhat.com>
706
707 * event-loop.c (struct callback_event) <data>: Change type to
708 gdb_client_data instance instead of gdb_client_data pointer.
709 (append_callback_event): Adjust.
710
711 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
712
713 * linux-aarch64-low.c: Add comments for each linux_target_ops
714 method. Remove comments already covered in target_ops and
715 linux_target_ops definitions.
716 (the_low_target): Add comments for each unimplemented method.
717
718 2015-07-09 Yao Qi <yao.qi@linaro.org>
719
720 * linux-aarch64-low.c (aarch64_regmap): Remove.
721 (aarch64_usrregs_info): Remove.
722 (regs_info): Set field usrregs to NULL.
723
724 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
725
726 * linux-low.c: Include "rsp-low.h"
727 (linux_low_encode_pt_config, linux_low_encode_raw): New.
728 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
729 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
730 (handle_btrace_enable_pt): New.
731 (handle_btrace_general_set): Support "pt".
732 (handle_btrace_conf_general_set): Support "pt:size".
733
734 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
735
736 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
737 Z_PACKET_SW_BP.
738
739 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
740
741 * linux-aarch64-low.c: Remove comment about endianness.
742 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
743 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
744 memcmp.
745
746 2015-06-24 Gary Benson <gbenson@redhat.com>
747
748 * linux-i386-ipa.c (stdint.h): Do not include.
749 * lynx-i386-low.c (stdint.h): Likewise.
750 * lynx-ppc-low.c (stdint.h): Likewise.
751 * mem-break.c (stdint.h): Likewise.
752 * thread-db.c (stdint.h): Likewise.
753 * tracepoint.c (stdint.h): Likewise.
754 * win32-low.c (stdint.h): Likewise.
755
756 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
757
758 * server.c (write_qxfer_response): Update call to
759 remote_escape_output.
760
761 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
762 Jan Kratochvil <jan.kratochvil@redhat.com>
763
764 Merge multiple hex conversions.
765 * gdbreplay.c (tohex): Rename to 'fromhex'.
766 (logchar): Use fromhex.
767
768 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
769
770 * server.c (handle_qxfer_libraries): Set `version' attribute for
771 <library-list>.
772
773 2015-06-10 Gary Benson <gbenson@redhat.com>
774
775 * target.h (struct target_ops) <multifs_open>: New field.
776 <multifs_unlink>: Likewise.
777 <multifs_readlink>: Likewise.
778 * linux-low.c (nat/linux-namespaces.h): New include.
779 (linux_target_ops): Initialize the_target->multifs_open,
780 the_target->multifs_unlink and the_target->multifs_readlink.
781 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
782 * hostio.c (hostio_fs_pid): New static variable.
783 (hostio_handle_new_gdb_connection): New function.
784 (handle_setfs): Likewise.
785 (handle_open): Use the_target->multifs_open as appropriate.
786 (handle_unlink): Use the_target->multifs_unlink as appropriate.
787 (handle_readlink): Use the_target->multifs_readlink as
788 appropriate.
789 (handle_vFile): Handle vFile:setfs packets.
790 * server.c (handle_query): Call hostio_handle_new_gdb_connection
791 after target_handle_new_gdb_connection.
792
793 2015-06-10 Gary Benson <gbenson@redhat.com>
794
795 * configure.ac (AC_CHECK_FUNCS): Add setns.
796 * config.in: Regenerate.
797 * configure: Likewise.
798 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
799 (linux-namespaces.o): New rule.
800 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
801
802 2015-06-09 Gary Benson <gbenson@redhat.com>
803
804 * hostio.c (handle_open): Process mode argument with
805 fileio_to_host_mode.
806
807 2015-06-01 Yao Qi <yao.qi@linaro.org>
808
809 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
810 * linux-x86-low.c: Likewise.
811
812 2015-05-28 Don Breazeal <donb@codesourcery.com>
813
814 * linux-low.c (handle_extended_wait): Initialize
815 thread_info.last_resume_kind for new fork children.
816
817 2015-05-15 Pedro Alves <palves@redhat.com>
818
819 * target.h (target_handle_new_gdb_connection): Rewrite using if
820 wrapped in do/while.
821
822 2015-05-14 Joel Brobecker <brobecker@adacore.com>
823
824 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
825 * configure, config.in: Regenerate.
826 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
827 Declare typedef.
828
829 2015-05-12 Don Breazeal <donb@codesourcery.com>
830
831 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
832 PTRACE_EVENT_VFORK_DONE.
833 (linux_low_ptrace_options, extended_event_reported): Add vfork
834 events.
835 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
836 and "vforkdone" for RSP 'T' Stop Reply Packet.
837 * server.h (report_vfork_events): Declare
838 global variable.
839
840 2015-05-12 Don Breazeal <donb@codesourcery.com>
841
842 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
843 (the_low_target) <new_fork>: Initialize new member.
844 * linux-arm-low.c (arm_new_fork): New function.
845 (the_low_target) <new_fork>: Initialize new member.
846 * linux-low.c (handle_extended_wait): Call new target function
847 new_fork.
848 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
849 * linux-mips-low.c (mips_add_watchpoint): New function
850 extracted from mips_insert_point.
851 (the_low_target) <new_fork>: Initialize new member.
852 (mips_linux_new_fork): New function.
853 (mips_insert_point): Call mips_add_watchpoint.
854 * linux-x86-low.c (x86_linux_new_fork): New function.
855 (the_low_target) <new_fork>: Initialize new member.
856
857 2015-05-12 Don Breazeal <donb@codesourcery.com>
858
859 * linux-low.c (handle_extended_wait): Implement return value,
860 rename argument 'event_child' to 'event_lwp', handle
861 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
862 (linux_low_ptrace_options): New function.
863 (linux_low_filter_event): Call linux_low_ptrace_options,
864 use different argument fo linux_enable_event_reporting,
865 use return value from handle_extended_wait.
866 (extended_event_reported): New function.
867 (linux_wait_1): Call extended_event_reported and set
868 status to report fork events.
869 (linux_write_memory): Add pid to debug message.
870 (reset_lwp_ptrace_options_callback): New function.
871 (linux_handle_new_gdb_connection): New function.
872 (linux_target_ops): Initialize new structure member.
873 * linux-low.h (struct lwp_info) <waitstatus>: New member.
874 * lynx-low.c: Initialize new structure member.
875 * remote-utils.c (prepare_resume_reply): Implement stop reason
876 "fork" for "T" stop message.
877 * server.c (handle_query): Call handle_new_gdb_connection.
878 * server.h (report_fork_events): Declare global flag.
879 * target.h (struct target_ops) <handle_new_gdb_connection>:
880 New member.
881 (target_handle_new_gdb_connection): New macro.
882 * win32-low.c: Initialize new structure member.
883
884 2015-05-12 Don Breazeal <donb@codesourcery.com>
885
886 * mem-break.c (APPEND_TO_LIST): Define macro.
887 (clone_agent_expr): New function.
888 (clone_one_breakpoint): New function.
889 (clone_all_breakpoints): New function.
890 * mem-break.h: Declare new functions.
891
892 2015-05-12 Don Breazeal <donb@codesourcery.com>
893
894 * linux-low.c (linux_supports_fork_events): New function.
895 (linux_supports_vfork_events): New function.
896 (linux_target_ops): Initialize new structure members.
897 (initialize_low): Call linux_check_ptrace_features.
898 * lynx-low.c (lynx_target_ops): Initialize new structure
899 members.
900 * server.c (report_fork_events, report_vfork_events):
901 New global flags.
902 (handle_query): Add new features to qSupported packet and
903 response.
904 (captured_main): Initialize new global variables.
905 * target.h (struct target_ops) <supports_fork_events>:
906 New member.
907 <supports_vfork_events>: New member.
908 (target_supports_fork_events): New macro.
909 (target_supports_vfork_events): New macro.
910 * win32-low.c (win32_target_ops): Initialize new structure
911 members.
912
913 2015-05-12 Gary Benson <gbenson@redhat.com>
914
915 * server.c (handle_qxfer_exec_file): Use current process
916 if annex is empty.
917
918 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
919
920 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
921 Remove HAVE_PTRACE_GETREGS conditionals.
922 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
923 instead of PTRACE_GETREGS and PTRACE_SETREGS.
924
925 2015-05-08 Yao Qi <yao.qi@linaro.org>
926
927 * linux-low.c (linux_supports_conditional_breakpoints): New
928 function.
929 (linux_target_ops): Install new target method.
930 * lynx-low.c (lynx_target_ops): Install NULL hook for
931 supports_conditional_breakpoints.
932 * nto-low.c (nto_target_ops): Likewise.
933 * spu-low.c (spu_target_ops): Likewise.
934 * win32-low.c (win32_target_ops): Likewise.
935 * server.c (handle_query): Check
936 target_supports_conditional_breakpoints.
937 * target.h (struct target_ops) <supports_conditional_breakpoints>:
938 New field.
939 (target_supports_conditional_breakpoints): New macro.
940
941 2015-05-06 Pedro Alves <palves@redhat.com>
942
943 PR server/18081
944 * server.c (start_inferior): If the process exits, mourn it.
945
946 2015-04-21 Gary Benson <gbenson@redhat.com>
947
948 * hostio.c (fileio_open_flags_to_host): Factored out to
949 fileio_to_host_openflags in common/fileio.c. Single use
950 updated.
951
952 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
953
954 * linux-xtensa-low.c (xtensa_fill_gregset)
955 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
956 XCHAL_HAVE_LOOP.
957
958 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
959
960 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
961 (regs_info): Replace usrregs pointer with NULL.
962
963 2015-04-17 Gary Benson <gbenson@redhat.com>
964
965 * target.h (struct target_ops) <pid_to_exec_file>: New field.
966 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
967 * server.c (handle_qxfer_exec_file): New function.
968 (qxfer_packets): Add exec-file entry.
969 (handle_query): Report qXfer:exec-file:read as supported packet.
970
971 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
972
973 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
974
975 2015-04-09 Gary Benson <gbenson@redhat.com>
976
977 * hostio-errno.c (errno_to_fileio_error): Remove function.
978 Update caller to use remote_fileio_to_fio_error.
979
980 2015-04-09 Yao Qi <yao.qi@linaro.org>
981
982 * linux-low.c (linux_insert_point): Call
983 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
984 (linux_remove_point): Call remove_memory_breakpoint if type is
985 raw_bkpt_type_sw.
986 * linux-x86-low.c (x86_insert_point): Don't call
987 insert_memory_breakpoint.
988 (x86_remove_point): Don't call remove_memory_breakpoint.
989
990 2015-04-01 Pedro Alves <palves@redhat.com>
991 Cleber Rosa <crosa@redhat.com>
992
993 * server.c (gdbserver_usage): Reorganize and extend the usage
994 message.
995
996 2015-03-24 Pedro Alves <palves@redhat.com>
997
998 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
999 output. Also dump TRAP_TRACE.
1000 (linux_low_filter_event): In debug output, distinguish a
1001 resume_stop SIGSTOP from a delayed SIGSTOP.
1002
1003 2015-03-24 Gary Benson <gbenson@redhat.com>
1004
1005 * linux-x86-low.c (x86_linux_new_thread): Moved to
1006 nat/x86-linux.c.
1007 (x86_linux_prepare_to_resume): Likewise.
1008
1009 2015-03-24 Gary Benson <gbenson@redhat.com>
1010
1011 * Makefile.in (x86-linux-dregs.o): New rule.
1012 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1013 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1014 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1015 (x86_linux_dr_get): Likewise.
1016 (x86_linux_dr_set): Likewise.
1017 (update_debug_registers_callback): Likewise.
1018 (x86_linux_dr_set_addr): Likewise.
1019 (x86_linux_dr_get_addr): Likewise.
1020 (x86_linux_dr_set_control): Likewise.
1021 (x86_linux_dr_get_control): Likewise.
1022 (x86_linux_dr_get_status): Likewise.
1023 (x86_linux_update_debug_registers): Likewise.
1024
1025 2015-03-24 Gary Benson <gbenson@redhat.com>
1026
1027 * linux-x86-low.c (x86_linux_update_debug_registers):
1028 New function, factored out from...
1029 (x86_linux_prepare_to_resume): ...this.
1030
1031 2015-03-24 Gary Benson <gbenson@redhat.com>
1032
1033 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1034 (x86_linux_dr_set): Likewise.
1035 (update_debug_registers_callback): Likewise.
1036 (x86_linux_dr_set_addr): Likewise.
1037 (x86_linux_dr_get_addr): Likewise.
1038 (x86_linux_dr_set_control): Likewise.
1039 (x86_linux_dr_get_control): Likewise.
1040 (x86_linux_dr_get_status): Likewise.
1041 (x86_linux_prepare_to_resume): Likewise.
1042
1043 2015-03-24 Gary Benson <gbenson@redhat.com>
1044
1045 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1046 Use perror_with_name. Pass string through gettext.
1047 (x86_linux_dr_set): Likewise.
1048
1049 2015-03-24 Gary Benson <gbenson@redhat.com>
1050
1051 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1052 (x86_linux_dr_set_addr): ...this.
1053 (x86_dr_low_get_addr): Rename to...
1054 (x86_linux_dr_get_addr): ...this.
1055 (x86_dr_low_set_control): Rename to...
1056 (x86_linux_dr_set_control): ...this.
1057 (x86_dr_low_get_control): Rename to...
1058 (x86_linux_dr_get_control): ...this.
1059 (x86_dr_low_get_status): Rename to...
1060 (x86_linux_dr_get_status): ...this.
1061 (x86_dr_low): Update with new function names.
1062
1063 2015-03-24 Gary Benson <gbenson@redhat.com>
1064
1065 * Makefile.in (x86-linux.o): New rule.
1066 * configure.srv: Add x86-linux.o to relevant targets.
1067 * linux-low.c (lwp_set_arch_private_info): New function.
1068 (lwp_arch_private_info): Likewise.
1069 * linux-x86-low.c: Include nat/x86-linux.h.
1070 (arch_lwp_info): Removed structure.
1071 (update_debug_registers_callback):
1072 Use lwp_set_debug_registers_changed.
1073 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1074 and lwp_set_debug_registers_changed.
1075 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1076
1077 2015-03-24 Gary Benson <gbenson@redhat.com>
1078
1079 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1080 * linux-arm-low.c (arm_new_thread): Likewise.
1081 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1082 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1083 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1084 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1085
1086 2015-03-24 Gary Benson <gbenson@redhat.com>
1087
1088 * linux-low.c (ptid_of_lwp): New function.
1089 (lwp_is_stopped): Likewise.
1090 (lwp_stop_reason): Likewise.
1091 * linux-x86-low.c (update_debug_registers_callback):
1092 Use lwp_is_stopped.
1093 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1094 lwp_stop_reason.
1095
1096 2015-03-24 Gary Benson <gbenson@redhat.com>
1097
1098 * linux-low.h (linux_stop_lwp): Remove declaration.
1099
1100 2015-03-24 Gary Benson <gbenson@redhat.com>
1101
1102 * linux-low.h: Include nat/linux-nat.h.
1103 * linux-low.c (iterate_over_lwps_args): New structure.
1104 (iterate_over_lwps_filter): New function.
1105 (iterate_over_lwps): Likewise.
1106 * linux-x86-low.c (update_debug_registers_callback):
1107 Update signature to what iterate_over_lwps expects.
1108 Remove PID check that iterate_over_lwps now performs.
1109 (x86_dr_low_set_addr): Use iterate_over_lwps.
1110 (x86_dr_low_set_control): Likewise.
1111
1112 2015-03-24 Gary Benson <gbenson@redhat.com>
1113
1114 * linux-x86-low.c (x86_debug_reg_state): New function.
1115 (x86_linux_prepare_to_resume): Use the above.
1116
1117 2015-03-24 Gary Benson <gbenson@redhat.com>
1118
1119 * linux-low.c (current_lwp_ptid): New function.
1120 * linux-x86-low.c: Include nat/linux-nat.h.
1121 (x86_dr_low_get_addr): Use current_lwp_ptid.
1122 (x86_dr_low_get_control): Likewise.
1123 (x86_dr_low_get_status): Likewise.
1124
1125 2015-03-20 Pedro Alves <palves@redhat.com>
1126
1127 * tracepoint.c (cmd_qtstatus): Make "str" const.
1128
1129 2015-03-20 Pedro Alves <palves@redhat.com>
1130
1131 * server.c (handle_general_set): Make "req_str" const.
1132
1133 2015-03-19 Pedro Alves <palves@redhat.com>
1134
1135 * linux-low.c (linux_resume_one_lwp): Rename to ...
1136 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1137 instead call perror_with_name.
1138 (check_ptrace_stopped_lwp_gone): New function.
1139 (linux_resume_one_lwp): Reimplement as wrapper around
1140 linux_resume_one_lwp_throw that swallows errors if the LWP is
1141 gone.
1142
1143 2015-03-19 Pedro Alves <palves@redhat.com>
1144
1145 * linux-low.c (count_events_callback, select_event_lwp_callback):
1146 No longer check whether the thread has resume_stop as last resume
1147 kind.
1148
1149 2015-03-19 Pedro Alves <palves@redhat.com>
1150
1151 * linux-low.c (count_events_callback, select_event_lwp_callback):
1152 Use the lwp's status_pending_p field, not the thread's.
1153
1154 2015-03-19 Pedro Alves <palves@redhat.com>
1155
1156 * linux-low.c (select_event_lwp_callback): Update comments to
1157 no longer mention SIGTRAP.
1158
1159 2015-03-18 Gary Benson <gbenson@redhat.com>
1160
1161 * server.c (handle_query): Do not report vFile:fstat as supported.
1162
1163 2015-03-11 Gary Benson <gbenson@redhat.com>
1164
1165 * hostio.c (sys/types.h): New include.
1166 (sys/stat.h): Likewise.
1167 (common-remote-fileio.h): Likewise.
1168 (handle_fstat): New function.
1169 (handle_vFile): Handle vFile:fstat packets.
1170
1171 2015-03-11 Gary Benson <gbenson@redhat.com>
1172
1173 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1174 struct stat.st_blocks and struct stat.st_blksize.
1175 * configure: Regenerate.
1176 * config.in: Likewise.
1177 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1178 (OBS): Add common-remote-fileio.o.
1179 (common-remote-fileio.o): New rule.
1180
1181 2015-03-09 Pedro Alves <palves@redhat.com>
1182
1183 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1184 'struct sockaddr' pointer in 'accept' call.
1185
1186 2015-03-09 Pedro Alves <palves@redhat.com>
1187
1188 Revert:
1189 2015-03-07 Pedro Alves <palves@redhat.com>
1190 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1191 or <winsock2.h> here. Instead include "gdb_socket.h".
1192 (remote_open): Use union gdb_sockaddr_u.
1193 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1194 or <winsock2.h> here. Instead include "gdb_socket.h".
1195 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1196 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1197 or <sys/un.h>.
1198 (init_named_socket, gdb_agent_helper_thread): Use union
1199 gdb_sockaddr_u.
1200
1201 2015-03-07 Pedro Alves <palves@redhat.com>
1202
1203 * configure.ac (build_warnings): Move
1204 -Wdeclaration-after-statement to the C-specific set.
1205 * configure: Regenerate.
1206
1207 2015-03-07 Pedro Alves <palves@redhat.com>
1208
1209 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1210 or <winsock2.h> here. Instead include "gdb_socket.h".
1211 (remote_open): Use union gdb_sockaddr_u.
1212 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1213 or <winsock2.h> here. Instead include "gdb_socket.h".
1214 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1215 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1216 or <sys/un.h>.
1217 (init_named_socket, gdb_agent_helper_thread): Use union
1218 gdb_sockaddr_u.
1219
1220 2015-03-07 Pedro Alves <palves@redhat.com>
1221
1222 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1223 instead.
1224
1225 2015-03-06 Yao Qi <yao.qi@linaro.org>
1226
1227 * linux-aarch64-low.c (aarch64_insert_point): Use
1228 show_debug_regs as a boolean.
1229 (aarch64_remove_point): Likewise.
1230
1231 2015-03-05 Pedro Alves <palves@redhat.com>
1232
1233 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1234 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1235 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1236 * nto-low.c (nto_target_ops): Likewise.
1237 * spu-low.c (spu_target_ops): Likewise.
1238 * win32-low.c (win32_target_ops): Likewise.
1239
1240 2015-03-04 Pedro Alves <palves@redhat.com>
1241
1242 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1243 Decide whether a breakpoint triggered based on the SIGTRAP's
1244 siginfo.si_code.
1245 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1246 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1247 (linux_low_filter_event): Check for breakpoints before checking
1248 watchpoints.
1249 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1250 siginfo.si_code.
1251 (linux_stopped_by_sw_breakpoint)
1252 (linux_supports_stopped_by_sw_breakpoint)
1253 (linux_stopped_by_hw_breakpoint)
1254 (linux_supports_stopped_by_hw_breakpoint): New functions.
1255 (linux_target_ops): Install new target methods.
1256
1257 2015-03-04 Pedro Alves <palves@redhat.com>
1258
1259 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1260 * server.c (swbreak_feature, hwbreak_feature): New globals.
1261 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1262 (captured_main): Clear swbreak_feature and hwbreak_feature.
1263 * server.h (swbreak_feature, hwbreak_feature): Declare.
1264 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1265 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1266 supports_stopped_by_hw_breakpoint>: New fields.
1267 (target_supports_stopped_by_sw_breakpoint)
1268 (target_stopped_by_sw_breakpoint)
1269 (target_supports_stopped_by_hw_breakpoint)
1270 (target_stopped_by_hw_breakpoint): Declare.
1271
1272 2015-03-04 Pedro Alves <palves@redhat.com>
1273
1274 enum lwp_stop_reason -> enum target_stop_reason
1275 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1276 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1277 (linux_wait_1, stuck_in_jump_pad_callback)
1278 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1279 (linux_stopped_by_watchpoint):
1280 * linux-low.h (enum lwp_stop_reason): Delete.
1281 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1282 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1283
1284 2015-03-04 Yao Qi <yao.qi@linaro.org>
1285
1286 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1287
1288 2015-03-03 Gary Benson <gbenson@redhat.com>
1289
1290 * hostio.c (handle_vFile): Fix prefix lengths.
1291
1292 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1293
1294 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1295 ptr_bits.
1296
1297 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1298
1299 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1300 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1301 (clean): Add "rm -f" for above C files.
1302 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1303 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1304 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1305 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1306 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1307 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1308 (init_registers_s390x_vx_linux64)
1309 (init_registers_s390x_tevx_linux64)
1310 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1311 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1312 declarations.
1313 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1314 (s390_store_vxrs_high): New functions.
1315 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1316 NT_S390_VXRS_HIGH.
1317 (s390_arch_setup): Add logic for selecting one of the new target
1318 descriptions. Activate the new vector regsets if applicable.
1319 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1320 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1321 and init_registers_s390x_tevx_linux64.
1322
1323 2015-03-01 Pedro Alves <palves@redhat.com>
1324
1325 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1326 parameter.
1327
1328 2015-02-27 Pedro Alves <palves@redhat.com>
1329
1330 * linux-x86-low.c (u_debugreg_offset): New function.
1331 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1332
1333 2015-02-27 Pedro Alves <palves@redhat.com>
1334
1335 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1336 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1337 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1338 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1339 (ps_lsetfpregs, ps_getpid)
1340 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1341 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1342 (ps_lsetxregs, ps_plog): Declare.
1343
1344 2015-02-27 Pedro Alves <palves@redhat.com>
1345
1346 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1347 IP_AGENT_EXPORT_FUNC.
1348 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1349 IP_AGENT_EXPORT_FUNC.
1350 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1351 (IP_AGENT_EXPORT): Delete.
1352 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1353 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1354 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1355 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1356 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1357 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1358 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1359 (traceframe_read_count, traceframe_write_count)
1360 (traceframes_created, trace_state_variables, get_raw_reg)
1361 (get_trace_state_variable_value, set_trace_state_variable_value)
1362 (ust_loaded, helper_thread_id, cmd_buf): Use
1363 IPA_SYM_EXPORTED_NAME.
1364 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1365 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1366 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1367 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1368 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1369 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1370 EXTERN_C_PUSH/EXTERN_C_POP.
1371 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1372 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1373 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1374 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1375 (traceframe_write_count, traceframe_read_count)
1376 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1377 (about_to_request_buffer_space, get_trace_state_variable_value)
1378 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1379 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1380 EXTERN_C_PUSH/EXTERN_C_POP.
1381 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1382 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1383 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1384 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1385 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1386 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1387 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1388 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1389 Define.
1390 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1391 (IP_AGENT_EXPORT_VAR_DECL): Define.
1392 (tracing): Declare.
1393 (gdb_agent_get_raw_reg): Declare.
1394
1395 2015-02-27 Tom Tromey <tromey@redhat.com>
1396 Pedro Alves <palves@redhat.com>
1397
1398 Rename symbols whose names are reserved C++ keywords throughout.
1399
1400 2015-02-27 Pedro Alves <palves@redhat.com>
1401
1402 * Makefile.in (COMPILER): New, get it from autoconf.
1403 (CXX): Get from autoconf instead.
1404 (COMPILE.pre): Use COMPILER.
1405 (CC-LD): Rename to ...
1406 (CC_LD): ... this. Use COMPILER.
1407 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1408 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1409 * acinclude.m4: Include build-with-cxx.m4.
1410 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1411 Disable -Werror by default if building in C++ mode.
1412 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1413 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1414 the C++ compiler. Save/restore CXXFLAGS too.
1415 * configure: Regenerate.
1416
1417 2015-02-27 Pedro Alves <palves@redhat.com>
1418
1419 * acinclude.m4: Include libiberty.m4.
1420 * configure.ac: Call libiberty_INIT.
1421 * config.in, configure: Regenerate.
1422
1423 2015-02-26 Pedro Alves <palves@redhat.com>
1424
1425 * linux-low.c (linux_wait_1): When incrementing the PC past a
1426 program breakpoint always use the_low_target.breakpoint_len as
1427 increment, rather than the maximum between that and
1428 the_low_target.decr_pc_after_break.
1429
1430 2015-02-23 Pedro Alves <palves@redhat.com>
1431
1432 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1433 thread was doing a step-over; always adjust the PC if
1434 we stepped over a permanent breakpoint.
1435 (linux_wait_1): If we stepped over breakpoint that was on top of a
1436 permanent breakpoint, manually advance the PC past it.
1437
1438 2015-02-23 Pedro Alves <palves@redhat.com>
1439
1440 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1441 modes.
1442 (x86_fill_gregset, x86_store_gregset): Use it when handling
1443 $orig_eax.
1444
1445 2015-02-20 Pedro Alves <palves@redhat.com>
1446
1447 * thread-db.c: Include "nat/linux-procfs.h".
1448 (thread_db_init): Skip listing new threads if the kernel supports
1449 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1450
1451 2015-02-20 Pedro Alves <palves@redhat.com>
1452
1453 * linux-low.c (status_pending_p_callback): Use ptid_match.
1454
1455 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1456
1457 PR breakpoints/16812
1458 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1459 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1460 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1461
1462 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1463
1464 PR breakpoints/15956
1465 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1466
1467 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1468
1469 * linux-low.c (linux_low_btrace_conf): Print size.
1470 * server.c (handle_btrace_conf_general_set): New.
1471 (hanle_general_set): Call handle_btrace_conf_general_set.
1472 (handle_query): Report Qbtrace-conf:bts:size as supported.
1473
1474 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1475
1476 * linux-low.c (linux_low_enable_btrace): Update parameters.
1477 (linux_low_btrace_conf): New.
1478 (linux_target_ops)<to_btrace_conf>: Initialize.
1479 * server.c (current_btrace_conf): New.
1480 (handle_btrace_enable): Rename to ...
1481 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1482 to target_enable_btrace. Update comment. Update users.
1483 (handle_qxfer_btrace_conf): New.
1484 (qxfer_packets): Add btrace-conf entry.
1485 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1486 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1487 (target_ops)<read_btrace_conf>: New.
1488 (target_enable_btrace): Update parameters.
1489 (target_read_btrace_conf): New.
1490
1491 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1492
1493 * server.c (handle_btrace_general_set): Remove call to
1494 target_supports_btrace.
1495 (supported_btrace_packets): New.
1496 (handle_query): Call supported_btrace_packets.
1497 * target.h: include btrace-common.h.
1498 (btrace_target_info): Removed.
1499 (supports_btrace, target_supports_btrace): Update parameters.
1500
1501 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1502
1503 * Makefile.in (SFILES): Add common/btrace-common.c.
1504 (OBS): Add common/btrace-common.o.
1505 (btrace-common.o): Add build rules.
1506 * linux-low: Include btrace-common.h.
1507 (linux_low_read_btrace): Use struct btrace_data. Call
1508 btrace_data_init and btrace_data_fini.
1509
1510 2015-02-06 Pedro Alves <palves@redhat.com>
1511
1512 * thread-db.c (find_new_threads_callback): Add debug output.
1513
1514 2015-02-04 Pedro Alves <palves@redhat.com>
1515
1516 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1517 (resume_stopped_resumed_lwps): New function.
1518 (linux_wait_for_event_filtered): Use it.
1519
1520 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1521
1522 * Makefile.in (SFILES): Add linux-personality.c.
1523 (linux-personality.o): New rule.
1524 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1525 list of objects to be built.
1526 * linux-low.c: Include nat/linux-personality.h.
1527 (linux_create_inferior): Remove code to disable address space
1528 randomization (moved to ../nat/linux-personality.c). Create
1529 cleanup to disable address space randomization.
1530
1531 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1532
1533 * Makefile.in (posix-strerror.o): New rule.
1534 (mingw-strerror.o): Likewise.
1535 * configure: Regenerated.
1536 * configure.ac: Source file ../common/common.host. Initialize new
1537 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1538
1539 2015-01-14 Yao Qi <yao@codesourcery.com>
1540
1541 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1542 (ppc-linux.o): New rule.
1543 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1544 * configure.ac: AC_CHECK_FUNCS(getauxval).
1545 * config.in: Re-generated.
1546 * configure: Re-generated.
1547 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1548 ppc64_64bit_inferior_p
1549
1550 2015-01-14 Yao Qi <yao@codesourcery.com>
1551
1552 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1553 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1554 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1555 (PT_ORIG_R3, PT_TRAP): Likewise.
1556 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1557 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1558 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1559
1560 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1561
1562 * i387-fp.c (i387_cache_to_xsave): In look over
1563 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1564 zmmh_low_space field by use of zmmh_high_space.
1565
1566 2015-01-09 Pedro Alves <palves@redhat.com>
1567
1568 * linux-low.c (step_over_bkpt): Move higher up in the file.
1569 (handle_extended_wait): Don't store the stop_pc here.
1570 (get_stop_pc): Adjust comments and rename to ...
1571 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1572 stopped for a software breakpoint or hardware breakpoint.
1573 (thread_still_has_status_pending_p): New function.
1574 (status_pending_p_callback): Use
1575 thread_still_has_status_pending_p. If the event is no longer
1576 interesting, resume the LWP.
1577 (handle_tracepoints): Add assert.
1578 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1579 (wstatus_maybe_breakpoint): New function.
1580 (cancel_breakpoint): Delete function.
1581 (check_stopped_by_watchpoint): New function, factored out from
1582 linux_low_filter_event.
1583 (lp_status_maybe_breakpoint): Delete function.
1584 (linux_low_filter_event): Remove filter_ptid argument.
1585 Leave thread group exits pending here. Store the LWP's stop PC.
1586 Always leave events pending.
1587 (linux_wait_for_event_filtered): Pull all events out of the
1588 kernel, and leave them all pending.
1589 (count_events_callback, select_event_lwp_callback): Consider all
1590 events.
1591 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1592 (select_event_lwp): Only give preference to the stepping LWP in
1593 all-stop mode. Adjust comments.
1594 (ignore_event): New function.
1595 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1596 references to cancel_breakpoints. Adjust to renames. Also give
1597 equal priority to all LWPs that have had events in non-stop mode.
1598 If reporting a software breakpoint event, unadjust the LWP's PC.
1599 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1600 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1601 Adjust.
1602 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1603 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1604 (linux_stopped_by_watchpoint): Adjust.
1605 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1606 * linux-low.h (enum lwp_stop_reason): New.
1607 (struct lwp_info) <stop_pc>: Adjust comment.
1608 <stopped_by_watchpoint>: Delete field.
1609 <stop_reason>: New field.
1610 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1611 * mem-break.c (software_breakpoint_inserted_here)
1612 (hardware_breakpoint_inserted_here): New function.
1613 * mem-break.h (software_breakpoint_inserted_here)
1614 (hardware_breakpoint_inserted_here): Declare.
1615 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1616 (cancel_breakpoints): Delete.
1617 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1618 (upload_fast_traceframes): Remove references to
1619 cancel_breakpoints.
1620
1621 2015-01-09 Pedro Alves <palves@redhat.com>
1622
1623 * thread-db.c (find_new_threads_callback): Ignore thread if the
1624 kernel thread ID is -1.
1625
1626 2015-01-09 Pedro Alves <palves@redhat.com>
1627
1628 * linux-low.c (linux_attach_fail_reason_string): Move to
1629 nat/linux-ptrace.c, and rename.
1630 (linux_attach_lwp): Update comment.
1631 (attach_proc_task_lwp_callback): New function.
1632 (linux_attach): Adjust to rename and use
1633 linux_proc_attach_tgid_threads.
1634 (linux_attach_fail_reason_string): Delete declaration.
1635
1636 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1637
1638 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1639 * server.c (gdbserver_version): Likewise.
1640
1641 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1642
1643 * remote-utils.c: Include ctype.h.
1644 (input_interrupt): Explicitly handle the case when the char
1645 received is the NUL byte. Improve the printing of non-ASCII
1646 characters.
1647
1648 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1649
1650 * linux-low.c (linux_low_filter_event): Update call to
1651 linux_enable_event_reporting following the addition of
1652 a new parameter to that function.
1653
1654 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1655
1656 PR server/17457
1657 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1658 (AARCH64_FPCR_REGNO): Likewise.
1659 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1660 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1661 (aarch64_store_fpregset): Likewise.
1662
1663 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1664
1665 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1666 Remove FIXME comment about assumption about N.
1667
1668 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1669
1670 * configure.ac: If large-file support is disabled in GDBserver,
1671 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1672 * configure: Regenerate.
1673
1674 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1675
1676 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1677 warning upon ENODATA from ptrace.
1678 * linux-s390-low.c (s390_store_tdb): New.
1679 (s390_regsets): Add regset for NT_S390_TDB.
1680
1681 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1682
1683 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1684 without a fill_function.
1685 * linux-s390-low.c (s390_fill_last_break): Remove.
1686 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1687 (s390_arch_setup): Use regset's size instead of fill_function for
1688 loop end condition.
1689
1690 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1691
1692 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1693 the regset's store function when ptrace returned an error.
1694 * regcache.c (get_thread_regcache): Invalidate register cache
1695 before fetching inferior's registers.
1696
1697 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1698
1699 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1700 while-loop as for-loop.
1701 (regsets_store_inferior_registers): Likewise.
1702
1703 2014-11-28 Yao Qi <yao@codesourcery.com>
1704
1705 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1706 * config.in, configure: Re-generate.
1707 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1708 is defined.
1709
1710 2014-11-21 Yao Qi <yao@codesourcery.com>
1711
1712 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1713 (AC_CHECK_HEADERS): Remove malloc.h.
1714 * configure: Re-generated.
1715 * config.in: Re-generated.
1716 * server.h: Don't include alloca.h and malloc.h.
1717 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1718 Don't include malloc.h.
1719
1720 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1721
1722 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1723 corresponding ERRNO check in same block.
1724
1725 2014-11-12 Pedro Alves <palves@redhat.com>
1726
1727 * server.c (cont_thread): Update comment.
1728 (start_inferior, attach_inferior): No longer clear cont_thread.
1729 (handle_v_cont): No longer set cont_thread.
1730 (captured_main): Clear cont_thread each time a GDB connects.
1731
1732 2014-11-12 Pedro Alves <palves@redhat.com>
1733
1734 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1735 thread, and don't resume all threads if the Hc thread has exited.
1736
1737 2014-11-12 Pedro Alves <palves@redhat.com>
1738
1739 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1740 the process group instead of to a specific LWP.
1741
1742 2014-10-15 Pedro Alves <palves@redhat.com>
1743
1744 PR server/17487
1745 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1746 parameter.
1747 (arm_set_thread_context): Delete.
1748 (the_low_target): Adjust.
1749 * win32-i386-low.c (debug_registers_changed)
1750 (debug_registers_used): Delete.
1751 (update_debug_registers_callback): New function.
1752 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1753 needing to update their debug registers.
1754 (win32_get_current_dr): New function.
1755 (x86_dr_low_get_addr, x86_dr_low_get_control)
1756 (x86_dr_low_get_status): Fetch the debug register from the thread
1757 record's context.
1758 (i386_initial_stuff): Adjust.
1759 (i386_get_thread_context): Remove current_event parameter. Don't
1760 clear debug_registers_changed nor copy DR values to
1761 debug_reg_state.
1762 (i386_set_thread_context): Delete.
1763 (i386_prepare_to_resume): New function.
1764 (i386_thread_added): Mark the thread as needing to update irs
1765 debug registers.
1766 (the_low_target): Remove i386_set_thread_context and install
1767 i386_prepare_to_resume.
1768 * win32-low.c (win32_get_thread_context): Adjust.
1769 (win32_set_thread_context): Use SetThreadContext
1770 directly.
1771 (win32_prepare_to_resume): New function.
1772 (win32_require_context): New function, factored out from ...
1773 (thread_rec): ... this.
1774 (continue_one_thread): Call win32_prepare_to_resume on each thread
1775 we're about to continue.
1776 (win32_resume): Call win32_prepare_to_resume on the event thread.
1777 * win32-low.h (struct win32_thread_info)
1778 <debug_registers_changed>: New field.
1779 (struct win32_target_ops): Change prototype of set_thread_context,
1780 delete set_thread_context and add prepare_to_resume.
1781 (win32_require_context): New declaration.
1782
1783 2014-10-08 Gary Benson <gbenson@redhat.com>
1784
1785 * server.h: Do not include common-exceptions.h.
1786
1787 2014-10-08 Gary Benson <gbenson@redhat.com>
1788
1789 * server.h: Do not include cleanups.h.
1790
1791 2014-09-30 James Hogan <james.hogan@imgtec.com>
1792
1793 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1794 mips64-dsp-linux.c.
1795
1796 2014-09-23 Yao Qi <yao@codesourcery.com>
1797
1798 * linux-low.c (lp_status_maybe_breakpoint): New function.
1799 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1800 (count_events_callback): Likewise.
1801 (select_event_lwp_callback): Likewise.
1802 (cancel_breakpoints_callback): Likewise.
1803
1804 2014-09-19 Don Breazeal <donb@codesourcery.com>
1805
1806 * linux-low.c (handle_extended_wait): Call
1807 linux_ptrace_get_extended_event.
1808 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1809 linux_is_extended_waitstatus.
1810
1811 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1812
1813 * Makefile.in (CPPFLAGS): Define.
1814 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1815 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1816
1817 2014-09-16 Gary Benson <gbenson@redhat.com>
1818
1819 * inferiors.h (current_inferior): Renamed as...
1820 (current_thread): New variable. All uses updated.
1821 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1822 (maybe_move_out_of_jump_pad): Likewise.
1823 (cancel_breakpoint): Likewise.
1824 (linux_low_filter_event): Likewise.
1825 (wait_for_sigstop): Likewise.
1826 (linux_resume_one_lwp): Likewise.
1827 (need_step_over_p): Likewise.
1828 (start_step_over): Likewise.
1829 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1830 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1831 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1832 and save_inferior as saved_thread.
1833 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1834 saved_thread.
1835 (regcache_invalidate_thread): Likewise.
1836 * remote-utils.c (prepare_resume_reply): Likewise.
1837 * thread-db.c (thread_db_get_tls_address): Likewise.
1838 (disable_thread_event_reporting): Likewise.
1839 (remove_thread_event_breakpoints): Likewise.
1840 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1841 as saved_thread.
1842 * target.h (set_desired_inferior): Renamed as...
1843 (set_desired_thread): New declaration. All uses updated.
1844 * server.c (myresume): Updated comment to reference thread instead
1845 of inferior.
1846 (handle_serial_event): Likewise.
1847 (handle_target_event): Likewise.
1848
1849 2014-09-12 Tom Tromey <tromey@redhat.com>
1850 Gary Benson <gbenson@redhat.com>
1851
1852 * regcache.h: Include common-regcache.h.
1853 (regcache_read_pc): Don't declare.
1854 * regcache.c (get_thread_regcache_for_ptid): New function.
1855
1856 2014-09-11 Tom Tromey <tromey@redhat.com>
1857 Gary Benson <gbenson@redhat.com>
1858
1859 * symbol.c: New file.
1860 * Makefile.in (SFILES): Add symbol.c.
1861 (OBS): Add symbol.o.
1862
1863 2014-09-11 Gary Benson <gbenson@redhat.com>
1864
1865 * target.c (target_stop_ptid, target_continue_ptid): New
1866 functions.
1867
1868 2014-09-11 Tom Tromey <tromey@redhat.com>
1869 Gary Benson <gbenson@redhat.com>
1870
1871 * target.h: Include target/target.h.
1872 * target.c (target_read_memory, target_read_uint32)
1873 (target_write_memory): New functions.
1874
1875 2014-09-11 Gary Benson <gbenson@redhat.com>
1876
1877 * server.h (debug_hw_points): Don't declare.
1878 * server.c (debug_hw_points): Don't define. Replace all uses
1879 with show_debug_regs.
1880 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1881 all uses with show_debug_regs.
1882
1883 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1884
1885 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1886 endianness into account.
1887 (ppc_supply_ptrace_register): Likewise.
1888
1889 2014-09-03 James Hogan <james.hogan@imgtec.com>
1890
1891 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1892 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1893
1894 2014-09-03 Gary Benson <gbenson@redhat.com>
1895
1896 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1897 ALL_DEBUG_ADDRESS_REGISTERS.
1898
1899 2014-09-02 Gary Benson <gbenson@redhat.com>
1900
1901 * i386-low.h: Renamed as...
1902 * x86-low.h: New file. All type, function and variable name
1903 prefixes changed from "i386_" to "x86_". All references updated.
1904 * i386-low.c: Renamed as...
1905 * x86-low.c: New file. All type, function and variable name
1906 prefixes changed from "i386_" to "x86_". All references updated.
1907
1908 2014-09-02 Gary Benson <gbenson@redhat.com>
1909
1910 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1911 (x86_linux_new_thread): Likewise.
1912
1913 2014-08-29 Gary Benson <gbenson@redhat.com>
1914
1915 * server.h (setjmp.h): Do not include.
1916 (toplevel): Do not declare.
1917 (common-exceptions.h): Include.
1918 (cleanups.h): Likewise.
1919 * server.c (toplevel): Do not define.
1920 (exit_code): New static global.
1921 (detach_or_kill_for_exit_cleanup): New function.
1922 (main): New function. Original main renamed to...
1923 (captured_main): New function.
1924 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1925
1926 2014-08-29 Gary Benson <gbenson@redhat.com>
1927
1928 * Makefile.in (SFILES): Add common/common-exceptions.c.
1929 (OBS): Add common-exceptions.o.
1930 (common-exceptions.o): New rule.
1931 * utils.c (prepare_to_throw_exception): New function.
1932
1933 2014-08-29 Gary Benson <gbenson@redhat.com>
1934
1935 * config.in: Regenerate.
1936 * configure: Likewise.
1937
1938 2014-08-29 Gary Benson <gbenson@redhat.com>
1939
1940 * Makefile.in (SFILES): Add common/cleanups.c.
1941 (OBS): cleanups.o.
1942 (cleanups.o): New rule.
1943
1944 2014-08-29 Gary Benson <gbenson@redhat.com>
1945
1946 * utils.c (internal_vwarning): New function.
1947
1948 2014-08-28 Gary Benson <gbenson@redhat.com>
1949
1950 * utils.h (fatal): Remove declaration.
1951 * utils.c (fatal): Remove function.
1952
1953 2014-08-28 Gary Benson <gbenson@redhat.com>
1954
1955 * tracepoint.c (gdb_agent_init): Replace fatal with
1956 perror_with_name.
1957 (initialize_tracepoint): Likewise.
1958
1959 2014-08-28 Gary Benson <gbenson@redhat.com>
1960
1961 * remote-utils.c (remote_prepare): Replace fatal with error.
1962
1963 2014-08-28 Gary Benson <gbenson@redhat.com>
1964
1965 * linux-low.c (linux_async): Replace fatal with warning.
1966 Tidy up and return.
1967 (linux_start_non_stop): Return -1 if linux_async failed.
1968
1969 2014-08-28 Gary Benson <gbenson@redhat.com>
1970
1971 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1972 gdb_assert.
1973 (i386_dr_low_get_addr): Remove vague comment.
1974 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1975 gdb_assert.
1976
1977 2014-08-28 Gary Benson <gbenson@redhat.com>
1978
1979 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1980 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1981 internal_error.
1982 (linux_resume_one_lwp): Likewise.
1983 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1984 gdb_assert.
1985 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1986 with internal_error.
1987 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1988 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1989 (find_register_by_name): Replace fatal with internal_error.
1990 (find_regno): Likewise.
1991 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1992 * thread-db.c (thread_db_create_event): Likewise.
1993 (thread_db_load_search): Likewise.
1994 (try_thread_db_load_1): Likewise.
1995 * tracepoint.c (get_jump_space_head): Replace fatal with
1996 internal_error.
1997 (claim_trampoline_space): Likewise.
1998 (have_fast_tracepoint_trampoline_buffer): Likewise.
1999 (cmd_qtstart): Likewise.
2000 (stop_tracing): Likewise.
2001 (fast_tracepoint_collecting): Likewise.
2002 (target_malloc): Likewise.
2003 (download_tracepoint): Likewise.
2004 (download_trace_state_variables): Replace check with gdb_assert.
2005 (upload_fast_traceframes): Replace fatal with internal_error.
2006
2007 2014-08-19 Tom Tromey <tromey@redhat.com>
2008 Gary Benson <gbenson@redhat.com>
2009
2010 * Makefile.in (SFILES): Add common/common-debug.c.
2011 (OBS): Add common-debug.o.
2012 (common-debug.o): New rule.
2013 * debug.h (debug_printf): Don't declare.
2014 * debug.c (debug_printf): Renamed and rewritten as...
2015 (debug_vprintf): New function.
2016
2017 2014-08-19 Gary Benson <gbenson@redhat.com>
2018
2019 * utils.h: Do not include print-utils.h.
2020
2021 2014-08-19 Tom Tromey <tromey@redhat.com>
2022 Gary Benson <gbenson@redhat.com>
2023
2024 * server.h: Add static assertion.
2025 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2026
2027 2014-08-19 Tom Tromey <tromey@redhat.com>
2028 Gary Benson <gbenson@redhat.com>
2029
2030 * Makefile.in (SFILES): Add common/errors.c.
2031 (OBS): Add errors.o.
2032 (IPA_OBS): Add errors-ipa.o.
2033 (errors.o): New rule.
2034 (errors-ipa.o): Likewise.
2035 * utils.h (perror_with_name, error, warning): Don't declare.
2036 * utils.c (warning): Renamed and rewritten as...
2037 (vwarning): New function.
2038 (error): Renamed and rewritten as...
2039 (verror): New function.
2040 (internal_error): Renamed and rewritten as...
2041 (internal_verror): New function.
2042
2043 2014-08-07 Gary Benson <gbenson@redhat.com>
2044
2045 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2046 * configure: Regenerate.
2047 * config.in: Likewise.
2048 * server.h: Do not include errno.h.
2049 * event-loop.c: Likewise.
2050 * hostio-errno.c: Likewise.
2051 * linux-low.c: Likewise.
2052 * remote-utils.c: Likewise.
2053 * spu-low.c: Likewise.
2054 * utils.c: Likewise.
2055 * gdbreplay.c: Unconditionally include errno.h.
2056
2057 2014-08-07 Gary Benson <gbenson@redhat.com>
2058
2059 * server.h: Do not include string.h.
2060 * event-loop.c: Likewise.
2061 * linux-low.c: Likewise.
2062 * regcache.c: Likewise.
2063 * remote-utils.c: Likewise.
2064 * spu-low.c: Likewise.
2065 * utils.c: Likewise.
2066
2067 2014-08-07 Gary Benson <gbenson@redhat.com>
2068
2069 * server.h: Do not include gdb_assert.h.
2070
2071 2014-08-07 Gary Benson <gbenson@redhat.com>
2072
2073 * server.h: Do not include common-utils.h.
2074
2075 2014-08-07 Gary Benson <gbenson@redhat.com>
2076
2077 * server.h: Do not include ptid.h.
2078 * notif.h: Likewise.
2079
2080 2014-08-07 Gary Benson <gbenson@redhat.com>
2081
2082 * server.h: Do not include gdb_locale.h.
2083
2084 2014-08-07 Gary Benson <gbenson@redhat.com>
2085
2086 * server.h: Do not include gdb/signals.h.
2087 * win32-low.c: Likewise.
2088
2089 2014-08-07 Gary Benson <gbenson@redhat.com>
2090
2091 * server.h: Do not include pathmax.h.
2092
2093 2014-08-07 Gary Benson <gbenson@redhat.com>
2094
2095 * server.h: Do not include libiberty.h.
2096 * linux-bfin-low.c: Likewise.
2097
2098 2014-08-07 Gary Benson <gbenson@redhat.com>
2099
2100 * server.h: Do not include ansidecl.h.
2101
2102 2014-08-07 Gary Benson <gbenson@redhat.com>
2103
2104 * linux-x86-low.c: Do not include stddef.h.
2105 * lynx-ppc-low.c: Likewise.
2106 * tracepoint.c: Likewise.
2107
2108 2014-08-07 Gary Benson <gbenson@redhat.com>
2109
2110 * server.h: Do not include stdarg.h.
2111 * nto-low.c: Likewise.
2112
2113 2014-08-07 Gary Benson <gbenson@redhat.com>
2114
2115 * server.h: Do not include stdlib.h.
2116 * inferiors.c: Likewise.
2117 * linux-low.c: Likewise.
2118 * regcache.c: Likewise.
2119 * spu-low.c: Likewise.
2120 * tracepoint.c: Likewise.
2121 * utils.c: Likewise.
2122
2123 2014-08-07 Gary Benson <gbenson@redhat.com>
2124
2125 * server.h: Do not include stdio.h.
2126 * linux-low.c: Likewise.
2127 * remote-utils.c: Likewise.
2128 * spu-low.c: Likewise.
2129 * utils.c: Likewise.
2130 * wincecompat.c: Likewise.
2131
2132 2014-08-06 Gary Benson <gbenson@redhat.com>
2133
2134 * regcache.c (init_register_cache): Move conditionals inside if.
2135
2136 2014-08-06 Gary Benson <gbenson@redhat.com>
2137
2138 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2139
2140 2014-07-31 Gary Benson <gbenson@redhat.com>
2141
2142 * ax.h: Do not include server.h.
2143 * gdbthread.h: Likewise.
2144 * lynx-low.h: Likewise.
2145 * notif.h: Likewise.
2146
2147 2014-07-30 Gary Benson <gbenson@redhat.com>
2148
2149 * server.h: Include common-defs.h.
2150 Do not include config.h or build-gnulib-gdbserver/config.h.
2151
2152 2014-07-30 Gary Benson <gbenson@redhat.com>
2153
2154 * hostio-errno.c: Move server.h to top of includes list.
2155 * inferiors.c: Likewise.
2156 * linux-x86-low.c: Likewise.
2157 * notif.c: Include server.h.
2158
2159 2014-07-24 Tom Tromey <tromey@redhat.com>
2160 Gary Benson <gbenson@redhat.com>
2161
2162 * server.h (CORE_ADDR): Now unsigned.
2163
2164 2014-07-16 Pedro Alves <palves@redhat.com>
2165
2166 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2167
2168 2014-07-15 Pedro Alves <palves@redhat.com>
2169
2170 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2171 copy.
2172
2173 2014-07-11 Pedro Alves <palves@redhat.com>
2174
2175 * linux-low.c (kill_wait_lwp): New function, based on
2176 kill_one_lwp_callback, but use my_waitpid directly.
2177 (kill_one_lwp_callback, linux_kill): Use it.
2178
2179 2014-06-23 Pedro Alves <palves@redhat.com>
2180
2181 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2182 before setting DR0..DR3.
2183
2184 2014-06-20 Gary Benson <gbenson@redhat.com>
2185
2186 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2187 * configure: Regenerated.
2188 * config.in: Likewise.
2189
2190 2014-06-20 Gary Benson <gbenson@redhat.com>
2191
2192 * Makefile.in (SFILES): Update locations for files moved
2193 from common to nat.
2194 (object file files): Reordered.
2195
2196 2014-06-20 Gary Benson <gbenson@redhat.com>
2197
2198 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2199 (i386_dr_low_set_addr): Likewise.
2200 (i386_dr_low_get_addr): Likewise.
2201 (i386_dr_low_can_set_control): Likewise.
2202 (i386_dr_low_set_control): Likewise.
2203 (i386_dr_low_get_control): Likewise.
2204 (i386_dr_low_get_status): Likewise.
2205 (i386_get_debug_register_length): Likewise.
2206 * linux-x86-low.c (i386_dr_low_set_addr):
2207 Changed signature. Made static.
2208 (i386_dr_low_get_addr): Likewise.
2209 (i386_dr_low_set_control): Likewise.
2210 (i386_dr_low_get_control): Likewise.
2211 (i386_dr_low_get_status): Likewise.
2212 (i386_dr_low): New global variable.
2213 * win32-i386-low.c (i386_dr_low_set_addr):
2214 Changed signature. Made static.
2215 (i386_dr_low_get_addr): Likewise.
2216 (i386_dr_low_set_control): Likewise.
2217 (i386_dr_low_get_control): Likewise.
2218 (i386_dr_low_get_status): Likewise.
2219 (i386_dr_low): New global variable.
2220
2221 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2222
2223 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2224 * Makefile.in (AR, AR_FLAGS): Define.
2225 * configure: Regenerate.
2226
2227 2014-06-19 Gary Benson <gbenson@redhat.com>
2228
2229 * Makefile.in (i386-dregs.o): New rule.
2230 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2231 * i386-low.c (target.h): Remove include.
2232 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2233 (DR_CONTROL_SHIFT): Likewise.
2234 (DR_CONTROL_SIZE): Likewise.
2235 (DR_RW_EXECUTE): Likewise.
2236 (DR_RW_WRITE): Likewise.
2237 (DR_RW_READ): Likewise.
2238 (DR_RW_IORW): Likewise.
2239 (DR_LEN_1): Likewise.
2240 (DR_LEN_2): Likewise.
2241 (DR_LEN_4): Likewise.
2242 (DR_LEN_8): Likewise.
2243 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2244 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2245 (DR_ENABLE_SIZE): Likewise.
2246 (DR_LOCAL_SLOWDOWN): Likewise.
2247 (DR_GLOBAL_SLOWDOWN): Likewise.
2248 (DR_CONTROL_RESERVED): Likewise.
2249 (I386_DR_CONTROL_MASK): Likewise.
2250 (I386_DR_VACANT): Likewise.
2251 (I386_DR_LOCAL_ENABLE): Likewise.
2252 (I386_DR_GLOBAL_ENABLE): Likewise.
2253 (I386_DR_DISABLE): Likewise.
2254 (I386_DR_SET_RW_LEN): Likewise.
2255 (I386_DR_GET_RW_LEN): Likewise.
2256 (I386_DR_WATCH_HIT): Likewise.
2257 (i386_wp_op_t): Likewise.
2258 (i386_show_dr): Likewise.
2259 (i386_length_and_rw_bits): Likewise.
2260 (i386_insert_aligned_watchpoint): Likewise.
2261 (i386_remove_aligned_watchpoint): Likewise.
2262 (i386_handle_nonaligned_watchpoint): Likewise.
2263 i386_update_inferior_debug_regs(): Likewise.
2264 (i386_dr_insert_watchpoint): Likewise.
2265 (i386_dr_remove_watchpoint): Likewise.
2266 (i386_dr_region_ok_for_watchpoint): Likewise.
2267 (i386_dr_stopped_data_address): Likewise.
2268 (i386_dr_stopped_by_watchpoint): Likewise.
2269
2270 2014-06-19 Gary Benson <gbenson@redhat.com>
2271
2272 * i386-low.c (i386_dr_show): Renamed to
2273 i386_show_dr and made static. All uses updated.
2274 (i386_dr_length_and_rw_bits): Renamed to
2275 i386_length_and_rw_bits and made static.
2276 All uses updated.
2277 (i386_dr_insert_aligned_watchpoint): Renamed to
2278 i386_insert_aligned_watchpoint and made static.
2279 All uses updated.
2280 (i386_dr_remove_aligned_watchpoint): Renamed to
2281 i386_remove_aligned_watchpoint and made static.
2282 All uses updated.
2283 (i386_dr_update_inferior_debug_regs): Renamed to
2284 i386_update_inferior_debug_regs and made static.
2285 All uses updated.
2286
2287 2014-06-18 Gary Benson <gbenson@redhat.com>
2288
2289 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2290 (i386_dr_low_can_set_control): Likewise.
2291 (i386_get_debug_register_length): Likewise.
2292 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2293 (i386_dr_low_can_set_control): Likewise.
2294 (i386_get_debug_register_length): Likewise.
2295
2296 2014-06-17 Gary Benson <gbenson@redhat.com>
2297
2298 * i386-low.h (i386-dregs.h): New include.
2299 (DR_FIRSTADDR): Now in i386-dregs.h.
2300 (DR_LASTADDR): Likewise.
2301 (DR_NADDR): Likewise.
2302 (DR_STATUS): Likewise.
2303 (DR_CONTROL): Likewise.
2304 (i386_debug_reg_state): Likewise.
2305 (i386_dr_insert_watchpoint): Likewise.
2306 (i386_dr_remove_watchpoint): Likewise.
2307 (i386_dr_region_ok_for_watchpoint): Likewise.
2308 (i386_dr_stopped_data_address): Likewise.
2309 (i386_dr_stopped_by_watchpoint): Likewise.
2310 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2311
2312 2014-06-18 Gary Benson <gbenson@redhat.com>
2313
2314 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2315 i386_dr_insert_watchpoint.
2316 (i386_low_remove_watchpoint): Renamed to
2317 i386_dr_remove_watchpoint.
2318 (i386_low_region_ok_for_watchpoint): Renamed to
2319 i386_dr_region_ok_for_watchpoint.
2320 (i386_low_stopped_data_address): Renamed to
2321 i386_dr_stopped_data_address.
2322 (i386_low_stopped_by_watchpoint): Renamed to
2323 i386_dr_stopped_by_watchpoint.
2324 * i386-low.c (i386_show_dr): Renamed to
2325 i386_dr_show and made nonstatic. All uses updated.
2326 (i386_length_and_rw_bits): Renamed to
2327 i386_dr_length_and_rw_bits and made nonstatic.
2328 All uses updated.
2329 (i386_insert_aligned_watchpoint): Renamed to
2330 i386_dr_insert_aligned_watchpoint and made nonstatic.
2331 All uses updated.
2332 (i386_remove_aligned_watchpoint): Renamed to
2333 i386_dr_remove_aligned_watchpoint and made nonstatic.
2334 All uses updated.
2335 (i386_update_inferior_debug_regs): Renamed to
2336 i386_dr_update_inferior_debug_regs and made nonstatic.
2337 All uses updated.
2338 (i386_low_insert_watchpoint): Renamed to
2339 i386_dr_insert_watchpoint. All uses updated.
2340 (i386_low_remove_watchpoint): Renamed to
2341 i386_dr_remove_watchpoint. All uses updated.
2342 (i386_low_region_ok_for_watchpoint): Renamed to
2343 i386_dr_region_ok_for_watchpoint. All uses updated.
2344 (i386_low_stopped_data_address): Renamed to
2345 i386_dr_stopped_data_address. All uses updated.
2346 (i386_low_stopped_by_watchpoint): Renamed to
2347 i386_dr_stopped_by_watchpoint. All uses updated.
2348
2349 2014-06-18 Gary Benson <gbenson@redhat.com>
2350
2351 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2352 (i386_dr_low_can_set_control): Likewise.
2353 (i386_insert_aligned_watchpoint): New check.
2354
2355 2014-06-18 Gary Benson <gbenson@redhat.com>
2356
2357 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2358 Renamed to state.
2359
2360 2014-06-18 Gary Benson <gbenson@redhat.com>
2361
2362 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2363 instead of fatal and error.
2364 (i386_handle_nonaligned_watchpoint): Likewise.
2365
2366 2014-06-18 Gary Benson <gbenson@redhat.com>
2367
2368 * i386-low.c (i386_get_debug_register_length): New macro.
2369 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2370 (i386_show_dr): Use debug_printf instead of fprintf. Use
2371 phex to format values.
2372
2373 2014-06-18 Gary Benson <gbenson@redhat.com>
2374
2375 * i386-low.h: Comment changes.
2376 * i386-low.c: Likewise.
2377
2378 2014-06-18 Gary Benson <gbenson@redhat.com>
2379
2380 * i386-low.c: Whitespace changes.
2381
2382 2014-06-12 Tom Tromey <tromey@redhat.com>
2383
2384 * utils.c (freeargv): Remove.
2385
2386 2014-06-12 Tom Tromey <tromey@redhat.com>
2387
2388 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2389 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2390 (parse_debug_format_options): Likewise.
2391 (gdbserver_usage): Likewise.
2392 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2393 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2394 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2395 against libiberty.
2396 ($(LIBGNU)): Depend on libiberty.
2397 (all-lib): Recurse into all subdirs.
2398 (install-only): Invoke "install" target in subdirs.
2399 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2400 targets.
2401 * configure: Rebuild.
2402 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2403 for vasprintf, vsnprintf, or gettimeofday.
2404 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2405 srv_tgtobj.
2406
2407 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2408
2409 * development.sh: Delete.
2410 * Makefile.in (config.status): Adjust dependency on development.sh.
2411 * configure.ac: Adjust development.sh source call.
2412 * configure: Regenerate.
2413
2414 2014-06-02 Pedro Alves <palves@redhat.com>
2415
2416 * ax.c (gdb_free_agent_expr): New function.
2417 * ax.h (gdb_free_agent_expr): New declaration.
2418 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2419 list.
2420 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2421 static.
2422 (clear_breakpoint_conditions_and_commands): New function.
2423 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2424 (clear_breakpoint_conditions_and_commands): New declaration.
2425
2426 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2427
2428 * linux-aarch64-low.c (asm/ptrace.h): Include.
2429
2430 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2431
2432 Fix TLS access for -static -pthread.
2433 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2434 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2435 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2436
2437 2014-05-20 Pedro Alves <palves@redhat.com>
2438
2439 * linux-aarch64-low.c (aarch64_insert_point)
2440 (aarch64_remove_point): No longer check whether the type is
2441 supported here. Adjust to new interface.
2442 (the_low_target): Install aarch64_supports_z_point_type as
2443 supports_z_point_type method.
2444 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2445 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2446 instead of a Z packet char. Adjust.
2447 (arm_supports_z_point_type): New function.
2448 (arm_insert_point, arm_remove_point): Adjust to new interface.
2449 (the_low_target): Install arm_supports_z_point_type.
2450 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2451 (cris_insert_point, cris_remove_point): Adjust to new interface.
2452 Don't check whether the type is supported here.
2453 (the_low_target): Install cris_supports_z_point_type.
2454 * linux-low.c (linux_supports_z_point_type): New function.
2455 (linux_insert_point, linux_remove_point): Adjust to new interface.
2456 * linux-low.h (struct linux_target_ops) <insert_point,
2457 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2458 raw_breakpoint pointer parameter.
2459 <supports_z_point_type>: New method.
2460 * linux-mips-low.c (mips_supports_z_point_type): New function.
2461 (mips_insert_point, mips_remove_point): Adjust to new interface.
2462 Use mips_supports_z_point_type.
2463 (the_low_target): Install mips_supports_z_point_type.
2464 * linux-ppc-low.c (the_low_target): Install NULL as
2465 supports_z_point_type method.
2466 * linux-s390-low.c (the_low_target): Install NULL as
2467 supports_z_point_type method.
2468 * linux-sparc-low.c (the_low_target): Install NULL as
2469 supports_z_point_type method.
2470 * linux-x86-low.c (x86_supports_z_point_type): New function.
2471 (x86_insert_point): Adjust to new insert_point interface. Use
2472 insert_memory_breakpoint. Adjust to new
2473 i386_low_insert_watchpoint interface.
2474 (x86_remove_point): Adjust to remove_point interface. Use
2475 remove_memory_breakpoint. Adjust to new
2476 i386_low_remove_watchpoint interface.
2477 (the_low_target): Install x86_supports_z_point_type.
2478 * lynx-low.c (lynx_target_ops): Install NULL as
2479 supports_z_point_type callback.
2480 * nto-low.c (nto_supports_z_point_type): New.
2481 (nto_insert_point, nto_remove_point): Adjust to new interface.
2482 (nto_target_ops): Install nto_supports_z_point_type.
2483 * mem-break.c: Adjust intro comment.
2484 (struct raw_breakpoint) <raw_type, size>: New fields.
2485 <inserted>: Update comment.
2486 <shlib_disabled>: Delete field.
2487 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2488 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2489 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2490 (raw_bkpt_type_to_target_hw_bp_type): New function.
2491 (find_enabled_raw_code_breakpoint_at): New function.
2492 (find_raw_breakpoint_at): New type and size parameters. Use them.
2493 (insert_memory_breakpoint): New function, based off
2494 set_raw_breakpoint_at.
2495 (remove_memory_breakpoint): New function.
2496 (set_raw_breakpoint_at): Reimplement.
2497 (set_breakpoint): New, based on set_breakpoint_at.
2498 (set_breakpoint_at): Reimplement.
2499 (delete_raw_breakpoint): Go through the_target->remove_point
2500 instead of assuming memory breakpoints.
2501 (find_gdb_breakpoint_at): Delete.
2502 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2503 (find_gdb_breakpoint): New function.
2504 (set_gdb_breakpoint_at): Delete.
2505 (z_type_supported): New function.
2506 (set_gdb_breakpoint_1): New function, loosely based off
2507 set_gdb_breakpoint_at.
2508 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2509 (delete_gdb_breakpoint_at): Delete.
2510 (delete_gdb_breakpoint_1): New function, loosely based off
2511 delete_gdb_breakpoint_at.
2512 (delete_gdb_breakpoint): New function.
2513 (clear_gdb_breakpoint_conditions): Rename to ...
2514 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2515 breakpoint.
2516 (add_condition_to_breakpoint): Make static.
2517 (add_breakpoint_condition): Take a struct breakpoint pointer
2518 instead of an address. Adjust.
2519 (gdb_condition_true_at_breakpoint): Rename to ...
2520 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2521 z_type parameter.
2522 (gdb_condition_true_at_breakpoint): Reimplement.
2523 (add_breakpoint_commands): Take a struct breakpoint pointer
2524 instead of an address. Adjust.
2525 (gdb_no_commands_at_breakpoint): Rename to ...
2526 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2527 parameter. Return true if no breakpoint was found. Change debug
2528 output.
2529 (gdb_no_commands_at_breakpoint): Reimplement.
2530 (run_breakpoint_commands): Rename to ...
2531 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2532 and change return type to boolean.
2533 (run_breakpoint_commands): New function.
2534 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2535 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2536 breakpoint. Go through the_target->remove_point instead of
2537 assuming memory breakpoint.
2538 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2539 software and hardware breakpoints.
2540 (reinsert_raw_breakpoint): Go through the_target->insert_point
2541 instead of assuming memory breakpoint.
2542 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2543 software and hardware breakpoints.
2544 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2545 Check both software and hardware breakpoints.
2546 (validate_inserted_breakpoint): Assert the breakpoint is a
2547 software breakpoint. Set the inserted flag to -1 instead of
2548 setting shlib_disabled.
2549 (delete_disabled_breakpoints): Adjust.
2550 (validate_breakpoints): Only validate software breakpoints.
2551 Adjust to inserted flag change.
2552 (check_mem_read, check_mem_write): Skip breakpoint types other
2553 than software breakpoints. Adjust to inserted flag change.
2554 * mem-break.h (enum raw_bkpt_type): New enum.
2555 (raw_breakpoint, struct process_info): Forward declare.
2556 (Z_packet_to_target_hw_bp_type): Delete declaration.
2557 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2558 (set_gdb_breakpoint, delete_gdb_breakpoint)
2559 (clear_breakpoint_conditions): New declarations.
2560 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2561 (breakpoint_inserted_here): Update comment.
2562 (add_breakpoint_condition, add_breakpoint_commands): Replace
2563 address parameter with a breakpoint pointer parameter.
2564 (gdb_breakpoint_here): Update comment.
2565 (delete_gdb_breakpoint_at): Delete.
2566 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2567 * server.c (process_point_options): Take a struct breakpoint
2568 pointer instead of an address. Adjust.
2569 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2570 delete_gdb_breakpoint.
2571 * spu-low.c (spu_target_ops): Install NULL as
2572 supports_z_point_type method.
2573 * target.h: Include mem-break.h.
2574 (struct target_ops) <prepare_to_access_memory>: Update comment.
2575 <supports_z_point_type>: New field.
2576 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2577 instead of a char. Also take a raw breakpoint pointer.
2578 * win32-arm-low.c (the_low_target): Install NULL as
2579 supports_z_point_type.
2580 * win32-i386-low.c (i386_supports_z_point_type): New function.
2581 (i386_insert_point, i386_remove_point): Adjust to new interface.
2582 (the_low_target): Install i386_supports_z_point_type.
2583 * win32-low.c (win32_supports_z_point_type): New function.
2584 (win32_insert_point, win32_remove_point): Adjust to new interface.
2585 (win32_target_ops): Install win32_supports_z_point_type.
2586 * win32-low.h (struct win32_target_ops):
2587 <supports_z_point_type>: New method.
2588 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2589 instead of a char. Also take a raw breakpoint pointer.
2590
2591 2014-05-20 Pedro Alves <palves@redhat.com>
2592
2593 * mem-break.h: Include break-common.h.
2594 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2595 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2596 (Z_packet_to_target_hw_bp_type): New declaration.
2597 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2598 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2599 (Z_PACKET_ACCESS_WP): Delete macros.
2600 (Z_packet_to_hw_type): Delete function.
2601 * i386-low.h: Don't include break-common.h here.
2602 (Z_packet_to_hw_type): Delete declaration.
2603 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2604 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2605 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2606 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2607 * linux-aarch64-low.c: Don't include break-common.h here.
2608 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2609 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2610 (Z_packet_to_target_hw_bp_type): Delete function.
2611 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2612 function.
2613 (mips_insert_point, mips_remove_point): Use
2614 Z_packet_to_target_hw_bp_type.
2615
2616 2014-05-20 Pedro Alves <palves@redhat.com>
2617
2618 * linux-aarch64-low.c: Include break-common.h.
2619 (enum target_point_type): Delete.
2620 (Z_packet_to_point_type): Rename to ...
2621 (Z_packet_to_target_hw_bp_type): ... this, and return a
2622 target_hw_bp_type instead.
2623 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2624 instead of an enum target_point_type.
2625 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2626 breakpoint type.
2627 (aarch64_dr_state_insert_one_point)
2628 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2629 (aarch64_handle_aligned_watchpoint)
2630 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2631 Take an enum target_hw_bp_type instead of an enum
2632 target_point_type.
2633 (aarch64_supports_z_point_type): New function.
2634 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2635 use Z_packet_to_target_hw_bp_type.
2636
2637 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2638
2639 * configure.ac: Only use -Werror by default when DEVELOPMENT
2640 is true.
2641 * configure: Regenerate.
2642
2643 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2644
2645 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2646 * linux-x86-low.c (X86_64_USER_REGS): New.
2647 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2648
2649 2014-04-28 Yao Qi <yao@codesourcery.com>
2650
2651 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2652 name.
2653
2654 2014-04-25 Pedro Alves <palves@redhat.com>
2655
2656 PR server/16255
2657 * linux-low.c (linux_attach_fail_reason_string): New function.
2658 (linux_attach_lwp): Delete.
2659 (linux_attach_lwp_1): Rename to ...
2660 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2661 argument. Remove "initial" parameter. Return int instead of
2662 void. Don't error or warn here.
2663 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2664 failure to attach to the tgid. Call warning when failing to
2665 attach to an lwp.
2666 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2667 argument. Remove "initial" parameter. Return int instead of
2668 void. Don't error or warn here.
2669 (linux_attach_fail_reason_string): New declaration.
2670 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2671 interface change. Use linux_attach_fail_reason_string.
2672
2673 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2674 Walfred Tedeschi <walfred.tedeschi@intel.com>
2675
2676 * Makefile.in: Added rules to handle new files
2677 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2678 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2679 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2680 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2681 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2682 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2683 x32-avx512-linux.o.
2684 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2685 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2686 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2687 i386/x32-avx512.xml.
2688 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2689 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2690 i386/x32-avx512-linux.xml.
2691 * i387-fp.c (num_avx512_k_registers): New constant for number
2692 of K registers.
2693 (num_avx512_zmmh_low_registers): New constant for number of
2694 lower ZMM registers (0-15).
2695 (num_avx512_zmmh_high_registers): New constant for number of
2696 higher ZMM registers (16-31).
2697 (num_avx512_ymmh_registers): New contant for number of higher
2698 YMM registers (ymm16-31 added by avx521 on x86_64).
2699 (num_avx512_xmm_registers): New constant for number of higher
2700 XMM registers (xmm16-31 added by AVX512 on x86_64).
2701 (struct i387_xsave): Add space for AVX512 registers.
2702 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2703 Add code to handle AVX512 registers.
2704 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2705 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2706 prototypei from generated file.
2707 (tdesc_amd64_avx512_linux): Likewise.
2708 (init_registers_x32_avx512_linux): Likewise.
2709 (tdesc_x32_avx512_linux): Likewise.
2710 (init_registers_i386_avx512_linux): Likewise.
2711 (tdesc_i386_avx512_linux): Likewise.
2712 (x86_64_regmap): Add AVX512 registers.
2713 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2714 mask.
2715 (initialize_low_arch): Add code to initialize AVX512 registers.
2716
2717 2014-04-23 Pedro Alves <palves@redhat.com>
2718
2719 * mem-break.c (find_gdb_breakpoint_at): Make static.
2720 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2721
2722 2014-04-23 Pedro Alves <palves@redhat.com>
2723
2724 * i386-low.c: Don't include break-common.h here.
2725 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2726 prototype to take target_hw_bp_type as argument instead of a Z
2727 packet char.
2728 * i386-low.h: Include break-common.h here.
2729 (Z_packet_to_hw_type): Declare.
2730 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2731 prototypes.
2732 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2733 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2734 (x86_remove_point): Convert the packet number to a
2735 target_hw_bp_type before calling i386_low_remove_watchpoint.
2736 * win32-i386-low.c (i386_insert_point): Convert the packet number
2737 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2738 (i386_remove_point): Convert the packet number to a
2739 target_hw_bp_type before calling i386_low_remove_watchpoint.
2740
2741 2014-04-23 Pedro Alves <palves@redhat.com>
2742
2743 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2744
2745 2014-04-10 Pedro Alves <palves@redhat.com>
2746
2747 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2748 Check if the condition or command is NULL before checking if the
2749 breakpoint is known. On success, return true.
2750 * mem-break.h (add_breakpoint_condition): Document return.
2751 (add_breakpoint_commands): Add describing comment.
2752 * server.c (skip_to_semicolon): New function.
2753 (process_point_options): Use it.
2754
2755 2014-04-09 Pedro Alves <palves@redhat.com>
2756
2757 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2758 to lwpid_of.
2759
2760 2014-02-27 Pedro Alves <palves@redhat.com>
2761
2762 PR 12702
2763 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2764 macros.
2765 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2766 output.
2767 (last_thread_of_process_p): Take a PID argument instead of a
2768 thread pointer.
2769 (linux_wait_for_lwp): Delete.
2770 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2771 functions.
2772 (linux_low_filter_event): New function, party factored out from
2773 linux_wait_for_event.
2774 (linux_wait_for_event): Rename to ...
2775 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2776 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2777 sigsuspend. Check for zombie leaders.
2778 (linux_wait_for_event): Reimplement as wrapper around
2779 linux_wait_for_event_filtered.
2780 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2781 a normal or signal exit is seen, it's the whole process exiting.
2782 (wait_for_sigstop): No longer a for_each_inferior callback.
2783 Rewrite on top of linux_wait_for_event_filtered.
2784 (stop_all_lwps): Call wait_for_sigstop directly.
2785 * server.c (resume, handle_target_event): Handle
2786 TARGET_WAITKIND_NO_RESUMED.
2787
2788 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2789
2790 * win32-low.c (psapi_get_dll_name,
2791 * win32_CreateToolhelp32Snapshot): Delete.
2792 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2793 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2794 Delete.
2795 (handle_load_dll): Add function description.
2796 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2797
2798 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2799
2800 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2801 Add comment.
2802 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2803 base address when calling win32_add_one_solib.
2804 (handle_load_dll): Delete local variable load_addr.
2805 Remove 0x1000 offset applied to DLL base address when calling
2806 win32_add_one_solib.
2807 (handle_unload_dll): Add comment.
2808
2809 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2810
2811 * win32-low.c (win32_add_all_dlls): Renames
2812 win32_ensure_ntdll_loaded. Rewrite function documentation.
2813 Adjust implementation to always load all DLLs.
2814 Add 0x1000 offset to DLL base address when calling
2815 win32_add_one_solib.
2816 (child_initialization_done): New static global.
2817 (do_initial_child_stuff): Set child_initialization_done to
2818 zero during child initialization, and 1 after. Replace call
2819 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2820 Add comment.
2821 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2822 (handle_unload_dll): Add function documentation.
2823 (get_child_debug_event): Ignore load and unload DLL events
2824 during child initialization.
2825
2826 2014-02-20 Doug Evans <dje@google.com>
2827
2828 Remove global all_lwps.
2829 * inferiors.h (ptid_of): Move here from linux-low.h.
2830 (pid_of, lwpid_of): Ditto.
2831 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2832 parameter is a struct thread_info * now.
2833 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2834 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2835 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2836 directly.
2837 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2838 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2839 * linux-arm-low.c (update_registers_callback): Update, "entry"
2840 parameter is a struct thread_info * now.
2841 Fetch lwpid from current_inferior directly.
2842 (arm_insert_point): Pass &all_threads to find_inferior instead of
2843 &all_lwps.
2844 (arm_remove_point): Ditto.
2845 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2846 (arm_prepare_to_resume): Fetch pid from thread.
2847 (arm_read_description): Fetch lwpid from current_inferior directly.
2848 * linux-low.c (all_lwps): Delete.
2849 (delete_lwp): Delete call to remove_inferior.
2850 (handle_extended_wait): Fetch lwpid from thread.
2851 (add_lwp): Don't set lwp->entry.id. Remove call to
2852 add_inferior_to_list.
2853 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2854 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2855 (kill_one_lwp_callback): Ditto.
2856 (linux_kill): Don't dereference NULL pointer.
2857 Fetch ptid,lwpid from thread.
2858 (get_detach_signal): Fetch ptid from thread.
2859 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2860 Simplify call to regcache_invalidate_thread.
2861 (delete_lwp_callback): Update, "entry" parameter is a
2862 struct thread_info * now. Fetch pid from thread.
2863 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2864 (status_pending_p_callback): Update, "entry" parameter is a
2865 struct thread_info * now. Fetch ptid from thread.
2866 (find_lwp_pid): Update, "entry" parameter is a
2867 struct thread_info * now.
2868 (linux_wait_for_lwp): Fetch pid from thread.
2869 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2870 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2871 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2872 (dequeue_one_deferred_signal): Ditto.
2873 (cancel_breakpoint): Fetch ptid from current_inferior.
2874 (linux_wait_for_event): Pass &all_threads to find_inferior,
2875 not &all_lwps. Fetch ptid, lwpid from thread.
2876 (count_events_callback): Update, "entry" parameter is a
2877 struct thread_info * now.
2878 (select_singlestep_lwp_callback): Ditto.
2879 (select_event_lwp_callback): Ditto.
2880 (cancel_breakpoints_callback): Ditto.
2881 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2882 not &all_lwps.
2883 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2884 (unsuspend_one_lwp): Update, "entry" parameter is a
2885 struct thread_info * now.
2886 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2887 not &all_lwps.
2888 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2889 Fetch lwpid from thread, not lwp.
2890 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2891 Pass &all_threads to find_inferior, not &all_lwps.
2892 (send_sigstop): Fetch lwpid from thread, not lwp.
2893 (send_sigstop_callback): Update, "entry" parameter is a
2894 struct thread_info * now.
2895 (suspend_and_send_sigstop_callback): Ditto.
2896 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2897 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2898 struct thread_info * now.
2899 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2900 from thread, lwp.
2901 (lwp_running): Update, "entry" parameter is a
2902 struct thread_info * now.
2903 (stop_all_lwps): Fetch ptid from thread.
2904 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2905 (linux_resume_one_lwp): Fetch lwpid from thread.
2906 (linux_set_resume_request): Update, "entry" parameter is a
2907 struct thread_info * now. Fetch pid, lwpid from thread.
2908 (resume_status_pending_p): Update, "entry" parameter is a
2909 struct thread_info * now.
2910 (need_step_over_p): Ditto. Fetch lwpid from thread.
2911 (start_step_over): Fetch lwpid from thread.
2912 (linux_resume_one_thread): Update, "entry" parameter is a
2913 struct thread_info * now. Fetch lwpid from thread.
2914 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2915 (proceed_one_lwp): Update, "entry" parameter is a
2916 struct thread_info * now. Fetch lwpid from thread.
2917 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2918 struct thread_info * now.
2919 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2920 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2921 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2922 directly.
2923 (regsets_store_inferior_registers): Ditto.
2924 (fetch_register, store_register): Ditto.
2925 (linux_read_memory, linux_write_memory): Ditto.
2926 (linux_request_interrupt): Ditto.
2927 (linux_read_auxv): Ditto.
2928 (linux_xfer_siginfo): Ditto.
2929 (linux_qxfer_spu): Ditto.
2930 (linux_qxfer_libraries_svr4): Ditto.
2931 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2932 moved to inferiors.h.
2933 (get_lwp): Delete.
2934 (get_thread_lwp): Update.
2935 (struct lwp_info): Delete member "entry". Simplify comment for
2936 member "thread".
2937 (all_lwps): Delete.
2938 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2939 current_inferior directly.
2940 (update_watch_registers_callback): Update, "entry" parameter is a
2941 struct thread_info * now. Fetch pid from thread.
2942 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2943 (mips_insert_point): Fetch lwpid from current_inferior.
2944 Pass &all_threads to find_inferior, not &all_lwps.
2945 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2946 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2947 directly.
2948 (mips_stopped_data_address): Ditto.
2949 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2950 directly.
2951 * linux-tile-low.c (tile_arch_setup): Ditto.
2952 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2953 (update_debug_registers_callback): Update, "entry" parameter is a
2954 struct thread_info * now. Fetch pid from thread.
2955 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2956 Pass &all_threads to find_inferior, not &all_lwps.
2957 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2958 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2959 Pass &all_threads to find_inferior, not &all_lwps.
2960 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2961 (i386_dr_low_get_status): Ditto.
2962 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2963 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2964 (x86_linux_read_description): Ditto.
2965 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2966
2967 2014-02-20 Doug Evans <dje@google.com>
2968
2969 * inferiors.c (get_first_inferior): Fix buglet.
2970
2971 2014-02-19 Doug Evans <dje@google.com>
2972
2973 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2974 * inferiors.c (add_thread): Change result type to struct thread_info *.
2975 All callers updated.
2976 (add_lwp): Call add_thread here instead of in callers.
2977 All callers updated.
2978 * linux-low.h (get_lwp_thread): Rewrite.
2979 (struct lwp_info): New member "thread".
2980
2981 2014-02-19 Doug Evans <dje@google.com>
2982
2983 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2984 All callers updated.
2985
2986 2014-02-19 Doug Evans <dje@google.com>
2987
2988 * inferiors.c (add_thread): Fix whitespace.
2989
2990 2014-02-19 Doug Evans <dje@google.com>
2991
2992 * dll.c (clear_dlls): Replace accessing list implemention details
2993 with API function.
2994 * gdbthread.h (get_first_thread): Declare.
2995 * inferiors.c (for_each_inferior_with_data): New function.
2996 (get_first_thread): New function.
2997 (find_thread_ptid): Simplify.
2998 (get_first_inferior): New function.
2999 (clear_list): Delete.
3000 (one_inferior_p): New function.
3001 (clear_inferior_list): New function.
3002 (clear_inferiors): Update.
3003 * inferiors.h (for_each_inferior_with_data): Declare.
3004 (clear_inferior_list): Declare.
3005 (one_inferior_p): Declare.
3006 (get_first_inferior): Declare.
3007 * linux-low.c (linux_wait_for_event): Replace accessing list
3008 implemention details with API function.
3009 * server.c (target_running): Ditto.
3010 (accumulate_file_name_length): New function.
3011 (emit_dll_description): New function.
3012 (handle_qxfer_libraries): Replace accessing list implemention
3013 details with API function.
3014 (handle_qxfer_threads_worker): New function.
3015 (handle_qxfer_threads_proper): Replace accessing list implemention
3016 details with API function.
3017 (handle_query): Ditto.
3018 (visit_actioned_threads_callback_ftype): New typedef.
3019 (visit_actioned_threads_data): New struct.
3020 (visit_actioned_threads): Rewrite to be find_inferior callback.
3021 (resume): Call find_inferior.
3022 (handle_status): Replace accessing list implemention
3023 details with API function.
3024 (process_serial_event): Replace accessing list implemention details
3025 with API function.
3026 * target.c (set_desired_inferior): Replace accessing list implemention
3027 details with API function.
3028 * tracepoint.c (same_process_p): New function.
3029 (gdb_agent_about_to_close): Replace accessing list implemention
3030 details with API function.
3031 * win32-low.c (child_delete_thread): Replace accessing list
3032 implemention details with API function.
3033 (match_dll_by_basename): New function.
3034 (dll_is_loaded_by_basename): New function.
3035 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3036 details call to dll_is_loaded_by_basename.
3037
3038 2014-02-19 Doug Evans <dje@google.com>
3039
3040 * dll.h (struct dll_info): Add comment.
3041 * gdbthread.h (struct thread_info): Add comment.
3042 (current_ptid): Simplify.
3043 * inferiors.c (add_process): Update.
3044 (remove_process): Update.
3045 * inferiors.h (struct process_info): Rename member "head" to "entry".
3046 * linux-low.c (delete_lwp): Update.
3047 (add_lwp): Update.
3048 (last_thread_of_process_p): Update.
3049 (kill_one_lwp_callback, linux_kill): Update.
3050 (status_pending_p_callback): Update.
3051 (wait_for_sigstop): Update. Simplify read of ptid.
3052 (start_step_over): Update.
3053 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3054 (get_lwp_thread): Update.
3055 (struct lwp_info): Rename member "head" to "entry".
3056 * regcache.h (inferior_list_entry): Delete.
3057 * server.c (kill_inferior_callback): Update.
3058 (detach_or_kill_inferior_callback): Update.
3059 (print_started_pid): Update.
3060 (print_attached_pid): Update.
3061 (process_serial_event): Simplify read of ptid.
3062 * thread-db.c (thread_db_create_event): Update.
3063 (thread_db_get_tls_address): Update.
3064 * win32-low.c (current_inferior_ptid): Simplify.
3065
3066 2014-02-19 Tom Tromey <tromey@redhat.com>
3067
3068 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3069 argument.
3070 (target_supports_btrace): Update.
3071
3072 2014-02-14 Yao Qi <yao@codesourcery.com>
3073
3074 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3075 (rsp-low-ipa.o): New target.
3076
3077 2014-02-12 Tom Tromey <tromey@redhat.com>
3078
3079 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3080 convert_ascii_to_int.
3081 * regcache.c (registers_to_string): Likewise.
3082 * remote-utils.c (decode_M_packet): Likewise.
3083 * server.c (process_serial_event): Likewise.
3084
3085 2014-02-12 Tom Tromey <tromey@redhat.com>
3086
3087 * server.c (handle_query, handle_v_run): Use hex2bin, not
3088 unhexify.
3089 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3090
3091 2014-02-12 Tom Tromey <tromey@redhat.com>
3092
3093 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3094 convert_int_to_ascii.
3095 * regcache.c (registers_to_string, collect_register_as_string):
3096 Likewise.
3097 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3098 Likewise.
3099 * server.c (process_serial_event): Likewise.
3100 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3101 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3102
3103 2014-02-12 Tom Tromey <tromey@redhat.com>
3104
3105 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3106 bin2hex, not hexify.
3107 * tracepoint.c (cmd_qtstatus): Likewise.
3108
3109 2014-02-12 Tom Tromey <tromey@redhat.com>
3110
3111 * remote-utils.c (monitor_output): Pass explicit length to
3112 hexify.
3113
3114 2014-02-12 Tom Tromey <tromey@redhat.com>
3115
3116 * tracepoint.c: Include rsp-low.h.
3117 * server.c: Include rsp-low.h.
3118 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3119 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3120 declare.
3121 * remote-utils.c: Include rsp-low.h.
3122 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3123 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3124 (convert_int_to_ascii, convert_ascii_to_int): Move to
3125 common/rsp-low.c.
3126 * regcache.c: Include rsp-low.h.
3127 * ax.c: Include rsp-low.h.
3128 * Makefile.in (SFILES): Add common/rsp-low.c.
3129 (OBS): Add rsp-low.o.
3130 (rsp-low.o): New target.
3131
3132 2014-02-12 Tom Tromey <tromey@redhat.com>
3133
3134 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3135 Include print-utils.h.
3136 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3137 (plongest, thirty_two, phex_nz): Remove.
3138 * Makefile.in (SFILES): Add common/print-utils.c.
3139 (OBS): Add print-utils.o.
3140 (print-utils-ipa.o): New target.
3141 (print-utils.o): New target.
3142 (IPA_OBJS): Add print-utils-ipa.o.
3143
3144 2014-02-06 Tom Tromey <tromey@redhat.com>
3145
3146 * Makefile.in (SFILES): Fix indentation.
3147
3148 2014-02-05 Doug Evans <dje@google.com>
3149
3150 * linux-low.c (linux_wait_for_event): Improve comment.
3151 (linux_wait_1): Keep current_inferior in sync with event_child.
3152
3153 2014-01-22 Doug Evans <dje@google.com>
3154
3155 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3156
3157 2014-01-22 Doug Evans <dje@google.com>
3158
3159 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3160 * configure: Regenerate.
3161 * config.in: Regenerate.
3162 * Makefile.in (SFILES): Add debug.c.
3163 (OBS): Add debug.o.
3164 * debug.c: New file.
3165 * debug.h: New file.
3166 * linux-aarch64-low.c (*): Update all debugging printfs to use
3167 debug_printf instead of fprintf.
3168 * linux-arm-low.c (*): Ditto.
3169 * linux-cris-low.c (*): Ditto.
3170 * linux-crisv32-low.c (*): Ditto.
3171 * linux-m32r-low.c (*): Ditto.
3172 * linux-sparc-low.c (*): Ditto.
3173 * linux-x86.c (*): Ditto.
3174 * linux-low.c (*): Ditto.
3175 (linux_wait_1): Add calls to debug_enter, debug_exit.
3176 (linux_wait): Remove redundant debugging printf.
3177 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3178 (linux_resume, unstop_all_lwps): Ditto.
3179 * mem-break.c (*): Update all debugging printfs to use
3180 debug_printf instead of fprintf.
3181 * remote-utils.c (*): Ditto.
3182 * thread-db.c (*): Ditto.
3183 * server.c #include <ctype.h>, "gdb_vecs.h".
3184 (debug_threads): Moved to debug.c.
3185 (*): Update all debugging printfs to use debug_printf instead of
3186 fprintf.
3187 (start_inferior): Replace call to fflush with call to debug_flush.
3188 (monitor_show_help): Mention set debug-format.
3189 (parse_debug_format_options): New function.
3190 (handle_monitor_command): Handle "monitor set debug-format".
3191 (gdbserver_usage): Mention --debug-format.
3192 (main): Parse --debug-format.
3193 * server.h (debug_threads): Declaration moved to debug.h.
3194 #include "debug.h".
3195 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3196 trace_debug_1 that uses debug_printf.
3197 (tracepoint_look_up_symbols): Update all debugging printfs to use
3198 debug_printf instead of fprintf.
3199
3200 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3201
3202 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3203 sys/ptrace.h.
3204
3205 2014-01-17 Pedro Alves <palves@redhat.com>
3206
3207 PR build/16445
3208 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3209 defined after including gdb_proc_service.h.
3210
3211 2014-01-16 Doug Evans <dje@google.com>
3212
3213 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3214 (match_dll): Use it.
3215
3216 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3217
3218 * target.h (target_ops) <read_btrace>: Change parameters and
3219 return type to allow error reporting.
3220 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3221 trace reading errors on.
3222 * linux-low.c (linux_low_read_btrace): Pass trace reading
3223 errors on.
3224 (linux_low_disable_btrace): New.
3225
3226 2014-01-15 Doug Evans <dje@google.com>
3227
3228 * inferiors.c (thread_id_to_gdb_id): Delete.
3229 * inferiors.h (thread_id_to_gdb_id): Delete.
3230
3231 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3232
3233 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3234 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3235 versions.
3236
3237 2014-01-08 Pedro Alves <palves@redhat.com>
3238
3239 * server.c (handle_status): Don't discard previous queued stop
3240 replies or thread's pending status here.
3241 (main) <disconnection>: Do it here instead.
3242
3243 2014-01-08 Pedro Alves <palves@redhat.com>
3244
3245 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3246 * server.c (visit_actioned_threads, handle_pending_status): New
3247 function.
3248 (handle_v_cont): Factor out parts to ...
3249 (resume): ... this new function. If in all-stop, and a thread
3250 being resumed has a pending status, report it without actually
3251 resuming.
3252 (myresume): Adjust to use the new 'resume' function.
3253 (clear_pending_status_callback, set_pending_status_callback)
3254 (find_status_pending_thread_callback): New functions.
3255 (handle_status): Handle the case of multiple threads having
3256 interesting statuses to report. Report threads' real last signal
3257 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3258 with an interesting thread to report the status for, instead of
3259 always reporting the status of the first thread.
3260
3261 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3262
3263 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3264 * gdbreplay.c (gdbreplay_version): Likewise.
3265
3266 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3267
3268 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3269 iov.iov_len with the real length in use.
3270
3271 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3272
3273 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3274 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3275 for all targets that use win32-low.c.
3276 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3277 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3278
3279 2013-12-13 Pedro Alves <palves@redhat.com>
3280
3281 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3282 if equal to TARGET_WAITKIND_LOADED.
3283 * win32-low.c (cached_status): New static global.
3284 (win32_wait): Add declaration.
3285 (do_initial_child_stuff): Flush all initial pending debug events
3286 up to the initial breakpoint.
3287 (win32_wait): If CACHED_STATUS was set, return that instead
3288 of doing a real wait. Remove the code resuming the execution
3289 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3290 during the initial phase. Also remove the code changing
3291 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3292 TARGET_WAITKIND_STOPPED.
3293
3294 2013-12-11 Yao Qi <yao@codesourcery.com>
3295
3296 * notif.c (handle_notif_ack): Return 0 if no notification
3297 matches.
3298
3299 2013-11-20 Doug Evans <dje@google.com>
3300
3301 * linux-low.c (linux_set_resume_request): Fix comment.
3302
3303 2013-11-20 Doug Evans <dje@google.com>
3304
3305 * linux-low.c (resume_status_pending_p): Tweak comment.
3306
3307 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3308
3309 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3310 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3311 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3312 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3313 (srv_amd64_regobj): Add amd64-mpx.o.
3314 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3315 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3316 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3317 * i387-fp.c (num_pl_bnd_register) Added constant.
3318 (num_pl_bnd_cfg_registers) Added constant.
3319 (struct i387_xsave) Added reserved area and MPX fields.
3320 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3321 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3322 function.
3323 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3324 (init_registers_amd64_mpx_linux): Declare new function.
3325 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3326 (x86_64_regmap): Add MPX registers.
3327 (x86_linux_read_description): Add MPX case.
3328 (initialize_low_arch): Initialize MPX targets.
3329
3330 2013-11-18 Tom Tromey <tromey@redhat.com>
3331
3332 * configure: Rebuild.
3333 * configure.ac: Don't check for stdlib.h.
3334 * gdbreplay.c: Unconditionally include stdlib.h.
3335
3336 2013-11-18 Tom Tromey <tromey@redhat.com>
3337
3338 * config.in: Rebuild.
3339 * configure: Rebuild.
3340 * configure.ac: Don't use AC_HEADER_DIRENT.
3341
3342 2013-11-18 Tom Tromey <tromey@redhat.com>
3343
3344 * server.h: Don't check HAVE_STRING_H.
3345 * gdbreplay.c: Don't check HAVE_STRING_H.
3346 * configure: Rebuild.
3347
3348 2013-11-18 Tom Tromey <tromey@redhat.com>
3349
3350 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3351 LIBGNU.
3352
3353 2013-11-08 Tom Tromey <tromey@redhat.com>
3354
3355 * configure, config.in: Rebuild.
3356 * configure.ac: Remove unused configury.
3357
3358 2013-11-08 Tom Tromey <tromey@redhat.com>
3359
3360 * acinclude.m4: Include common.m4, codeset.m4.
3361 * configure, config.in: Rebuild.
3362 * configure.ac: Use GDB_AC_COMMON.
3363
3364 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3365
3366 * linux-s390-low.c (HWCAP_S390_TE): New define.
3367 (s390_arch_setup): Consider the TE field in the HWCAP for
3368 determining 'have_regset_tdb'.
3369
3370 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3371
3372 PR gdb/16014
3373 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3374 call to sizeof.
3375
3376 2013-10-02 Pedro Alves <palves@redhat.com>
3377
3378 * server.c (process_serial_event): Don't output "GDBserver
3379 exiting" if GDB is connected through stdio.
3380 * target.c (mywait): Likewise, be silent if GDB is connected
3381 through stdio.
3382
3383 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3384
3385 * lynx-low.c (lynx_add_threads_after_attach): New function.
3386 (lynx_attach): Remove call to add_thread. Add call to
3387 lynx_add_threads_after_attach instead.
3388
3389 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3390
3391 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3392 * config.in, configure: Regenerated.
3393
3394 2013-09-18 Yao Qi <yao@codesourcery.com>
3395
3396 PR server/15959
3397 * server.c (start_inferior): Clear 'resume_info'.
3398
3399 2013-09-16 Jiong Wang <jiwang@tilera.com>
3400
3401 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3402 for each register.
3403
3404 2013-09-16 Jiong Wang <jiwang@tilera.com>
3405
3406 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3407 linux-tile-low.o to srv_tgtobj.
3408
3409 2013-09-16 Will Newton <will.newton@linaro.org>
3410
3411 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3412 out regs.
3413
3414 2013-09-06 Pedro Alves <palves@redhat.com>
3415
3416 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3417 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3418 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3419 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3420 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3421 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3422
3423 2013-09-06 Pedro Alves <palves@redhat.com>
3424
3425 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3426 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3427
3428 2013-09-06 Pedro Alves <palves@redhat.com>
3429
3430 * linux-amd64-ipa.c: Include tracepoint.h.
3431 * linux-i386-ipa.c: Include tracepoint.h.
3432
3433 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3434
3435 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3436 (ps_get_thread_area): New function.
3437
3438 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3439
3440 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3441 (initialize_low_arch): Call init_registers_crisv32 rather than
3442 init_register_crisv32.
3443
3444 2013-09-05 Pedro Alves <palves@redhat.com>
3445
3446 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3447 to ...
3448 * hostio.h: ... this new file.
3449 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3450 win32-low.c: Include hostio.h.
3451
3452 2013-09-05 Pedro Alves <palves@redhat.com>
3453
3454 * server.h (gdb_client_data, handler_func, callback_handler_func)
3455 (delete_file_handler, add_file_handler, append_callback_event)
3456 (delete_callback_event, start_event_loop, initialize_event_loop):
3457 Move to event-loop.h and include it.
3458 * event-loop.h: New file.
3459
3460 2013-09-05 Pedro Alves <palves@redhat.com>
3461
3462 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3463 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3464 (loaded_dll, unloaded_dll): Move to ...
3465 * dll.h: ... this new file.
3466 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3467
3468 2013-09-05 Pedro Alves <palves@redhat.com>
3469
3470 * server.h (current_process, get_thread_process, all_processes)
3471 (add_inferior_to_list, for_each_inferior, current_inferior)
3472 (remove_inferior, add_process, remove_process, find_process_pid)
3473 (have_started_inferiors_p, have_attached_inferiors_p)
3474 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3475 (clear_inferiors, find_inferior, find_inferior_id)
3476 (inferior_target_data, set_inferior_target_data)
3477 (inferior_regcache_data, set_inferior_regcache_data): Move to
3478 inferiors.h, and include it.
3479 * inferiors.h: New file.
3480
3481 2013-09-05 Pedro Alves <palves@redhat.com>
3482
3483 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3484 Move ...
3485 * ax.h: ... here.
3486
3487 2013-09-05 Pedro Alves <palves@redhat.com>
3488
3489 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3490 tracepoint.h.
3491 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3492 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3493 (handle_tracepoint_general_set, handle_tracepoint_query)
3494 (tracepoint_finished_step, tracepoint_was_hit)
3495 (release_while_stepping_state_list, current_traceframe)
3496 (in_readonly_region, traceframe_read_mem)
3497 (fetch_traceframe_registers, traceframe_read_sdata)
3498 (traceframe_read_info, struct fast_tpoint_collect_status)
3499 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3500 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3501 (supply_fast_tracepoint_registers)
3502 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3503 (ipa_tdesc, claim_trampoline_space)
3504 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3505 (agent_mem_read, agent_get_trace_state_variable_value)
3506 (agent_set_trace_state_variable_value, agent_tsv_read)
3507 (agent_mem_read_string, get_raw_reg_func_addr)
3508 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3509 * tracepoint.h: ... this new file.
3510
3511 2013-09-05 Pedro Alves <palves@redhat.com>
3512
3513 * server.h (perror_with_name, error, fatal, warning, paddress)
3514 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3515 include it.
3516 * utils.h: New file.
3517
3518 2013-09-05 Pedro Alves <palves@redhat.com>
3519
3520 * server.h (remote_debug, noack_mode, transport_is_reliable)
3521 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3522 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3523 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3524 (write_enn, initialize_async_io, enable_async_io)
3525 (disable_async_io, check_remote_input_interrupt_request)
3526 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3527 (dead_thread_notify, prepare_resume_reply)
3528 (decode_address_to_semicolon, decode_address, decode_m_packet)
3529 (decode_M_packet, decode_X_packet, decode_xfer_write)
3530 (decode_search_memory_packet, unhexify, hexify)
3531 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3532 (look_up_one_symbol, relocate_instruction)
3533 (monitor_output): Move to remote-utils.h, and include it.
3534 * remote-utils.h: New file.
3535
3536 2013-09-05 Pedro Alves <palves@redhat.com>
3537
3538 * server.h (_): Delete.
3539
3540 2013-09-02 Pedro Alves <palves@redhat.com>
3541
3542 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3543 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3544 allocated.
3545 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3546
3547 2013-09-02 Pierre Muller <muller@sourceware.org>
3548
3549 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3550 or WriteProcessMemory complete successfully and handle
3551 ERROR_PARTIAL_COPY error.
3552
3553 2013-09-02 Pedro Alves <palves@redhat.com>
3554
3555 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3556 error instead of EIO.
3557
3558 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3559
3560 PR server/15604
3561 * linux-low.c: Include filestuff.h.
3562 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3563 * lynx-low.c: Include filestuff.h.
3564 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3565 * server.c: Include filestuff.h.
3566 (main): Call notice_open_fds.
3567 * spu-low.c: Include filestuff.h.
3568 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3569
3570 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3571
3572 * Makefile.in: Explain why ../target and ../nat are not
3573 listed as include file search paths.
3574 (linux-waitpid.o): New object file rule.
3575 * configure.srv (srv_native_linux_obj): New variable.
3576 Replace all occurrences of linux native object files with
3577 $srv_native_linux_obj.
3578 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3579 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3580 (linux_enable_event_reporting): Remove declaration.
3581 (my_waitpid): Moved to common/linux-waitpid.c.
3582 (linux_wait_for_event): Pass ptid when calling
3583 linux_enable_event_reporting.
3584 (linux_supports_tracefork_flag): Remove.
3585 (linux_enable_event_reporting): Likewise.
3586 (linux_tracefork_grandchild): Remove.
3587 (STACK_SIZE): Moved to common/linux-ptrace.c.
3588 (linux_tracefork_child): Remove.
3589 (linux_test_for_tracefork): Remove.
3590 (linux_look_up_symbols): Call linux_supports_traceclone.
3591 (initialize_low): Remove call to linux_test_for_tracefork.
3592 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3593 common/linux-ptrace.h.
3594 (PTRACE_TYPE_ARG4): Likewise.
3595 Include linux-ptrace.h.
3596
3597 2013-08-21 Pedro Alves <palves@redhat.com>
3598
3599 * config.in: Renegerate.
3600
3601 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3602
3603 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3604 (SFILES): Remove $(srcdir)/common/target-common.c and
3605 add $(srcdir)/target/waitstatus.c.
3606 (OBS): Remove target-common.o and add waitstatus.o.
3607 (server_h): Remove $(srcdir)/../common/target-common.h and
3608 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3609 and $(srcdir)/../target/waitstatus.h.
3610 (target-common.o): Remove.
3611 (waitstatus.o): New target object file.
3612 * target.h: Do not include target-common.h and
3613 include target/resume.h, target/wait.h and
3614 target/waitstatus.h.
3615
3616 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3617
3618 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3619 to PTRACE_TYPE_ARG3.
3620 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3621 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3622 PTRACE_TYPE_ARG4.
3623 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3624 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3625
3626 2013-07-27 Jie Zhang <jie@codesourcery.com>
3627 Daniel Jacobowitz <dan@codesourcery.com>
3628 Yao Qi <yao@codesourcery.com>
3629
3630 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3631 (mips-linux-watch.o): New rule.
3632 (mips_linux_watch_h): New variable.
3633 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3634 srv_tgtobj.
3635 * linux-mips-low.c: Include mips-linux-watch.h.
3636 (struct arch_process_info, struct arch_lwp_info): New.
3637 (update_watch_registers_callback): New function.
3638 (mips_linux_new_process, mips_linux_new_thread) New functions.
3639 (mips_linux_prepare_to_resume, mips_insert_point): New
3640 functions.
3641 (mips_remove_point, mips_stopped_by_watchpoint): New
3642 functions.
3643 (rsp_bp_type_to_target_hw_bp_type): New function.
3644 (mips_stopped_data_address): New function.
3645 (the_low_target): Add watchpoint support functions.
3646
3647 2013-07-27 Yao Qi <yao@codesourcery.com>
3648
3649 * i386-low.c: Include break-common.h.
3650 (enum target_hw_bp_type): Remove.
3651
3652 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3653
3654 * Makefile.in (SFILES): /common/target-common.c.
3655 (OBS): Add target-common.o.
3656 (server_h): Add $(srcdir)/../common/target-common.h.
3657 (target-common.o): New target.
3658 * server.c (queue_stop_reply_callback): Free
3659 status string after use.
3660 * target.c (target_waitstatus_to_string): Remove.
3661 * target.h: Include target-common.h.
3662 (resume_kind): Likewise.
3663 (target_waitkind): Likewise.
3664 (target_waitstatus): Likewise.
3665 (TARGET_WNOHANG): Likewise.
3666
3667 2013-07-04 Yao Qi <yao@codesourcery.com>
3668
3669 * Makefile.in (host_alias): Use @host_noncanonical@.
3670 (target_alias): Use @target_noncanonical@.
3671 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3672 ACX_NONCANONICAL_HOST.
3673 * configure: Regenerated.
3674
3675 Revert:
3676 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3677
3678 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3679 * configure: Rebuild.
3680 * Makefile.in (version_host, version_target): Get from configure.
3681 (version.c): Use $(version_host) and $(version_target).
3682
3683 2013-07-03 Pedro Alves <palves@redhat.com>
3684
3685 * Makefile.in (config.status): Depend on development.sh.
3686 * acinclude.m4: Include libmcheck.m4.
3687 * configure: Regenerate.
3688
3689 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3690
3691 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3692 attribute inside the parentheses.
3693 (winapi_DebugSetProcessKillOnExit): Ditto.
3694 (winapi_DebugBreakProcess): Ditto.
3695 (winapi_GenerateConsoleCtrlEvent): Ditto.
3696
3697 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3698
3699 * notif.h (notif_event): Add a dummy member to avoid compiler
3700 errors.
3701
3702 2013-07-01 Pedro Alves <palves@redhat.com>
3703
3704 * hostio.c (HOSTIO_PATH_MAX): Define.
3705 (require_filename, handle_open, handle_unlink, handle_readlink):
3706 Use it.
3707
3708 2013-07-01 Pedro Alves <palves@redhat.com>
3709
3710 * server.h: Include "pathmax.h".
3711 * linux-low.c: Don't include sys/param.h.
3712 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3713 MAXPATHLEN.
3714 * win32-low.c: Don't include sys/param.h.
3715 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3716
3717 2013-07-01 Pedro Alves <palves@redhat.com>
3718
3719 * event-loop.c: Don't check HAVE_UNISTD_H before including
3720 <unistd.h>.
3721 * gdbreplay.c: Likewise.
3722 * remote-utils.c: Likewise.
3723 * server.c: Likewise.
3724 * configure.ac: Don't check for unistd.h.
3725 * configure: Regenerate.
3726
3727 2013-06-28 Tom Tromey <tromey@redhat.com>
3728
3729 * Makefile.in (version.c): Use version.in, not
3730 common/version.in.
3731
3732 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3733
3734 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3735 * configure: Rebuild.
3736 * Makefile.in (version_host, version_target): Get from configure.
3737 (version.c): Use $(version_host) and $(version_target).
3738
3739 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3740
3741 Fix trace-status to output user name without trailing colon.
3742 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3743
3744 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3745
3746 Fix trace-status to output proper start-time and stop-time.
3747 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3748 output start time and stop time in hex as gdb expects.
3749
3750 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3751
3752 * tracepoint.c (build_traceframe_info_xml): Output trace state
3753 variables present in the trace buffer.
3754
3755 2013-06-24 Tom Tromey <tromey@redhat.com>
3756
3757 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3758 create-version.sh.
3759 (version.o): Remove.
3760 * gdbreplay.c: Include version.h.
3761 (version, host_name): Don't declare.
3762 * server.h: Include version.h.
3763 (version, host_name): Don't declare.
3764
3765 2013-06-12 Pedro Alves <palves@redhat.com>
3766
3767 * linux-x86-low.c (linux_is_elf64): Delete global.
3768 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3769 with local linux_pid_exe_is_elf_64_file use.
3770
3771 2013-06-11 Pedro Alves <palves@redhat.com>
3772
3773 * linux-low.c (regset_disabled, disable_regset): New functions.
3774 (regsets_fetch_inferior_registers)
3775 (regsets_store_inferior_registers): Use them.
3776 (initialize_regsets_info); Don't allocate the disabled_regsets
3777 array here.
3778 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3779 comment.
3780
3781 2013-06-11 Pedro Alves <palves@redhat.com>
3782
3783 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3784 xmalloc.
3785
3786 2013-06-11 Pedro Alves <palves@redhat.com>
3787
3788 * linux-x86-low.c (initialize_low_arch): Call
3789 init_registers_x32_avx_linux.
3790
3791 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3792
3793 Fix compatibility with Android Bionic.
3794 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3795 it is not empty.
3796
3797 2013-06-07 Pedro Alves <palves@redhat.com>
3798
3799 PR server/14823
3800 * Makefile.in (OBS): Add tdesc.o.
3801 (IPA_OBJS): Add tdesc-ipa.o.
3802 (tdesc-ipa.o): New rule.
3803 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3804 interface.
3805 * linux-low.c (new_inferior): Delete.
3806 (disabled_regsets, num_regsets): Delete.
3807 (linux_add_process): Adjust to set the new per-process
3808 new_inferior flag.
3809 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3810 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3811 was a stop. When calling arch_setup, switch the current inferior
3812 to the thread that got an event.
3813 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3814 (regsets_fetch_inferior_registers)
3815 (regsets_store_inferior_registers): New regsets_info parameter.
3816 Adjust to use it.
3817 (linux_register_in_regsets): New regs_info parameter. Adjust to
3818 use it.
3819 (register_addr, fetch_register, store_register): New usrregs_info
3820 parameter. Adjust to use it.
3821 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3822 parameter regs_info. Adjust to use it.
3823 (linux_fetch_registers): Get the current inferior's regs_info, and
3824 adjust to use it.
3825 (linux_store_registers): Ditto.
3826 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3827 (initialize_low): Don't initialize the target_regsets here. Call
3828 initialize_low_arch.
3829 * linux-low.h (target_regsets): Delete declaration.
3830 (struct regsets_info): New.
3831 (struct usrregs_info): New.
3832 (struct regs_info): New.
3833 (struct process_info_private) <new_inferior>: New field.
3834 (struct linux_target_ops): Delete the num_regs, regmap, and
3835 regset_bitmap fields. New field regs_info.
3836 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3837 * i387-fp.c (num_xmm_registers): Delete.
3838 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3839 calls to new interface.
3840 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3841 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3842 Infer the number of xmm registers from the regcache's target
3843 description.
3844 * i387-fp.h (num_xmm_registers): Delete.
3845 * inferiors.c (add_thread): Don't install the thread's regcache
3846 here.
3847 * proc-service.c (gregset_info): Fetch the current inferior's
3848 regs_info. Adjust to use it.
3849 * regcache.c: Include tdesc.h.
3850 (register_bytes, reg_defs, num_registers)
3851 (gdbserver_expedite_regs): Delete.
3852 (get_thread_regcache): If the thread doesn't have a regcache yet,
3853 create one, instead of aborting gdbserver.
3854 (regcache_invalidate_one): Rename to ...
3855 (regcache_invalidate_thread): ... this.
3856 (regcache_invalidate_one): New.
3857 (regcache_invalidate): Only invalidate registers of the current
3858 process.
3859 (init_register_cache): Add target_desc parameter, and use it.
3860 (new_register_cache): Ditto. Assert the target description has a
3861 non zero registers_size.
3862 (regcache_cpy): Add assertions. Adjust.
3863 (realloc_register_cache, set_register_cache): Delete.
3864 (registers_to_string, registers_from_string): Adjust.
3865 (find_register_by_name, find_regno, find_register_by_number)
3866 (register_cache_size): Add target_desc parameter, and use it.
3867 (free_register_cache_thread, free_register_cache_thread_one)
3868 (regcache_release, register_cache_size): New.
3869 (register_size): Add target_desc parameter, and use it.
3870 (register_data, supply_register, supply_register_zeroed)
3871 (supply_regblock, supply_register_by_name, collect_register)
3872 (collect_register_as_string, collect_register_by_name): Adjust.
3873 * regcache.h (struct target_desc): Forward declare.
3874 (struct regcache) <tdesc>: New field.
3875 (init_register_cache, new_register_cache): Add target_desc
3876 parameter.
3877 (regcache_invalidate_thread): Declare.
3878 (regcache_invalidate_one): Delete declaration.
3879 (regcache_release): Declare.
3880 (find_register_by_number, register_cache_size, register_size)
3881 (find_regno): Add target_desc parameter.
3882 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3883 declarations.
3884 * remote-utils.c: Include tdesc.h.
3885 (outreg, prepare_resume_reply): Adjust.
3886 * server.c: Include tdesc.h.
3887 (gdbserver_xmltarget): Delete declaration.
3888 (get_features_xml, process_serial_event): Adjust.
3889 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3890 declare.
3891 (struct process_info) <tdesc>: New field.
3892 (ipa_tdesc): Declare.
3893 * tdesc.c: New file.
3894 * tdesc.h: New file.
3895 * tracepoint.c: Include tdesc.h.
3896 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3897 (get_context_regcache): Adjust to pass ipa_tdesc down.
3898 (do_action_at_tracepoint): Adjust to get the register cache size
3899 from the context regcache's description.
3900 (traceframe_walk_blocks): Adjust to get the register cache size
3901 from the current trace frame's description.
3902 (traceframe_get_pc): Adjust to get current trace frame's
3903 description and pass it down.
3904 (gdb_collect): Adjust to get the register cache size from the
3905 IPA's description.
3906 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3907 (gdbserver_xmltarget): Delete.
3908 (initialize_low_tracepoint): Set the ipa's target description.
3909 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3910 (initialize_low_tracepoint): Set the ipa's target description.
3911 * linux-x86-low.c: Include tdesc.h.
3912 [__x86_64__] (is_64bit_tdesc): New.
3913 (ps_get_thread_area, x86_get_thread_area): Use it.
3914 (i386_cannot_store_register): Rename to ...
3915 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3916 (i386_cannot_fetch_register): Rename to ...
3917 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3918 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3919 to new interface.
3920 (target_regsets): Rename to ...
3921 (x86_regsets): ... this.
3922 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3923 interface.
3924 (x86_siginfo_fixup): Use is_64bit_tdesc.
3925 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3926 (tdesc_x32_avx_linux, tdesc_x32_linux)
3927 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3928 Declare.
3929 (x86_linux_update_xmltarget): Delete.
3930 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3931 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3932 (AMD64_LINUX_USER64_CS): New.
3933 (x86_linux_read_description): New, based on
3934 x86_linux_update_xmltarget.
3935 (same_process_callback): New.
3936 (x86_arch_setup_process_callback): New.
3937 (x86_linux_update_xmltarget): New.
3938 (x86_regsets_info): New.
3939 (amd64_linux_regs_info): New.
3940 (i386_linux_usrregs_info): New.
3941 (i386_linux_regs_info): New.
3942 (x86_linux_regs_info): New.
3943 (x86_arch_setup): Reimplement.
3944 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3945 (x86_emit_ops): Ditto.
3946 (the_low_target): Adjust. Install x86_linux_regs_info,
3947 x86_cannot_fetch_register, and x86_cannot_store_register.
3948 (initialize_low_arch): New.
3949 * linux-ia64-low.c (tdesc_ia64): Declare.
3950 (ia64_fetch_register): Adjust.
3951 (ia64_usrregs_info, regs_info): New globals.
3952 (ia64_regs_info): New function.
3953 (the_low_target): Adjust.
3954 (initialize_low_arch): New function.
3955 * linux-sparc-low.c (tdesc_sparc64): Declare.
3956 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3957 Adjust.
3958 (sparc_arch_setup): New function.
3959 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3960 (the_low_target): Adjust.
3961 (initialize_low_arch): New function.
3962 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3963 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3964 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3965 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3966 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3967 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3968 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3969 (tdesc_powerpc_isa205_vsx64l): Declare.
3970 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3971 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3972 (ppc_set_pc, ppc_get_hwcap): Adjust.
3973 (ppc_usrregs_info): Forward declare.
3974 (!__powerpc64__) ppc_regmap_adjusted: New global.
3975 (ppc_arch_setup): Adjust to the current process'es target
3976 description.
3977 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3978 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3979 (ppc_store_evrregset): Adjust.
3980 (target_regsets): Rename to ...
3981 (ppc_regsets): ... this, and make static.
3982 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3983 (ppc_regs_info): New function.
3984 (the_low_target): Adjust.
3985 (initialize_low_arch): New function.
3986 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3987 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3988 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3989 (tdesc_s390x_linux64v2): Declare.
3990 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3991 (s390_fill_gregset, s390_store_last_break): Adjust.
3992 (target_regsets): Rename to ...
3993 (s390_regsets): ... this, and make static.
3994 (s390_get_pc, s390_set_pc): Adjust.
3995 (s390_get_hwcap): New target_desc parameter, and use it.
3996 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3997 (s390_arch_setup): Adjust to set the current process'es target
3998 description. Don't adjust the regmap.
3999 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4000 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4001 (regs_info_3264): New globals.
4002 (s390_regs_info): New function.
4003 (the_low_target): Adjust.
4004 (initialize_low_arch): New function.
4005 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4006 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4007 [__mips64] (init_registers_mips_linux)
4008 (init_registers_mips_dsp_linux): Delete defines.
4009 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4010 (have_dsp): New global.
4011 (mips_read_description): New, based on mips_arch_setup.
4012 (mips_arch_setup): Reimplement.
4013 (get_usrregs_info): New function.
4014 (mips_cannot_fetch_register, mips_cannot_store_register)
4015 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4016 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4017 (target_regsets): Rename to ...
4018 (mips_regsets): ... this, and make static.
4019 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4020 (dsp_regs_info, regs_info): New globals.
4021 (mips_regs_info): New function.
4022 (the_low_target): Adjust.
4023 (initialize_low_arch): New function.
4024 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4025 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4026 Declare.
4027 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4028 (arm_read_description): New, with bits factored from
4029 arm_arch_setup.
4030 (arm_arch_setup): Reimplement.
4031 (target_regsets): Rename to ...
4032 (arm_regsets): ... this, and make static.
4033 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4034 (arm_regs_info): New function.
4035 (the_low_target): Adjust.
4036 (initialize_low_arch): New function.
4037 * linux-m68k-low.c (tdesc_m68k): Declare.
4038 (target_regsets): Rename to ...
4039 (m68k_regsets): ... this, and make static.
4040 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4041 (m68k_regs_info): New function.
4042 (m68k_arch_setup): New function.
4043 (the_low_target): Adjust.
4044 (initialize_low_arch): New function.
4045 * linux-sh-low.c (tdesc_sharch): Declare.
4046 (target_regsets): Rename to ...
4047 (sh_regsets): ... this, and make static.
4048 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4049 (sh_regs_info, sh_arch_setup): New functions.
4050 (the_low_target): Adjust.
4051 (initialize_low_arch): New function.
4052 * linux-bfin-low.c (tdesc_bfin): Declare.
4053 (bfin_arch_setup): New function.
4054 (bfin_usrregs_info, regs_info): New globals.
4055 (bfin_regs_info): New function.
4056 (the_low_target): Adjust.
4057 (initialize_low_arch): New function.
4058 * linux-cris-low.c (tdesc_cris): Declare.
4059 (cris_arch_setup): New function.
4060 (cris_usrregs_info, regs_info): New globals.
4061 (cris_regs_info): New function.
4062 (the_low_target): Adjust.
4063 (initialize_low_arch): New function.
4064 * linux-cris-low.c (tdesc_crisv32): Declare.
4065 (cris_arch_setup): New function.
4066 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4067 (cris_regs_info): New function.
4068 (the_low_target): Adjust.
4069 (initialize_low_arch): New function.
4070 * linux-m32r-low.c (tdesc_m32r): Declare.
4071 (m32r_arch_setup): New function.
4072 (m32r_usrregs_info, regs_info): New globals.
4073 (m32r_regs_info): Adjust.
4074 (initialize_low_arch): New function.
4075 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4076 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4077 (tic6x_usrregs_info): Forward declare.
4078 (tic6x_read_description): New function, based on ...
4079 (tic6x_arch_setup): ... this. Reimplement.
4080 (target_regsets): Rename to ...
4081 (tic6x_regsets): ... this, and make static.
4082 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4083 (tic6x_regs_info): New function.
4084 (the_low_target): Adjust.
4085 (initialize_low_arch): New function.
4086 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4087 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4088 (target_regsets): Rename to ...
4089 (xtensa_regsets): ... this, and make static.
4090 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4091 globals.
4092 (xtensa_arch_setup, xtensa_regs_info): New functions.
4093 (the_low_target): Adjust.
4094 (initialize_low_arch): New function.
4095 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4096 (nios2_arch_setup): Set the current process'es tdesc.
4097 (target_regsets): Rename to ...
4098 (nios2_regsets): ... this.
4099 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4100 (nios2_regs_info): New function.
4101 (the_low_target): Adjust.
4102 (initialize_low_arch): New function.
4103 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4104 (aarch64_arch_setup): Set the current process'es tdesc.
4105 (target_regsets): Rename to ...
4106 (aarch64_regsets): ... this.
4107 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4108 (aarch64_regs_info): New function.
4109 (the_low_target): Adjust.
4110 (initialize_low_arch): New function.
4111 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4112 globals.
4113 (target_regsets): Rename to ...
4114 (tile_regsets): ... this.
4115 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4116 (tile_regs_info): New function.
4117 (tile_arch_setup): Set the current process'es tdesc.
4118 (the_low_target): Adjust.
4119 (initialize_low_arch): New function.
4120 * spu-low.c (tdesc_spu): Declare.
4121 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4122 * win32-arm-low.c (tdesc_arm): Declare.
4123 (arm_arch_setup): New function.
4124 (the_low_target): Install arm_arch_setup instead of
4125 init_registers_arm.
4126 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4127 (init_windows_x86): Rename to ...
4128 (i386_arch_setup): ... this. Set `win32_tdesc'.
4129 (the_low_target): Adjust.
4130 * win32-low.c (win32_tdesc): New global.
4131 (child_add_thread): Don't create the thread cache here.
4132 (do_initial_child_stuff): Set the new process'es tdesc.
4133 * win32-low.h (struct target_desc): Forward declare.
4134 (win32_tdesc): Declare.
4135 * lynx-i386-low.c (tdesc_i386): Declare global.
4136 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4137 * lynx-low.c (lynx_tdesc): New global.
4138 (lynx_add_process): Set the new process'es tdesc.
4139 * lynx-low.h (struct target_desc): Forward declare.
4140 (lynx_tdesc): Declare global.
4141 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4142 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4143 * nto-low.c (nto_tdesc): New global.
4144 (do_attach): Set the new process'es tdesc.
4145 * nto-low.h (struct target_desc): Forward declare.
4146 (nto_tdesc): Declare.
4147 * nto-x86-low.c (tdesc_i386): Declare.
4148 (nto_x86_arch_setup): Set `nto_tdesc'.
4149
4150 2013-06-04 Gary Benson <gbenson@redhat.com>
4151
4152 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4153 to qSupported response when appropriate.
4154 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4155 with nonzero-length annex.
4156 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4157 arguments supplied in annex.
4158
4159 2013-05-31 Doug Evans <dje@google.com>
4160
4161 PR server/15594
4162 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4163 64 bits in 64-cross-32 environment.
4164
4165 2013-05-28 Pedro Alves <palves@redhat.com>
4166
4167 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4168 (aarch64-without-fpu.c): Delete rule.
4169 * configure.srv (aarch64*-*-linux*): Remove references to
4170 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4171 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4172 declaration.
4173
4174 2013-05-24 Pedro Alves <palves@redhat.com>
4175
4176 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4177 instead of strchr/decode_address. Error if the range isn't split
4178 with a ','. Don't assume there's be a ':' in the action.
4179
4180 2013-05-23 Yao Qi <yao@codesourcery.com>
4181 Pedro Alves <palves@redhat.com>
4182
4183 * linux-low.c (lwp_in_step_range): New function.
4184 (linux_wait_1): If the thread was range stepping and stopped
4185 outside the stepping range, report the stop to GDB. Otherwise,
4186 continue stepping. Add range stepping debug output.
4187 (linux_set_resume_request): Copy the step range from the resume
4188 request to the lwp.
4189 (linux_supports_range_stepping): New.
4190 (linux_target_ops) <supports_range_stepping>: Set to
4191 linux_supports_range_stepping.
4192 * linux-low.h (struct linux_target_ops)
4193 <supports_range_stepping>: New field.
4194 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4195 * linux-x86-low.c (x86_supports_range_stepping): New.
4196 (the_low_target) <supports_range_stepping>: Set to
4197 x86_supports_range_stepping.
4198 * server.c (handle_v_cont): Handle 'r' action.
4199 (handle_v_requests): Append ";r" if the target supports range
4200 stepping.
4201 * target.h (struct thread_resume) <step_range_start,
4202 step_range_end>: New fields.
4203 (struct target_ops) <supports_range_stepping>:
4204 New field.
4205 (target_supports_range_stepping): New macro.
4206
4207 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4208
4209 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4210 confusion in comment.
4211
4212 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4213
4214 * lynx-low.c (struct process_info_private): New type.
4215 (lynx_add_process): New function.
4216 (lynx_create_inferior, lynx_attach): Replace calls to
4217 add_process by calls to lynx_add_process.
4218 (lynx_resume): If PTID is null, then try using
4219 current_process()->private->last_wait_event_ptid.
4220 Add comments.
4221 (lynx_clear_inferiors): Delete. The contents of that function
4222 has been inlined in lynx_mourn;
4223 (lynx_wait_1): Save the ptid in the process's private data.
4224 (lynx_mourn): Free the process' private data. Replace call
4225 to lynx_clear_inferiors by call to clear_inferiors.
4226
4227 2013-05-17 Yao Qi <yao@codesourcery.com>
4228
4229 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4230 the right place.
4231
4232 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4233
4234 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4235 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4236 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4237 PT_TEXT_END_ADDR guards. Update comments.
4238 (linux_target_op) <read_offsets>: Conditionally define to
4239 linux_read_offsets if the target is UCLIBC and if it defines
4240 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4241
4242 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4243 Andrew Jenner <andrew@codesourcery.com>
4244
4245 * Makefile.in (SFILES): Add linux-nios2-low.c.
4246 (clean): Add action to delete nios2-linux.c.
4247 (nios2-linux.c): New rule.
4248 * configure.srv: Add nios2*-*-linux*.
4249 * linux-nios2-low.c: New.
4250
4251 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4252
4253 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4254
4255 2013-04-25 Hui Zhu <hui@codesourcery.com>
4256
4257 PR gdb/15186
4258 * ax.c (ax_printf): Add fflush.
4259
4260 2013-04-22 Tom Tromey <tromey@redhat.com>
4261
4262 * Makefile.in (SFILES): Add filestuff.c.
4263 (OBS): Add filestuff.o.
4264 (filestuff.o): New target.
4265 * config.in, configure: Rebuild.
4266 * configure.ac: Check for fdwalk, pipe2.
4267
4268 2013-04-17 Pedro Alves <palves@redhat.com>
4269
4270 * configure.ac (USE_THREAD_DB): Delete variable.
4271 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4272 Don't AC_SUBST USE_THREAD_DB.
4273 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4274 * config.in, configure: Regenerate.
4275
4276 2013-04-16 Pedro Alves <palves@redhat.com>
4277
4278 * linux-low.h (struct lwp_info) <thread_known>: Move under
4279 the USE_THREAD_DB #ifdef.
4280
4281 2013-04-16 Pedro Alves <palves@redhat.com>
4282
4283 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4284 (linux-low.o): Delete rule.
4285 * linux-low.h: Always include "gdb_thread_db.h" instead of
4286 conditionally including thread_db.h.
4287 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4288 HAVE_THREAD_DB_H.
4289
4290 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4291
4292 * Makefile.in (install-only): Fix make install regression.
4293
4294 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4295
4296 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4297 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4298 installation.
4299 * gdbserver.1: Remove.
4300
4301 2013-03-22 Pedro Alves <palves@redhat.com>
4302
4303 * linux-low.c (handle_extended_wait): Don't call
4304 linux_enable_event_reporting.
4305
4306 2013-03-15 Tony Theodore <tonyt@logyst.com>
4307
4308 PR build/9098:
4309 * Makefile.in (SHELL): Use @SHELL@.
4310
4311 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4312
4313 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4314 compiler warning.
4315
4316 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4317
4318 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4319 Remove extraneous NULL element.
4320
4321 2013-03-13 Yao Qi <yao@codesourcery.com>
4322
4323 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4324 'V' block in trace frame.
4325
4326 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4327
4328 * target.h (struct target_ops): Add btrace ops.
4329 (target_supports_btrace): New macro.
4330 (target_enable_btrace): New macro.
4331 (target_disable_btrace): New macro.
4332 (target_read_btrace): New macro.
4333 * gdbthread.h (struct thread_info): Add btrace field.
4334 * server.c: Include btrace-common.h.
4335 (handle_btrace_general_set): New function.
4336 (handle_btrace_enable): New function.
4337 (handle_btrace_disable): New function.
4338 (handle_general_set): Call handle_btrace_general_set.
4339 (handle_qxfer_btrace): New function.
4340 (struct qxfer qxfer_packets[]): Add btrace entry.
4341 * inferiors.c (remove_thread): Disable btrace.
4342 * linux-low: Include linux-btrace.h.
4343 (linux_low_enable_btrace): New function.
4344 (linux_low_read_btrace): New function.
4345 (linux_target_ops): Add btrace ops.
4346 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4347 Add srv_linux_btrace=yes.
4348 (x86_64-*-linux*): Add linux-btrace.o.
4349 Add srv_linux_btrace=yes.
4350 * configure.ac: Define HAVE_LINUX_BTRACE.
4351 * config.in: Regenerated.
4352 * configure: Regenerated.
4353
4354 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4355
4356 * server.c (handle_qxfer): Preserve error message if -3 is
4357 returned.
4358 (qxfer): Document the -3 return value.
4359
4360 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4361
4362 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4363 (linux_btrace_h): New variable.
4364 (linux-btrace.o): New rule.
4365
4366 2013-03-08 Stan Shebs <stan@codesourcery.com>
4367 Hafiz Abid Qadeer <abidh@codesourcery.com>
4368
4369 * tracepoint.c (trace_buffer_size): New global.
4370 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4371 (init_trace_buffer): Change to one-argument function. Allocate
4372 trace buffer memory.
4373 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4374 handle QTBuffer:size packet.
4375 (cmd_bigqtbuffer_size): New function.
4376 (initialize_tracepoint): Call init_trace_buffer with
4377 DEFAULT_TRACE_BUFFER_SIZE.
4378 * server.c (handle_query): Add QTBuffer:size in the
4379 supported packets.
4380
4381 2013-03-07 Yao Qi <yao@codesourcery.com>
4382
4383 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4384 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4385 of -1.
4386 (cmd_qtsp): Adjust condition. Do post increment.
4387 Set cur_action and cur_step_action back to 0.
4388
4389 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4390
4391 PR server/15236
4392 * linux-low.c (linux_write_memory): Return early success if LEN is
4393 zero.
4394
4395 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4396
4397 * configure.srv: Add x86_64-*-cygwin* as target.
4398
4399 2013-02-28 Tom Tromey <tromey@redhat.com>
4400
4401 * configure.ac: Invoke AC_SYS_LARGEFILE.
4402 * configure, config.in: Rebuild.
4403
4404 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4405
4406 * win32-low.c: Throughout, fix format strings and casts of
4407 printf-like functions to avoid type related warnings on all
4408 platforms.
4409 (get_child_debug_event): Print dwDebugEventCode as hex since
4410 that's how it's usually documented.
4411
4412 2013-02-28 Yao Qi <yao@codesourcery.com>
4413
4414 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4415 pulongest.
4416
4417 2013-02-27 Jiong Wang <jiwang@tilera.com>
4418
4419 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4420 (reg-tilegx32.c): New rule.
4421 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4422 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4423 different register info initializer according to elf class.
4424 (init_registers_tilgx32): New function. The tilegx32 register info
4425 initializer.
4426 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4427 (tile_store_gregset): Likewise.
4428
4429 2013-02-27 Yao Qi <yao@codesourcery.com>
4430
4431 * server.c (process_point_options): Print debug message when
4432 debug_threads is true.
4433
4434 2013-02-26 Yao Qi <yao@codesourcery.com>
4435
4436 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4437
4438 2013-02-19 Pedro Alves <palves@redhat.com>
4439 Kai Tietz <ktietz@redhat.com>
4440
4441 PR gdb/15161
4442
4443 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4444 instead of strtoul to extract address from packet.
4445 (process_serial_event) <'z'>: Likewise.
4446
4447 2013-02-18 Yao Qi <yao@codesourcery.com>
4448
4449 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4450
4451 2013-02-14 Pedro Alves <palves@redhat.com>
4452
4453 Plug memory leak.
4454
4455 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4456 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4457
4458 2013-02-14 Pedro Alves <palves@redhat.com>
4459
4460 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4461
4462 2013-02-14 Pedro Alves <palves@redhat.com>
4463
4464 * tracepoint.c (save_string): Delete.
4465 (add_tracepoint_action): Use savestring instead of save_string.
4466
4467 2013-02-12 Pedro Alves <palves@redhat.com>
4468
4469 * linux-xtensa-low.c: Ditto.
4470 * xtensa-xtregs.c: Ditto.
4471
4472 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4473
4474 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4475 thread_db.
4476
4477 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4478
4479 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4480 aarch64_num_wp_regs and aarch64_num_bp_regs to
4481 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4482
4483 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4484
4485 * linux-aarch64-low.c (ps_get_thread_area): Replace
4486 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4487
4488 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4489 Marcus Shawcroft <marcus.shawcroft@arm.com>
4490 Nigel Stephens <nigel.stephens@arm.com>
4491 Yufeng Zhang <yufeng.zhang@arm.com>
4492
4493 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4494 (aarch64.c, aarch64-without-fpu.c): New targets.
4495 * configure.srv (aarch64*-*-linux*): New.
4496 * linux-aarch64-low.c: New file.
4497
4498 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4499
4500 * linux-low.c (handle_extended_wait, linux_create_inferior)
4501 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4502 (dequeue_one_deferred_signal, linux_resume_one_thread)
4503 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4504 (linux_tracefork_grandchild, linux_test_for_tracefork)
4505 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4506 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4507 where the argument is 0.
4508
4509 2013-01-25 Yao Qi <yao@codesourcery.com>
4510
4511 * event-loop.c: Include "queue.h".
4512 (gdb_event_p): New typedef.
4513 (struct gdb_event) <next_event>: Remove.
4514 (event_queue): Change to QUEUE(gdb_event_p).
4515 (async_queue_event): Remove.
4516 (gdb_event_xfree): New.
4517 (initialize_event_loop): New.
4518 (process_event): Use API from QUEUE.
4519 (wait_for_event): Likewise.
4520 * server.c (main): Call initialize_event_loop.
4521 * server.h (initialize_event_loop): Declare.
4522
4523 2013-01-18 Yao Qi <yao@codesourcery.com>
4524
4525 * ax.h (struct eval_agent_expr_context): New.
4526 (gdb_eval_agent_expr): Update declaration.
4527 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4528 TFRAME. Add new argument CTX.
4529 * server.h (struct eval_agent_expr_context): Declare.
4530 (agent_mem_read, agent_tsv_read): Update declaration.
4531 (agent_mem_read_string): Likewise.
4532 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4533 (add_traceframe_block): Add new argument TPOINT.
4534 Increase TPOINT->traceframe_usage.
4535 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4536 eval_tracepoint_agent_expr.
4537 (condition_true_at_tracepoint): Likewise.
4538 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4539 (agent_mem_read_string, agent_tsv_read): Likewise.
4540
4541 2013-01-16 Yao Qi <yao@codesourcery.com>
4542
4543 * linux-low.c (linux_resume_one_lwp): Don't check
4544 'lwp->bp_reinsert != 0'.
4545
4546 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4547 Pedro Alves <palves@redhat.com>
4548
4549 * lynx-low.c (ptrace_request_to_str): Define a temporary
4550 macro and use it to simplify this function's implementation.
4551
4552 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4553
4554 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4555 sets errno.
4556
4557 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4558
4559 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4560
4561 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4562
4563 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4564
4565 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4566
4567 * lynx-low.c (lynx_resume): Use the resume_info parameter
4568 to determine the ptid for the lynx_ptrace call, unless
4569 it is equal to minus_one_ptid, in which case we use the
4570 ptid of the current_inferior.
4571 (lynx_wait_1): After having received a thread create/exit
4572 event, resume the inferior's execution using the signaling
4573 thread's ptid, rather than the old ptid.
4574
4575 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4576
4577 * lynx-low.c (lynx_resume): Delete variable ret.
4578
4579 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4580
4581 * gdbreplay.c (gdbreplay_version): Update copyright year.
4582 * server.c (gdbserver_version): Likewise.
4583
4584 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4585
4586 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4587 new thread.
4588
4589 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4590
4591 * lynx-low.c (ptrace_request_to_str): Add handling for
4592 PTRACE_GETTRACESIG.
4593
4594 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4595
4596 * lynx-low.c (lynx_attach): Delete variable new_process.
4597
4598 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4599
4600 * lynx-low.c (lynx_create_inferior): Delete variable
4601 new_process.
4602
4603 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4604
4605 * lynx-low.c (ptrace_request_to_str): Do not handle
4606 PTRACE_GETTHREADLIST if this macro does not exist.
4607
4608 2012-12-15 Yao Qi <yao@codesourcery.com>
4609
4610 * Makefile.in (OBS): Add notif.o.
4611 * notif.c, notif.h: New.
4612 * server.c: Include "notif.h".
4613 (struct vstop_notif) <next>: Remove.
4614 <base>: New field.
4615 (queue_stop_reply): Update.
4616 (push_event, send_next_stop_reply): Remove.
4617 (discard_queued_stop_replies): Update.
4618 (notif_stop): New variable.
4619 (handle_v_stopped): Remove.
4620 (handle_v_requests): Don't call handle_v_stopped. Call
4621 handle_ack_notif instead.
4622 (queue_stop_reply_callback): Call notif_event_enque instead
4623 of queue_stop_reply.
4624 (handle_status): Don't call send_next_stop_reply, call
4625 notif_write_event instead.
4626 (kill_inferior_callback): Likewise.
4627 (detach_or_kill_inferior_callback): Likewise.
4628 (main): Call initialize_notif.
4629 (process_serial_event): Call QUEUE_is_empty.
4630 (handle_target_event): Call notif_push instead of push event.
4631 * server.h (push_event): Remove declaration.
4632
4633 2012-12-10 Tom Tromey <tromey@redhat.com>
4634
4635 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4636 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4637 macros.
4638 (.c.o): Rewrite.
4639 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4640 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4641 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4642 (amd64-linux-ipa.o, ax.o): Rewrite.
4643 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4644 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4645 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4646 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4647 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4648 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4649 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4650 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4651 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4652 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4653 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4654 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4655 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4656 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4657 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4658 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4659 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4660 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4661 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4662 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4663 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4664 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4665 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4666 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4667 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4668 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4669 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4670 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4671 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4672 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4673 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4674 (reg-tilegx.o): Remove.
4675 (all_object_files): New macro.
4676 Include .deps files.
4677 * aclocal.m4, configure: Rebuild.
4678 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4679 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4680 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4681
4682 2012-12-05 Tom Tromey <tromey@redhat.com>
4683
4684 PR gdb/14917:
4685 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4686
4687 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4688
4689 * configure.ac: Check for linux/perf_event.h.
4690 * config.in: Regenerated.
4691 * configure: Regenerated.
4692
4693 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4694
4695 * hostio.c (handle_readlink): Decrease buffer size
4696 parameter passed to readlink by one byte.
4697
4698 2012-11-26 Yao Qi <yao@codesourcery.com>
4699
4700 * configure.ac (build_warnings): Append '-Wempty-body'.
4701 * configure: Regenerated.
4702 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4703 body.
4704
4705 2012-11-15 Pierre Muller <muller@sourceware.org>
4706
4707 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4708 * config.in: Regenerate.
4709 * configure: Regenerate.
4710 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4711 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4712 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4713 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4714 header.
4715 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4716 instead of <sys/wait.h> header.
4717 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4718
4719 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4720
4721 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4722 (various make rules): Remove -DGDBSERVER
4723
4724 2012-11-09 Yao Qi <yao@codesourcery.com>
4725
4726 * spu-low.c (current_ptid): Move it to ..
4727 * gdbthread.h: ... here. New.
4728 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4729 * server.c (myresume, process_serial_event): Likewise.
4730 * thread-db.c (thread_db_find_new_threads): Likewise.
4731 * tracepoint.c (run_inferior_command): Likewise.
4732
4733 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4734
4735 * server.c (handle_search_memory_1): Include access length in
4736 warning message.
4737
4738 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4739
4740 * linux-crisv32-low.c: Fix compile errors.
4741
4742 2012-09-04 Yao Qi <yao@codesourcery.com>
4743
4744 * tracepoint.c (cmd_qtsv): Adjust debug message.
4745 Don't check CUR_TPOINT.
4746
4747 2012-08-28 Yao Qi <yao@codesourcery.com>
4748
4749 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4750 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4751 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4752 Remove declarations of xmalloc, xreallloc, xstrdup and
4753 freeargv.
4754 * Makefile.in (libiberty_h): New.
4755 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4756 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4757
4758 2012-08-23 Yao Qi <yao@codesourcery.com>
4759
4760 * server.h: Remove declaration of 'xsnprintf'.
4761
4762 2012-08-22 Keith Seitz <keiths@redhat.com>
4763
4764 * server.h: Include build-gnulib-gbserver/config.h.
4765 * gdbreplay.c: Likewise.
4766
4767 2012-08-08 Doug Evans <dje@google.com>
4768
4769 * Makefile.in (SFILES): Add gdb_vecs.c.
4770 (OBS): Add gdb_vecs.o.
4771 (gdb_vecs_h, host_defs_h): New variables.
4772 (thread-db.o): Add $(gdb_vecs_h) dependency.
4773 (gdb_vecs.o): New rule.
4774 * thread-db.c: #include "gdb_vecs.h".
4775 (thread_db_load_search): Use a vector to iterate over path elements.
4776 Handle text appearing after "$pdir".
4777
4778 * configure.ac: Add check for strstr.
4779 * config.in: Regenerate.
4780 * configure: Regenerate.
4781
4782 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4783
4784 * hostio.c (handle_pread): If pread fails, fall back to attempting
4785 lseek/read.
4786 (handle_pwrite): Likewise for pwrite.
4787
4788 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4789
4790 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4791 between unsupported TYPE and unimplementable ADDR/LEN combination.
4792 (arm_insert_point): Act on new return value.
4793
4794 2012-07-31 Pedro Alves <palves@redhat.com>
4795
4796 * server.c (process_point_options): Only skip tokens if we find
4797 one that is unrecognized. Don't treat 'X' specially while
4798 skipping unrecognized tokens.
4799
4800 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4801
4802 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4803 to 4-byte-align HW breakpoint addresses for Thumb.
4804
4805 2012-07-27 Yao Qi <yao@codesourcery.com>
4806
4807 PR remote/14161.
4808
4809 * server.h: Declare gdb_agent_about_to_close.
4810 * target.c (kill_inferior): Include "agent.h".
4811 New. Send command 'kill'.
4812 * target.h (kill_inferior): Removed macro.
4813 * tracepoint.c (gdb_agent_about_to_close): New.
4814 (gdb_agent_helper_thread): Handle command 'close'.
4815 Wait endlessly until the inferior stops.
4816 Install gdb_agent_remove_socket to atexit hook.
4817 (agent_socket_name): New static variable.
4818 (gdb_agent_socket_init): Replace local variable 'name' with
4819 'agent_socket_name'.
4820 (gdb_agent_remove_socket): New.
4821
4822 2012-07-27 Yao Qi <yao@codesourcery.com>
4823
4824 * server.c (process_point_options): Stop at 'X' when parsing.
4825
4826 2012-07-19 Michael Eager <eager@eagercon.com>
4827
4828 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4829 to hw_execute.
4830 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4831 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4832 hardware breakpoint.
4833
4834 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4835
4836 * gdbserver/linux-low.c (initialize_low): Call
4837 linux_ptrace_init_warnings.
4838
4839 2012-07-02 Doug Evans <dje@google.com>
4840
4841 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4842 pointer to int.
4843
4844 2012-07-02 Stan Shebs <stan@codesourcery.com>
4845
4846 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4847 (ax.o): Add it to build rule.
4848 (ax-ipa.o): Ditto.
4849 (OBS): Add format.o.
4850 (IPA_OBS): Add format.o.
4851 * server.c (handle_query): Claim support for breakpoint commands.
4852 (process_point_options): Add command case.
4853 (process_serial_event): Leave running if there are printfs in
4854 effect.
4855 * mem-break.h (any_persistent_commands): Declare.
4856 (add_breakpoint_commands): Declare.
4857 (gdb_no_commands_at_breakpoint): Declare.
4858 (run_breakpoint_commands): Declare.
4859 * mem-break.c (struct point_command_list): New struct.
4860 (struct breakpoint): New field command_list.
4861 (any_persistent_commands): New function.
4862 (add_commands_to_breakpoint): New function.
4863 (add_breakpoint_commands): New function.
4864 (gdb_no_commands_at_breakpoint): New function.
4865 (run_breakpoint_commands): New function.
4866 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4867 locally.
4868 * ax.c: Include format.h.
4869 (ax_printf): New function.
4870 (gdb_eval_agent_expr): Add printf opcode.
4871
4872 2012-06-13 Yao Qi <yao@codesourcery.com>
4873
4874 * server.c (start_inferior): Remove duplicated writes to fields
4875 'last_resume_kind' and 'last_status' of 'current_inferior'.
4876
4877 2012-06-12 Yao Qi <yao@codesourcery.com>
4878 Pedro Alves <palves@redhat.com>
4879
4880 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4881 comment.
4882 * server.c (handle_v_cont): Extend comment.
4883
4884 2012-06-11 Yao Qi <yao@codesourcery.com>
4885
4886 * linux-low.c (linux_attach): Add 'static'.
4887
4888 2012-06-06 Yao Qi <yao@codesourcery.com>
4889
4890 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4891
4892 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4893
4894 Fix gcc -flto compilation warning.
4895 * server.c (main): Make variable multi_mode and attach volatile.
4896
4897 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4898
4899 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4900 if the platform doesn't know about it.
4901
4902 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4903
4904 * Makefile.in (SFILES): Add linux-tile-low.c.
4905 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4906 * configure.srv: Handle tilegx-*-linux*.
4907 * linux-tile-low.c: New file.
4908
4909 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4910
4911 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4912
4913 2012-05-24 Pedro Alves <palves@redhat.com>
4914
4915 PR gdb/7205
4916
4917 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4918
4919 2012-05-24 Pedro Alves <palves@redhat.com>
4920
4921 PR gdb/7205
4922
4923 Replace target_signal with gdb_signal throughout.
4924
4925 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4926
4927 * linux-low.c (linux_store_registers): Avoid the copying sequence
4928 when no data has been retrieved by ptrace.
4929
4930 2012-05-22 Will Deacon <will.deacon@arm.com>
4931
4932 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4933 Include asm/ptrace.h.
4934 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4935 already defined.
4936
4937 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4938
4939 * linux-low.c (linux_store_registers): Don't re-retrieve data
4940 with ptrace that has already been obtained from /proc. Always
4941 copy any data retrieved with ptrace to the buffer supplied.
4942
4943 2012-05-11 Yao Qi <yao@codesourcery.com>
4944 Pedro Alves <palves@redhat.com>
4945
4946 * linux-low.c (enum stopping_threads_kind): New.
4947 (stopping_threads): Change type to `enum stopping_threads_kind'.
4948 (handle_extended_wait): If stopping and suspending threads, leave
4949 the new_lwp suspended too.
4950 (linux_wait_for_event): Adjust.
4951 (stop_all_lwps): Set `stopping_threads' to
4952 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4953 whether we're suspending threads or just stopping them. Assert no
4954 recursion happens.
4955
4956 2012-04-29 Yao Qi <yao@codesourcery.com>
4957
4958 * server.h: Move some code to ...
4959 * gdbthread.h: ... here. New.
4960 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4961 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4962 (nto-low.o, win32-low.o): Likewise.
4963 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4964 * regcache.c, remote-utils.c, server.c: Likewise.
4965 * target.c, tracepoint.c, win32-low.c: Likewise.
4966
4967 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4968
4969 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4970 (PTRACE_ARG4_TYPE): Likewise.
4971 (PTRACE_XFER_TYPE): Likewise.
4972 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4973 ptrace to PTRACE_ARG3_TYPE.
4974 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4975 (PTRACE_ARG4_TYPE): Likewise.
4976 (PTRACE_XFER_TYPE): Likewise.
4977 (linux_detach_one_lwp): Cast fourth argument of
4978 ptrace to long then PTRACE_ARG4_TYPE.
4979 (regsets_fetch_inferior_registers): Cast third argument of
4980 ptrace to long then PTRACE_ARG3_TYPE.
4981 (regsets_store_inferior_registers): Likewise.
4982
4983 2012-04-20 Pedro Alves <palves@redhat.com>
4984
4985 * configure: Regenerate.
4986
4987 2012-04-19 Pedro Alves <palves@redhat.com>
4988
4989 * Makefile.in (GNULIB_BUILDDIR): New.
4990 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4991 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4992 (all, install-only, uninstall, clean-info, all-lib, clean): No
4993 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4994 (maintainer-clean realclean distclean): Use subdir_do.
4995 (subdir_do): New.
4996 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4997 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4998 * acinclude.m4: Include acx_configure_dir.m4.
4999 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5000 calls. Call AC_PROG_RANLIB. Configure gnulib using
5001 ACX_CONFIGURE_DIR.
5002 (GNULIB): New.
5003 (GNULIB_STDINT_H): Adjust.
5004 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5005 * gdbreplay.c: Include build-gnulib/config.h.
5006 * server.h: Likewise.
5007 * aclocal.m4: Regenerate.
5008 * config.in: Regenerate.
5009 * configure: Regenerate.
5010
5011 2012-04-19 Pedro Alves <palves@redhat.com>
5012
5013 * Makefile.in (LIBGNU, INCGNU): Adjust.
5014 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5015 (all, install-only, uninstall, clean-info, all-lib, clean)
5016 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5017 * configure.ac: Adjust AC_OUTPUT output.
5018 * aclocal.m4: Regenerate.
5019 * configure: Regenerate.
5020
5021 2012-04-19 Pedro Alves <palves@redhat.com>
5022
5023 * Makefile.in (generated_files): New.
5024 (server_h): Remove the explicit dependency on config.h, and depend
5025 on $generated_files.
5026
5027 2012-04-19 Pedro Alves <palves@redhat.com>
5028
5029 * Makefile.in (INCGNU): Add -Ignulib.
5030
5031 2012-04-19 Pedro Alves <palves@redhat.com>
5032
5033 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5034 (INCGNU): ... this, and spell out -I here.
5035 (GNULIB_LIB): Rename to ...
5036 (LIBGNU): ... this.
5037 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5038
5039 2012-04-19 Pedro Alves <palves@redhat.com>
5040
5041 * config.in: Regenerate.
5042
5043 2012-04-19 Pedro Alves <palves@redhat.com>
5044
5045 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5046 * server.h (memmem): Remove declaration.
5047 * config.in: Regenerate.
5048 * configure: Regenerate.
5049
5050 2012-04-19 Yao Qi <yao@codesourcery.com>
5051
5052 * Makefile.in (SFILES): Add common/vec.c.
5053 (OBS): Add vec.o.
5054 (vec.o): New rule.
5055
5056 2012-04-19 Yao Qi <yao@codesourcery.com>
5057
5058 * remote-utils.c (prepare_resume_reply): Replace with macro
5059 target_core_of_thread.
5060 * server.c (handle_qxfer_threads_proper): Likewise.
5061 * target.h (traget_core_of_thread): New macro.
5062
5063 2012-04-18 Pedro Alves <palves@redhat.com>
5064
5065 * aclocal.m4: Regenerate.
5066 * configure: Regenerate.
5067
5068 2012-04-16 Yao Qi <yao@codesourcery.com>
5069
5070 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5071 duplicated on address.
5072
5073 2012-04-16 Yao Qi <yao@codesourcery.com>
5074
5075 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5076 (struct tracepoint_action_ops) <send>: New field.
5077 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5078 (agent_expr_send, x_tracepoint_action_send): New.
5079 (l_tracepoint_action_send): New.
5080 (cmd_qtdp): Download and install tracepoint
5081 according to `use_agent'.
5082 (run_inferior_command): Add one more parameter `len'.
5083 Update callers.
5084 (tracepoint_send_agent): New.
5085 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5086
5087 2012-04-16 Yao Qi <yao@codesourcery.com>
5088
5089 * tracepoint.c (download_tracepoints): Moved to ...
5090 (cmd_qtstart): ... here.
5091
5092 2012-04-14 Yao Qi <yao@codesourcery.com>
5093
5094 * tracepoint.c: Include inttypes.h.
5095 (struct collect_memory_action): Use sized types.
5096 (struct tracepoint): Likewise.
5097 (cmd_qtdp, stop_tracing): Update print specifiers.
5098 (cmd_qtp, response_tracepoint): Likewise.
5099 (collect_data_at_tracepoint): Likewise.
5100 (collect_data_at_step): Likewise.
5101
5102 2012-04-14 Yao Qi <yao@codesourcery.com>
5103
5104 Import gnulib module inttypes.
5105 * aclocal.m4, config.in, configure: Regenerated.
5106
5107 2012-04-14 Yao Qi <yao@codesourcery.com>
5108
5109 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5110 Makefile and config.status at last.
5111
5112 2012-04-13 Yao Qi <yao@codesourcery.com>
5113
5114 * tracepoint.c: Include stdint.h unconditionally.
5115
5116 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5117
5118 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5119 on BFD_HAVE_SYS_PROCFS_TYPE.
5120 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5121 * configure: Regenerate.
5122 * config.in: Likewise.
5123
5124 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5125
5126 * Makefile.in (clean): Also remove x32.c x32-linux.c
5127 x32-avx.c x32-avx-linux.c.
5128 (x32.o): New target.
5129 (x32.c): Likewise.
5130 (x32-linux.o): Likewise.
5131 (x32-linux.c): Likewise.
5132 (x32-avx.o): Likewise.
5133 (x32-avx.c): Likewise.
5134 (x32-avx-linux.o): Likewise.
5135 (x32-avx-linux.c): Likewise.
5136
5137 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5138 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5139 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5140 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5141 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5142 i386/x32-avx-linux.xml.
5143
5144 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5145 (init_registers_x32_avx_linux): Likwise.
5146 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5147 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5148
5149 2012-04-13 Pedro Alves <palves@redhat.com>
5150
5151 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5152 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5153 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5154 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5155 the sub-make.
5156
5157 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5158
5159 * linux-x86-low.c (compat_x32_clock_t): New.
5160 (compat_x32_siginfo_t): Likewise.
5161 (compat_x32_siginfo_from_siginfo): Likewise.
5162 (siginfo_from_compat_x32_siginfo): Likewise.
5163 (linux_is_elf64): Likewise.
5164 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5165 and siginfo_from_compat_x32_siginfo for x32.
5166 (x86_arch_setup): Set linux_is_elf64.
5167
5168 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5169
5170 PR gdb/13969
5171 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5172 e_machine field.
5173 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5174 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5175 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5176 compatible with process.
5177
5178 2012-04-12 Yao Qi <yao@codesourcery.com>
5179
5180 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5181 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5182 (install-only, install-info, clean): Handle sub dir gnulib.
5183 (all-lib, am--refresh): New targets.
5184 (memmem.o): Remove target.
5185 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5186 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5187 (AC_REPLACE_FUNCS): Remove memmem.
5188 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5189 (AC_OUTPUT): Generate Makefile in gnulib/.
5190 * aclocal.m4, config.in, configure: Regenerated.
5191
5192 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5193
5194 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5195
5196 2012-04-05 Pedro Alves <palves@redhat.com>
5197
5198 -Werror=strict-aliasing
5199
5200 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5201 pointer.
5202
5203 2012-04-04 Pedro Alves <palves@redhat.com>
5204
5205 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5206 (sparc_store_gregset_from_stack, sparc_store_gregset)
5207 (sparc_breakpoint_at): Fix formatting.
5208
5209 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5210
5211 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5212 are available.
5213 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5214 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5215 * config.in: Regenerate.
5216 * configure: Likewise.
5217
5218 2012-03-29 Pedro Alves <palves@redhat.com>
5219
5220 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5221 Correct ptrace arguments.
5222
5223 2012-03-28 Pedro Alves <palves@redhat.com>
5224
5225 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5226 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5227 (IA64_FR1_REGNUM): New defines.
5228 (ia64_fetch_register): New.
5229 (the_low_target): Install it.
5230 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5231 field.
5232 * linux-low.c (linux_fetch_registers): Try the
5233 the_low_target.fetch_register hook first.
5234
5235 * linux-arm-low.c (the_low_target): Adjust.
5236 * linux-bfin-low.c (the_low_target): Adjust.
5237 * linux-cris-low.c (the_low_target): Adjust.
5238 * linux-crisv32-low.c (the_low_target): Adjust.
5239 * linux-m32r-low.c (the_low_target): Adjust.
5240 * linux-m68k-low.c (the_low_target): Adjust.
5241 * linux-mips-low.c (the_low_target): Adjust.
5242 * linux-ppc-low.c (the_low_target): Adjust.
5243 * linux-s390-low.c (the_low_target): Adjust.
5244 * linux-sh-low.c (the_low_target): Adjust.
5245 * linux-sparc-low.c (the_low_target): Adjust.
5246 * linux-tic6x-low.c (the_low_target): Adjust.
5247 * linux-x86-low.c (the_low_target): Adjust.
5248 * linux-xtensa-low.c (the_low_target): Adjust.
5249
5250 2012-03-26 Pedro Alves <palves@redhat.com>
5251
5252 * server.c (handle_qxfer_libraries): Don't bail early if
5253 the_target->qxfer_libraries_svr4 is not NULL.
5254
5255 2012-03-26 Pedro Alves <palves@redhat.com>
5256
5257 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5258
5259 2012-03-23 Pedro Alves <palves@redhat.com>
5260
5261 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5262 "library-list-svr4" element's start tag when the the DSO list is
5263 empty.
5264
5265 2012-03-23 Pedro Alves <palves@redhat.com>
5266
5267 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5268 a variable whose type size is the same as the inferior's pointer
5269 size.
5270
5271 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5272
5273 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5274 struct siginfo.
5275 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5276 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5277 * linux-low.h: Include <signal.h>.
5278 (struct siginfo): Remove forward declaration.
5279 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5280 struct siginfo.
5281
5282 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5283
5284 * .gitignore: Ignore more files.
5285
5286 2012-03-19 Pedro Alves <palves@redhat.com>
5287 Jan Kratochvil <jan.kratochvil@redhat.com>
5288
5289 * server.c (cont_thread, general_thread): Add describing comments.
5290 (start_inferior): Clear `cont_thread'.
5291 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5292 of a process.
5293
5294 2012-03-15 Yao Qi <yao@codesourcery.com>
5295
5296 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5297 handling to ...
5298 (cmd_qtdp): ... here.
5299
5300 2012-03-15 Yao Qi <yao@codesourcery.com>
5301
5302 * tracepoint.c (struct tracepoint_action_ops): New.
5303 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5304 (m_tracepoint_action_download): New.
5305 (r_tracepoint_action_download): New.
5306 (x_tracepoint_action_download): New.
5307 (l_tracepoint_action_download): New.
5308 (add_tracepoint_action): Install `action->ops' according type.
5309 (download_tracepoint_1): Move code `download' function pointer
5310 of various tracepoint_action_ops.
5311
5312 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5313
5314 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5315 linux_ptrace_attach_warnings.
5316
5317 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5318
5319 * Makefile.in (linux-ptrace.o): New.
5320 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5321 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5322 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5323 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5324 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5325 of these targets.
5326 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5327
5328 2012-03-08 Yao Qi <yao@codesourcery.com>
5329 Pedro Alves <palves@redhat.com>
5330
5331 Fix PR server/13392.
5332 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5333 offset of JMP insn.
5334 * tracepoint.c (remove_tracepoint): New.
5335 (cmd_qtdp): Call remove_tracepoint when failed to install.
5336
5337 2012-03-07 Pedro Alves <palves@redhat.com>
5338
5339 * linux-low.c (get_detach_signal): New.
5340 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5341 Pass on pending signals to PTRACE_DETACH. Check the result of the
5342 ptrace call.
5343 * server.c (program_signals, program_signals_p): New.
5344 (handle_general_set): Handle QProgramSignals.
5345 * server.h (program_signals, program_signals_p): Declare.
5346
5347 2012-03-05 Pedro Alves <palves@redhat.com>
5348 Jan Kratochvil <jan.kratochvil@redhat.com>
5349
5350 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5351 New comment why.
5352
5353 2012-03-03 Yao Qi <yao@codesourcery.com>
5354
5355 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5356 agent_look_up_symbols.
5357
5358 2012-03-03 Yao Qi <yao@codesourcery.com>
5359
5360 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5361 (linux-x86-low.o): Likewise.
5362 * server.h: Remove in_process_agent_loaded.
5363 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5364 common/agent.c.
5365 Update callers.
5366
5367 2012-03-03 Yao Qi <yao@codesourcery.com>
5368
5369 * tracepoint.c (gdb_agent_capability): New global.
5370 (in_process_agent_loaded_ust): Renamed to
5371 `in_process_agent_supports_ust'.
5372 Update callers.
5373 (in_process_agent_supports_ust): Call agent_capability_check.
5374 (clear_installed_tracepoints): Assert that agent supports
5375 agent.
5376
5377 2012-03-03 Yao Qi <yao@codesourcery.com>
5378
5379 * linux-low.c (linux_supports_agent): New.
5380 (linux_target_ops): Initialize field `supports_agent' with
5381 linux_supports_agent.
5382 * target.h (struct target_ops) <supports_agent>: New.
5383 (target_supports_agent): New macro.
5384 * server.c (handle_general_set): Handle packet 'QAgent'.
5385 (handle_query): Send `QAgent+'.
5386 * Makefile.in (server.o): Depends on agent.h.
5387
5388 2012-03-03 Yao Qi <yao@codesourcery.com>
5389
5390 * Makefile.in (OBS): Add agent.o.
5391 Add new rule for agent.o.
5392 Track dependence of tracepoint.c on agent.h.
5393 * tracepoint.c (run_inferior_command_1):
5394 (run_inferior_command): Call agent_run_command.
5395 (gdb_ust_connect_sync_socket): Deleted. Move it to
5396 common/agent.c.
5397 (resume_thread, stop_thread): Likewise.
5398 (gdb_ust_socket_init): Renamed to ...
5399 (gdb_agent_socket_init): ... New.
5400 (gdb_ust_thread): Renamed to ...
5401 (gdb_agent_helper_thread): ... New.
5402 (gdb_ust_init): Move some code to ...
5403 (gdb_agent_init): ... here. New.
5404 [HAVE_UST]: Call gdb_ust_init.
5405 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5406 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5407 * config.in, configure: Regenerated.
5408
5409 2012-03-02 Pedro Alves <palves@redhat.com>
5410
5411 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5412 * linux-low.c (struct simple_pid_list): New.
5413 (stopped_pids): New a struct simple_pid_list pointer.
5414 (add_to_pid_list, pull_pid_from_list): New.
5415 (handle_extended_wait): Don't assume the first signal new children
5416 report is SIGSTOP. Adjust call to pull_pid_from_list.
5417 (linux_wait_for_lwp): Adjust.
5418
5419 2012-03-02 Yao Qi <yao@codesourcery.com>
5420
5421 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5422 debug log.
5423
5424 2012-03-02 Yao Qi <yao@codesourcery.com>
5425
5426 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5427 `stop_pc' and `tpoint'. Update caller.
5428
5429 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5430
5431 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5432 * linux-low.c (use_linux_regsets): New macro.
5433 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5434 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5435 (linux_register_in_regsets): New function.
5436 (usr_fetch_inferior_registers): Skip registers covered by
5437 regsets.
5438 (usr_store_inferior_registers): Likewise.
5439 (usr_fetch_inferior_registers): New macro.
5440 (usr_store_inferior_registers): Likewise.
5441 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5442 (linux_store_registers): Likewise.
5443 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5444 prototype.
5445 (init_registers_mips64_dsp_linux): Likewise.
5446 (init_registers_mips_linux): New macro.
5447 (init_registers_mips_dsp_linux): Likewise.
5448 (mips_dsp_num_regs): Likewise.
5449 (DSP_BASE, DSP_CONTROL): New fallback macros.
5450 (mips_base_regs): New macro.
5451 (mips_regmap): Use it. Fix the size.
5452 (mips_dsp_regmap): New variable.
5453 (mips_dsp_regset_bitmap): Likewise.
5454 (mips_arch_setup): New function.
5455 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5456 than mips_regmap.
5457 (mips_cannot_store_register): Likewise.
5458 (the_low_target): Update .arch_setup, .num_regs and .regmap
5459 initializers. Add .regset_bitmap initializer.
5460 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5461 initializer.
5462 * linux-bfin-low.c (the_low_target): Likewise.
5463 * linux-cris-low.c (the_low_target): Likewise.
5464 * linux-crisv32-low.c (the_low_target): Likewise.
5465 * linux-ia64-low.c (the_low_target): Likewise.
5466 * linux-m32r-low.c (the_low_target): Likewise.
5467 * linux-m68k-low.c (the_low_target): Likewise.
5468 * linux-ppc-low.c (the_low_target): Likewise.
5469 * linux-s390-low.c (the_low_target): Likewise.
5470 * linux-sh-low.c (the_low_target): Likewise.
5471 * linux-sparc-low.c (the_low_target): Likewise.
5472 * linux-tic6x-low.c (the_low_target): Likewise.
5473 * linux-x86-low.c (the_low_target): Likewise.
5474 * linux-xtensa-low.c (the_low_target): Likewise.
5475 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5476 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5477 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5478 srv_xmlfiles.
5479 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5480 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5481
5482 2012-02-29 Yao Qi <yao@codesourcery.com>
5483 Pedro Alves <palves@redhat.com>
5484
5485 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5486 `step_over_finished' is true.
5487
5488 2012-02-27 Pedro Alves <palves@redhat.com>
5489
5490 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5491 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5492
5493 2012-02-27 Pedro Alves <palves@redhat.com>
5494
5495 PR server/9684
5496 * linux-low.c (pid_is_stopped): New.
5497 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5498
5499 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5500
5501 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5502 of conditions.
5503
5504 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5505
5506 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5507
5508 2012-02-24 Luis Machado <lgustavo@codesourcery>
5509
5510 * server.c (handle_query): Advertise support for target-side
5511 breakpoint condition evaluation.
5512 (process_point_options): New function.
5513 (process_serial_event): When inserting a breakpoint, check for
5514 a target-side condition that should be evaluated.
5515
5516 * mem-break.c: Include regcache.h and ax.h.
5517 (point_cond_list_t): New data structure.
5518 (breakpoint) <cond_list>: New field.
5519 (find_gdb_breakpoint_at): Make non-static.
5520 (delete_gdb_breakpoint_at): Clear any target-side
5521 conditions.
5522 (clear_gdb_breakpoint_conditions): New function.
5523 (add_condition_to_breakpoint): Likewise.
5524 (add_breakpoint_condition): Likewise.
5525 (gdb_condition_true_at_breakpoint): Likewise.
5526 (gdb_breakpoint_here): Return result directly instead
5527 of going through a local variable.
5528
5529 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5530 (clear_gdb_breakpoint_conditions): Likewise.
5531 (add_breakpoint_condition): Likewise.
5532 (gdb_condition_true_at_breakpoint): Likewise.
5533
5534 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5535 (need_step_over_p): Take target-side breakpoint condition into
5536 consideration.
5537
5538 2012-02-24 Luis Machado <lgustavo@codesourcery>
5539
5540 * server.h: Include tracepoint.h.
5541 (agent_mem_read, agent_get_trace_state_variable_value,
5542 agent_set_trace_state_variable_value,
5543 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5544 get_set_tsv_func_addr): New prototypes.
5545
5546 * ax.h: New include file.
5547 * ax.c: New source file.
5548
5549 * tracepoint.c: Include ax.h.
5550 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5551 agent_expr, eval_result_type): Move to ax.h.
5552 (parse_agent_expr): Rename to ...
5553 (gdb_parse_agent_expr): ... this, make it non-static and move
5554 to ax.h.
5555 (unparse_agent_expr) Rename to ...
5556 (gdb_unparse_agent_expr): ... this, make it non-static and move
5557 to ax.h.
5558 (eval_agent_expr): Rename to ...
5559 (eval_tracepoint_agent_expr): ... this.
5560 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5561 forward declarations.
5562 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5563 (agent_get_trace_state_variable_value): New function.
5564 (agent_set_trace_state_variable_value): New function.
5565 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5566 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5567 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5568 (condition_true_at_tracepoint): Likewise.
5569 (parse_agent_expr): Rename to ...
5570 (gdb_parse_agent_expr): ... this and move to ax.c.
5571 (unparse_agent_expr): Rename to ...
5572 (gdb_unparse_agent_expr): ... this and move to ax.c.
5573 (gdb_agent_op_name): Move to ax.c.
5574 (eval_agent_expr): Rename to ...
5575 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5576 and move to ax.c.
5577 (eval_tracepoint_agent_expr): New function.
5578 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5579 non-static.
5580 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5581 ax.c.
5582 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5583 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5584 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5585 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5586 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5587 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5588 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5589 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5590 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5591 (compile_bytecodes): Remove forward declaration.
5592 (is_goto_target): Move to ax.c.
5593 (compile_bytecodes): Move to ax.c and call
5594 agent_get_trace_state_variable_value (...) and
5595 agent_set_trace_state_variable_value (...).
5596
5597 * Makefile.in: Update ax.c and IPA dependencies.
5598
5599 2012-02-24 Pedro Alves <palves@redhat.com>
5600
5601 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5602 (cmd_bigqtbuffer_circular): ... this. Only handle
5603 'QTBuffer:circular:'.
5604 (handle_tracepoint_general_set): Adjust.
5605
5606 2012-02-16 Yao Qi <yao@codesourcery.com>
5607
5608 * inferiors.c: Move code to ...
5609 * dll.c: .... here. New.
5610 * server.h: Declare clear_dlls.
5611 * Makefile.in (SFILES): Add dll.c.
5612 (OBS): Add dll.o
5613 (dll.o): New rule.
5614
5615 2012-02-11 Yao Qi <yao@codesourcery.com>
5616
5617 * server.c: (handle_monitor_command): Add a new parameter
5618 `own_buf'.
5619 (handle_query): Update caller.
5620
5621 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5622
5623 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5624 * configure, config.in: Regenerate.
5625 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5626 is not defined.
5627
5628 2012-02-02 Pedro Alves <palves@redhat.com>
5629
5630 Try SIGKILL first, then PTRACE_KILL.
5631 * linux-low.c (linux_kill_one_lwp): New.
5632 (linux_kill_one_lwp): Rename to ...
5633 (kill_one_lwp_callback): ... this. Use the new
5634 linux_kill_one_lwp.
5635
5636 2012-02-02 Pedro Alves <palves@redhat.com>
5637
5638 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5639 inferior.
5640
5641 2012-01-27 Pedro Alves <palves@redhat.com>
5642
5643 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5644 (elf_64_file_p): Make static.
5645 (linux_pid_exe_is_elf_64_file): New.
5646 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5647 Delete declarations.
5648 (linux_pid_exe_is_elf_64_file): Declare.
5649 * linux-x86-low.c (x86_arch_setup): Use
5650 linux_pid_exe_is_elf_64_file.
5651
5652 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5653
5654 * linux-low.c (linux_wait_for_event_1): Rename to ...
5655 (linux_wait_for_event): ... here and merge it with former
5656 linux_wait_for_event - new variable wait_ptid, use it.
5657 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5658
5659 2012-01-23 Pedro Alves <palves@redhat.com>
5660
5661 * server.c (main): Avoid yet another case of infinite loop while
5662 detaching/killing after a longjmp.
5663
5664 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5665
5666 Code cleanup.
5667 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5668
5669 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5670
5671 * hostio.c (handle_readlink): New function.
5672 (handle_vFile): Call it to handle "vFile:readlink" packets.
5673
5674 2012-01-20 Pedro Alves <palves@redhat.com>
5675 Ulrich Weigand <ulrich.weigand@linaro.org>
5676
5677 * server.c (handle_v_requests): Only support vAttach and vRun to
5678 start multiple processes when in extended protocol mode.
5679
5680 2012-01-17 Pedro Alves <palves@redhat.com>
5681
5682 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5683 memalign plus mprotect to allocate the scratch buffer.
5684
5685 2012-01-13 Pedro Alves <palves@redhat.com>
5686
5687 * server.c (attach_inferior): Clear `cont_thread'.
5688
5689 2012-01-13 Pedro Alves <palves@redhat.com>
5690
5691 * server.c (main): Avoid infinite loop while detaching/killing
5692 after a longjmp.
5693
5694 2012-01-09 Doug Evans <dje@google.com>
5695
5696 * server.c (start_inferior): Set last_ptid in --wrapper case.
5697
5698 2012-01-06 Yao Qi <yao@codesourcery.com>
5699
5700 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5701 defined.
5702 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5703
5704 2012-01-04 Yao Qi <yao@codesourcery.com>
5705
5706 * tracepoint.c (cmd_qtdp): Print debug message
5707 for static tracepoint.
5708
5709 2012-01-04 Yao Qi <yao@codesourcery.com>
5710
5711 * tracepoint.c (trace_vdebug): Differentiate debug message
5712 between gdbserver and IPA.
5713
5714 2012-01-03 Yao Qi <yao@codesourcery.com>
5715
5716 * tracepoint.c (tracepoint_was_hit): Don't collect for
5717 static tracepoint.
5718
5719 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5720
5721 * terminal.h: Reformat copyright header.
5722
5723 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5724
5725 * server.c (gdbserver_version): Update copyright year.
5726 * gdbreplay.c (gdbreplay_version): Likewise.
5727
5728 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5729
5730 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5731
5732 Revert:
5733 2011-12-18 Hui Zhu <teawater@gmail.com>
5734 * linux-low.c (linux_create_inferior): Save return value to ret.
5735
5736 2011-12-18 Hui Zhu <teawater@gmail.com>
5737
5738 * linux-low.c (linux_create_inferior): Save return value to ret.
5739
5740 2011-12-16 Doug Evans <dje@google.com>
5741
5742 * linux-low.c (linux_create_inferior): If stdio connection,
5743 redirect stdin from /dev/null, stdout to stderr.
5744 * remote-utils.c (remote_is_stdio): New static global.
5745 (remote_connection_is_stdio): New function.
5746 (remote_prepare): Handle stdio connection.
5747 (remote_open): Ditto.
5748 (remote_close): Don't close stdin for stdio connections.
5749 (read_prim,write_prim): New functions. Replace all calls to
5750 read/write to these.
5751 * server.c (main): Watch for "-" argument. Move call to
5752 remote_prepare before start_inferior.
5753 * server.h (STDIO_CONNECTION_NAME): New macro.
5754 (remote_connection_is_stdio): Declare.
5755
5756 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5757 in debugging output.
5758
5759 2011-12-15 Yao Qi <yao@codesourcery.com>
5760
5761 * tracepoint.c: Include sys/syscall.h.
5762 (gdb_ust_thread): Remove preprocessor conditional.
5763
5764 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5765
5766 * linux-low.c (linux_detach_one_lwp): Call
5767 the_low_target.prepare_to_resume before detaching.
5768
5769 2011-12-14 Yao Qi <yao@codesourcery.com>
5770
5771 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5772 of write.
5773
5774 2011-12-14 Yao Qi <yao@codesourcery.com>
5775
5776 * i386-low.c (i386_low_stopped_data_address): Initialize local
5777 variable `control'.
5778
5779 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5780
5781 PR remote/13492
5782
5783 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5784 DR_CONTROL unless necessary. Extend comments.
5785 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5786 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5787
5788 2011-12-13 Yao Qi <yao@codesourcery.com>
5789
5790 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5791 macros.
5792 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5793
5794 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5795
5796 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5797 Print new debug message for such case.
5798
5799 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5800
5801 Fix overlapping memcpy.
5802 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5803 the read_inferior_memory transfer.
5804 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5805 write_inferior_memory transfer.
5806 (set_fast_tracepoint_jump): New variable buf. Use it for the
5807 read_inferior_memory and write_inferior_memory transfers.
5808 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5809 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5810 Use it for the write_inferior_memory transfer.
5811 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5812 buffers.
5813
5814 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5815
5816 * linux-low.c (fetch_register, store_register): Make code
5817 consistent, fix formatting.
5818
5819 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5820
5821 * linux-low.c (usr_store_inferior_registers): Factor out code
5822 to handle individual registers into...
5823 (store_register): ... this new function.
5824
5825 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5826
5827 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5828 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5829 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5830 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5831 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5832 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5833 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5834 (srv_xmlfiles): Add new XML files.
5835
5836 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5837 and <sys/uio.h>.
5838 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5839 (init_registers_s390_linux32v1): Add prototype.
5840 (init_registers_s390_linux32v2): Likewise.
5841 (init_registers_s390_linux64v1): Likewise.
5842 (init_registers_s390_linux64v2): Likewise.
5843 (init_registers_s390x_linux64v1): Likewise.
5844 (init_registers_s390x_linux64v2): Likewise.
5845 (s390_num_regs): Increment to 52.
5846 (s390_regmap): Add orig_r2 register.
5847 (s390_num_regs_3264): Increment to 68.
5848 (s390_regmap_3264): Add orig_r2 register.
5849 (s390_collect_ptrace_register): Handle orig_r2 register.
5850 (s390_supply_ptrace_register): Likewise.
5851 (s390_fill_last_break): New function.
5852 (s390_store_last_break): Likewise.
5853 (s390_fill_system_call): New function.
5854 (s390_store_system_call): Likewise.
5855 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5856 register sets.
5857 (s390_check_regset): New function.
5858 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5859 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5860 Update target_regsets for available register sets.
5861
5862 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5863 Jan Kratochvil <jan.kratochvil@redhat.com>
5864
5865 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5866 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5867 New.
5868 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5869 * linux-low.h (struct process_info_private): New member r_debug.
5870 * server.c (handle_qxfer_libraries): Call
5871 the_target->qxfer_libraries_svr4.
5872 (handle_qxfer_libraries_svr4): New function.
5873 (qxfer_packets): New entry "libraries-svr4".
5874 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5875 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5876 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5877 PACKET_qXfer_libraries_svr4.
5878
5879 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5880
5881 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5882 PSW address/mask between 8-byte and 16-byte formats.
5883 (s390_supply_ptrace_register): Likewise.
5884 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5885 basic addressing mode bit.
5886
5887 2011-11-24 Stan Shebs <stan@codesourcery.com>
5888
5889 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5890
5891 2011-11-17 Stan Shebs <stan@codesourcery.com>
5892
5893 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5894 (tracing_start_time): New global.
5895 (tracing_stop_time): New global.
5896 (tracing_user_name): New global.
5897 (tracing_notes): New global.
5898 (tracing_stop_note): New global.
5899 (cmd_qtstart): Set traceframe_usage, start_time.
5900 (stop_tracing): Set stop_time.
5901 (cmd_qtstatus): Report additional status.
5902 (cmd_qtp): New function.
5903 (handle_tracepoint_query): Call it.
5904 (cmd_qtnotes): New function.
5905 (handle_tracepoint_general_set): Call it.
5906 (get_timestamp): Rename from tsv_get_timestamp.
5907
5908 2011-11-14 Stan Shebs <stan@codesourcery.com>
5909 Kwok Cheung Yeung <kcy@codesourcery.com>
5910
5911 * linux-x86-low.c (small_jump_insn): New.
5912 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5913 trampoline and error message, build a trampoline and issue a small
5914 jump instruction to it.
5915 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5916 trampoline and error message.
5917 (x86_get_min_fast_tracepoint_insn_len): New.
5918 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5919 * linux-low.h (struct linux_target_ops): Add arguments to
5920 install_fast_tracepoint_jump_pad operation, add new operation.
5921 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5922 arguments.
5923 (linux_get_min_fast_tracepoint_insn_len): New function.
5924 (linux_target_op): Add new operation.
5925 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5926 (gdb_trampoline_buffer_end): Ditto.
5927 (gdb_trampoline_buffer_error): Ditto.
5928 (struct ipa_sym_addresses): Add fields for new IPA variables.
5929 (symbol_list): Add entries for new IPA variables.
5930 (struct tracepoint): Add fields to hold the address range of the
5931 trampoline used by the tracepoint.
5932 (trampoline_buffer_head): New static variable.
5933 (trampoline_buffer_tail): Ditto.
5934 (claim_trampoline_space): New function.
5935 (have_fast_tracepoint_trampoline_buffer): New function.
5936 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5937 structure.
5938 (install_fast_tracepoint): Ditto, also add error buffer argument.
5939 (cmd_qtminftpilen): New function.
5940 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5941 (fast_tracepoint_from_trampoline_address): New function.
5942 (fast_tracepoint_collecting): Handle trampoline as part of jump
5943 pad space.
5944 (set_trampoline_buffer_space): New function.
5945 (initialize_tracepoint): Initialize new IPA variables.
5946 * target.h (struct target_ops): Add arguments to
5947 install_fast_tracepoint_jump_pad operation, add new
5948 get_min_fast_tracepoint_insn_len operation.
5949 (target_get_min_fast_tracepoint_insn_len): New.
5950 (install_fast_tracepoint_jump_pad): Add arguments.
5951 * server.h (IPA_BUFSIZ): Define.
5952 * linux-i386-ipa.c: Include extra header files.
5953 (initialize_fast_tracepoint_trampoline_buffer): New function.
5954 (initialize_low_tracepoint): Call it.
5955 * server.h (set_trampoline_buffer_space): Declare.
5956 (claim_trampoline_space): Ditto.
5957 (have_fast_tracepoint_trampoline_buffer): Ditto.
5958
5959 2011-11-14 Yao Qi <yao@codesourcery.com>
5960
5961 * server.c (handle_query): Handle InstallInTrace for qSupported.
5962 * tracepoint.c (add_tracepoint): Sort list.
5963 (install_tracepoint, download_tracepoint): New.
5964 (cmd_qtdp): Call them to install and download tracepoints.
5965 (sort_tracepoints): Removed.
5966 (cmd_qtstart): Update.
5967
5968 2011-11-14 Yao Qi <yao@codesourcery.com>
5969
5970 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5971 * mem-break.h: Declare.
5972 * tracepoint.c (cmd_qtstart): Move some code to ...
5973 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5974 New.
5975 (download_tracepoints): Move some code to ...
5976 (download_tracepoint_1): ... here. New.
5977
5978 2011-11-08 Yao Qi <yao@codesourcery.com>
5979
5980 * remote-utils.c (relocate_instruction): A comment fix.
5981
5982 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5983
5984 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5985 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5986 dr_status_mirror and dr_control_mirror from debug_reg_state.
5987 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5988 (i386_initial_stuff): Remove use of deleted globals.
5989 (i386_get_thread_context, i386_set_thread_context,
5990 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5991 from debug_reg_state.
5992
5993 2011-11-05 Yao Qi <yao@codesourcery.com>
5994
5995 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5996 address as TPOINT's.
5997
5998 2011-11-02 Stan Shebs <stan@codesourcery.com>
5999
6000 * tracepoint.c (agent_mem_read_string): New function.
6001 (eval_agent_expr): Call it for tracenz.
6002 * server.c (handle_query): Report support for tracenz.
6003
6004 2011-11-02 Yao Qi <yao@codesourcery.com>
6005
6006 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6007
6008 2011-11-02 Yao Qi <yao@codesourcery.com>
6009
6010 * target.h: Fix a typo in comment.
6011
6012 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6013
6014 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6015 clobber the breakpoints' shadows with fast tracepoint jumps.
6016 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6017 * target.c (write_inferior_memory): Also pass MYADDR down to
6018 check_mem_write.
6019
6020 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6021
6022 * configure.ac: Check support for personality routine.
6023 * configure: Regenerate.
6024 * config.in: Likewise.
6025 * linux-low.c: Include <sys/personality.h>.
6026 Define ADDR_NO_RANDOMIZE if necessary.
6027 (linux_create_inferior): Disable address space randomization when
6028 forking inferior, if requested.
6029 (linux_supports_disable_randomization): New function.
6030 (linux_target_ops): Install it.
6031 * server.h (disable_randomization): Declare.
6032 * server.c (disable_randomization): New global variable.
6033 (handle_general_set): Handle QDisableRandomization.
6034 (handle_query): Likewise for qSupported.
6035 (main): Support --disable-randomization and --no-disable-randomization
6036 command line arguments.
6037 * target.h (struct target_ops): Add supports_disable_randomization.
6038 (target_supports_disable_randomization): New macro.
6039
6040 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6041
6042 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6043 ifdef check.
6044 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6045 [!PT_GETDSBT] (target_loadmap): New definition.
6046 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6047 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6048 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6049 and PT_GETDSBT to LINUX_LOADMAP.
6050 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6051 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6052
6053 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6054
6055 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6056 (arm_linux_hwbp_cap): New static variable.
6057 (arm_linux_get_hwbp_cap): Replace by ...
6058 (arm_linux_init_hwbp_cap): ... this new function.
6059 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6060 (arm_linux_get_hw_watchpoint_count): Likewise.
6061 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6062 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6063 (arm_prepare_to_resume): Use perror_with_name instead of error.
6064
6065 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6066
6067 * linux-arm-low.c: Include <signal.h>.
6068 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6069 (struct arm_linux_hwbp_cap): New data type.
6070 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6071 (struct arm_linux_hw_breakpoint): New data type.
6072 (MAX_BPTS, MAX_WPTS): Define.
6073 (struct arch_process_info, struct arch_lwp_info): New data types.
6074 (arm_linux_get_hwbp_cap): New function.
6075 (arm_linux_get_hw_breakpoint_count): Likewise.
6076 (arm_linux_get_hw_watchpoint_count): Likewise.
6077 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6078 (arm_hwbp_control_initialize): Likewise.
6079 (arm_hwbp_control_is_enabled): Likewise.
6080 (arm_hwbp_control_is_initialized): Likewise.
6081 (arm_hwbp_control_disable): Likewise.
6082 (arm_linux_hw_breakpoint_equal): Likewise.
6083 (arm_linux_hw_point_initialize): Likewise.
6084 (struct update_registers_data): New data structure.
6085 (update_registers_callback: New function.
6086 (arm_insert_point): Likewise.
6087 (arm_remove_point): Likewise.
6088 (arm_stopped_by_watchpoint): Likewise.
6089 (arm_stopped_data_address): Likewise.
6090 (arm_new_process): Likewise.
6091 (arm_new_thread): Likewise.
6092 (arm_prepare_to_resume): Likewise.
6093 (the_low_target): Register arm_insert_point, arm_remove_point,
6094 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6095 arm_new_thread, and arm_prepare_to_resume.
6096
6097 2011-09-15 Stan Shebs <stan@codesourcery.com>
6098
6099 * server.h (struct emit_ops): Add compare-goto fields.
6100 * tracepoint.c (gdb_agent_op_sizes): New table.
6101 (emit_eq_goto): New function.
6102 (emit_ne_goto): New function.
6103 (emit_lt_goto): New function.
6104 (emit_le_goto): New function.
6105 (emit_gt_goto): New function.
6106 (emit_ge_goto): New function.
6107 (is_goto_target): New function.
6108 (compile_bytecodes): Recognize special cases of compare-goto
6109 combinations and call specialized emitters for them.
6110 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6111 (amd64_emit_ne_goto): New function.
6112 (amd64_emit_lt_goto): New function.
6113 (amd64_emit_le_goto): New function.
6114 (amd64_emit_gt_goto): New function.
6115 (amd64_emit_ge_goto): New function.
6116 (amd64_emit_ops): Add the new functions.
6117 (i386_emit_eq_goto): New function.
6118 (i386_emit_ne_goto): New function.
6119 (i386_emit_lt_goto): New function.
6120 (i386_emit_le_goto): New function.
6121 (i386_emit_gt_goto): New function.
6122 (i386_emit_ge_goto): New function.
6123 (i386_emit_ops): Add the new functions.
6124
6125 2011-09-08 Stan Shebs <stan@codesourcery.com>
6126
6127 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6128 (i386_emit_epilogue): Restore %ebx.
6129
6130 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6131
6132 * server.c (step_thread): Remove definition.
6133 (process_serial_event): Don't handle Hs.
6134 * server.h (step_thread): Remove declaration.
6135 * target.c (set_desired_inferior): Remove use of step_thread.
6136
6137 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6138
6139 * linux-low.c: Include linux-procfs.h.
6140 (linux_attach_lwp_1): Update comments.
6141 (linux_attach): Scan for existing threads when attaching to a
6142 process that is the tgid.
6143 * Makefile.in: Update dependencies.
6144
6145 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6146
6147 * configure.srv: Add linux-procfs.o dependencies.
6148
6149 2011-08-14 Yao Qi <yao@codesourcery.com>
6150
6151 * target.h (struct target_ops): Fix indent.
6152 * win32-low.c (win32_target_ops): Fix comment.
6153
6154 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6155 Yao Qi <yao@codesourcery.com>
6156
6157 * Makefile.in (clean): Remove tic6x-*.c files.
6158 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6159 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6160 (tic6x-c64xp-linux.c): Likewise.
6161 * configure.srv: Add support for tic6x-*-uclinux.
6162 * linux-tic6x-low.c: New.
6163 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6164
6165 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6166 Yao Qi <yao@codesourcery.com>
6167
6168 * target.h (struct target_ops): Add read_loadmap.
6169 * linux-low.c (struct target_loadseg): New type.
6170 (struct target_loadmap): New type.
6171 (linux_read_loadmap): New function.
6172 (linux_target_ops): Add linux_read_loadmap.
6173 * server.c (handle_query): Support qXfer:fdpic:read packet.
6174 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6175 to NULL.
6176
6177 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6178
6179 * win32-low.c: Include <stdint.h>.
6180
6181 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6182
6183 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6184 to the inferior here.
6185 (i386_remove_aligned_watchpoint): Ditto.
6186 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6187 fit part of the watchpoint in the debug registers.
6188 (i386_update_inferior_debug_regs): New.
6189 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6190 registers, and only update the inferior on success.
6191 (i386_low_remove_watchpoint): Ditto.
6192
6193 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6194
6195 * linux-low.c (compare_ints, unique, list_threads, show_process,
6196 linux_core_of_thread): Delete.
6197 (linux_target_ops): Change linux_core_of_thread to
6198 linux_common_core_of_thread.
6199 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6200 * utils.c (malloc_failure): Change type of argument.
6201 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6202 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6203 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6204 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6205 (IPA_OBJS): Add common-utils-ipa.o.
6206 (ptid_h, linux_osdata_h): New macros.
6207 (server_h): Add common/common-utils.h, common/xml-utils.h,
6208 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6209 common/ptid.h.
6210 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6211 ptid.o, buffer.o): New rules.
6212 (linux-low.o): Add common/linux-osdata.h as a dependency.
6213 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6214 * configure.ac: Add AC_HEADER_DIRENT check.
6215 * config.in: Regenerate.
6216 * configure: Regenerate.
6217 * remote-utils.c (xml_escape_text): Delete.
6218 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6219 buffer_xml_printf): Move to common/buffer.c.
6220 * server.c (main): Remove call to initialize_inferiors.
6221 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6222 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6223 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6224 internal_error, gdb_assert, gdb_assert_fail): Delete.
6225 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6226 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6227 common/buffer.h.
6228 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6229 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6230 initialize_inferiors): Delete.
6231
6232 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6233
6234 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6235 symbol error.
6236
6237 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6238
6239 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6240 assertion.
6241 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6242
6243 2011-05-26 Yao Qi <yao@codesourcery.com>
6244
6245 * Makefile.in (thread-db.o): Track dependence to
6246 common/gdb_thread_db.h.
6247 * thread-db.c: include gdb_thread_db.h from right place.
6248
6249 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6250
6251 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6252 __FILE__ and __LINE__ to internal_error.
6253
6254 2011-05-13 Doug Evans <dje@google.com>
6255
6256 * thread-db.c (try_thread_db_load_from_sdir): New function.
6257 (try_thread_db_load_from_dir): New function.
6258 (thread_db_load_search): Handle $sdir, ignore $pdir.
6259 Remove trying of system directories if search of
6260 libthread-db-search-path fails, that is now done via $sdir.
6261
6262 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6263
6264 * server.c (handle_query): Add EnableDisableTracepoints to the list
6265 of supported features.
6266 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6267 tracepoints.
6268 (cmd_qtenable_disable): New.
6269 (cmd_qtstart): Install tracepoints even if disabled.
6270 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6271 receiving a QTEnable or QTDisable packet.
6272 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6273 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6274 tracepoints.
6275 (gdb_probe): Skip data collection if static tracepoint is disabled.
6276
6277 2011-05-10 Doug Evans <dje@google.com>
6278
6279 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6280
6281 2011-05-04 Doug Evans <dje@google.com>
6282
6283 * linux-low.c (linux_join): Skip process lookup.
6284 * spu-low.c (spu_join): Ditto.
6285 * server.c (join_inferiors_callback): Delete.
6286 (process_serial_event): For 'D' packet (detach) call join_inferior
6287 directly.
6288
6289 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6290
6291 * README: Don't mention xscale*-*-linux*.
6292 * configure.srv (xscale*-*-linux*): Don't handle target.
6293
6294 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6295
6296 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6297 casting pointers.
6298 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6299 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6300 (i386_emit_void_call_2): Likewise.
6301
6302 2011-04-26 Yao Qi <yao@codesourcery.com>
6303
6304 * linux-low.c: Move common macros to linux-ptrace.h.
6305 Include linux-ptrace.h.
6306 * Makefile.in (linux_ptrace_h): New.
6307 (linux-low.o): Depends on linux-ptrace.h.
6308
6309 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6310
6311 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6312 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6313 (remote_prepare): New function with most of the TCP code from ...
6314 (remote_open): ... here. Detect PORT here unconditionally. Move also
6315 setting transport_is_reliable.
6316 * server.c (run_once): New variable.
6317 (gdbserver_usage): Document it.
6318 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6319 the first run if RUN_ONCE.
6320 * server.h (run_once, remote_prepare): New declarations.
6321
6322 2011-04-19 Tom Tromey <tromey@redhat.com>
6323
6324 * win32-low.c (handle_load_dll): Remove duplicate "the".
6325
6326 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6327
6328 Remove support for old Cygwin 1.5 versions.
6329 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6330 function to avoid warning.
6331 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6332 warning.
6333
6334 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6335
6336 * gdbserver/server.h (Macro _): Define it if not available.
6337
6338 2011-03-14 Michael Snyder <msnyder@vmware.com>
6339
6340 * hostio.c (handle_close): Remove unnecessary null test.
6341
6342 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6343
6344 * Makefile.in (maintainer-clean realclean distclean): Remove
6345 "make ... subdir_do" command.
6346
6347 2011-03-10 Michael Snyder <msnyder@vmware.com>
6348
6349 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6350
6351 * server.c (handle_v_run): Free alloced buffer on early return.
6352
6353 2011-03-09 Yao Qi <yao@codesourcery.com>
6354
6355 Revert:
6356 2011-03-04 Yao Qi <yao@codesourcery.com>
6357
6358 * Makefile.in: Remove GNU make feature --directory.
6359
6360 2011-03-05 Yao Qi <yao@codesourcery.com>
6361
6362 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6363 (subdir_do): New make target. Copied from gdb/Makefile.
6364 (maintainer-clean, realclean, distclean, clean): Call corresponding
6365 make targets in common/Makefile.
6366
6367 2011-02-11 Yao Qi <yao@codesourcery.com>
6368
6369 * configure.ac: Call AC_PROG_RANLIB.
6370 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6371 * configure: Regenerate.
6372
6373 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6374
6375 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6376
6377 2011-03-06 Yao Qi <yao@codesourcery.com>
6378
6379 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6380
6381 2011-03-05 Yao Qi <yao@codesourcery.com>
6382
6383 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6384 (subdir_do): New make target. Copied from gdb/Makefile.
6385 (maintainer-clean, realclean, distclean, clean): Call corresponding
6386 make targets in common/Makefile.
6387
6388 2011-03-04 Yao Qi <yao@codesourcery.com>
6389
6390 * Makefile.in: Remove GNU make feature --directory.
6391
6392 2011-03-04 Michael Snyder <msnyder@vmware.com>
6393
6394 * server.c (queue_stop_reply): Call xmalloc not malloc.
6395
6396 2011-03-02 Michael Snyder <msnyder@vmware.com>
6397
6398 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6399
6400 2011-02-28 Michael Snyder <msnyder@vmware.com>
6401
6402 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6403 (cmd_qtframe): Ditto.
6404 (cmd_qtbuffer): Ditto.
6405 (cmd_bigqtbuffer): Ditto.
6406
6407 * utils.c (decimal2str): Initialize 'width' to nine, then
6408 don't mess with it.
6409
6410 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6411
6412 * hostio.c (require_data): Free *data, not data.
6413
6414 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6415
6416 * hostio.c (require_data): Use free, not xfree.
6417
6418 2011-02-27 Michael Snyder <msnyder@vmware.com>
6419
6420 * server.c (handle_query): Discard unused value.
6421
6422 * hostio.c (require_data): Free malloc memory before returning
6423 error.
6424
6425 2011-02-26 Michael Snyder <msnyder@vmware.com>
6426
6427 * linux-low.c (list_threads): Call closedir for dirent.
6428
6429 2011-02-27 Michael Snyder <msnyder@vmware.com>
6430
6431 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6432 a case statement falls through.
6433
6434 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6435
6436 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6437 in comparison.
6438
6439 2011-02-26 Michael Snyder <msnyder@vmware.com>
6440
6441 * utils.c (decimal2str): Eliminate dead code and dead param.
6442 (pulongest): Drop dead param from call to decimal2str.
6443 (plongest): Ditto.
6444
6445 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6446
6447 Revert the following patch (not approved yet):
6448 2011-02-21 Hui Zhu <teawater@gmail.com>
6449 * tracepoint.c (tp_printf): New function.
6450 (eval_agent_expr): Handle gdb_agent_op_printf.
6451
6452 2011-02-21 Hui Zhu <teawater@gmail.com>
6453
6454 * tracepoint.c (tp_printf): New function.
6455 (eval_agent_expr): Handle gdb_agent_op_printf.
6456
6457 2011-02-18 Tom Tromey <tromey@redhat.com>
6458
6459 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6460 (tracepoint.o): Likewise.
6461 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6462 (gdb_agent_op_names): Likewise.
6463
6464 2011-02-18 Tom Tromey <tromey@redhat.com>
6465
6466 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6467 gdb_agent_op_rot>: New constants.
6468 (gdb_agent_op_names): Add pick and roll.
6469 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6470 cases.
6471
6472 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6473
6474 * aclocal.m4: Regenerated with aclocal-1.11.1.
6475
6476 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6477
6478 * server.c (handle_qxfer_traceframe_info): New.
6479 (qxfer_packets): Register "traceframe-info".
6480 (handle_query): Report support for qXfer:traceframe-info:read+.
6481 * tracepoint.c (match_blocktype): New.
6482 (traceframe_find_block_type): Rename to ...
6483 (traceframe_walk_blocks): ... this. Add callback filter argument,
6484 and use it.
6485 (traceframe_find_block_type): New, reimplemented on top of
6486 traceframe_walk_blocks.
6487 (build_traceframe_info_xml): New.
6488 (traceframe_read_info): New.
6489 * server.h (traceframe_read_info): Declare.
6490
6491 2011-02-11 Yao Qi <yao@codesourcery.com>
6492
6493 * configure.ac: Call AC_PROG_RANLIB.
6494 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6495 * configure: Regenerate.
6496
6497 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6498
6499 * server.c (gdb_read_memory): Change return semantics to allow
6500 partial transfers.
6501 (handle_search_memory_1): Adjust.
6502 (process_serial_event) <'m' packet>: Handle partial transfers.
6503 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6504
6505 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6506
6507 * regcache.c (init_register_cache): Initialize
6508 regcache->register_status.
6509 (free_register_cache): Release regcache->register_status.
6510 (regcache_cpy): Copy register_status.
6511 (registers_to_string): Print 'x's for unavailable registers.
6512 (supply_register): Mark the register's status valid or
6513 unavailable, depending on whether a buffer was passed in or not.
6514 (supply_register_zeroed): New.
6515 (supply_regblock): Mark the registers' status valid or
6516 unavailable, depending on whether a buffer was passed in or not.
6517 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6518 (struct regcache): New `register_status' field.
6519 (supply_register_zeroed): Declare.
6520 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6521 supply_register_zeroed, rather than passing a NULL buffer to
6522 supply_register.
6523 * tracepoint.c (fetch_traceframe_registers): Update comment.
6524
6525 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6526
6527 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6528 buffer explicit.
6529
6530 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6531
6532 * server.h (decode_xfer_write): Change prototype.
6533 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6534 and don't extract the annex here.
6535 * server.c (decode_xfer_read): Remove `annex' parameter,
6536 and don't extract the annex here.
6537 (decode_xfer): New.
6538 (struct qxfer): New.
6539 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6540 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6541 (handle_qxfer_statictrace): New functions, abstracted out from
6542 handle_query, and made to use the struct qxfer interface.
6543 (handle_threads_qxfer_proper): Rename to ...
6544 (handle_qxfer_threads_proper): ... this.
6545 (handle_threads_qxfer): Rename to ...
6546 (handle_qxfer_threads): ... this. Adjust.
6547 (qxfer_packets): New array.
6548 (handle_qxfer): New function.
6549 (handle_query): Use handle_qxfer.
6550
6551 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6552
6553 * gdbreplay.c: Shorten lines of >= 80 columns.
6554 * linux-low.c: Ditto.
6555 * linux-ppc-low.c: Ditto.
6556 * linux-s390-low.c: Ditto.
6557 * linux-sparc-low.c: Ditto.
6558 * linux-x86-low.c: Ditto.
6559 * linux-xtensa-low.c: Ditto.
6560 * mem-break.c: Ditto.
6561 * nto-low.c: Ditto.
6562 * regcache.h: Ditto.
6563 * remote-utils.c: Ditto.
6564 * server.c: Ditto.
6565 * server.h: Ditto.
6566 * thread-db.c: Ditto.
6567 * tracepoint.c: Ditto.
6568 * utils.c: Ditto.
6569 * win32-low.h: Ditto.
6570
6571 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6572
6573 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6574 update.
6575
6576 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6577
6578 * server.c (gdbserver_version): Update copyright year in version
6579 output.
6580 * gdbreplay.c (gdbreplay_version): Ditto.
6581
6582 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6583
6584 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6585 * linux-bfin-low.c: New file.
6586 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6587 PT_DATA_ADDR for BFIN targets.
6588 * Makefile.in (SFILES): Add linux-bfin-low.c.
6589 (clean): Remove reg-bfin.c.
6590 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6591 * README: Mention supported Blackfin targets.
6592
6593 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6594
6595 * .gitignore: New file.
6596
6597 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6598
6599 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6600
6601 2010-10-22 Jie Zhang <jie@codesourcery.com>
6602
6603 * Makefile.in: Add FLAGS_TO_PASS variable.
6604 (install): Remove dependency of install-only and recursively
6605 invoke make for install-only.
6606
6607 2010-10-04 Doug Evans <dje@google.com>
6608
6609 * Makefile.in (uninstall): Use $(DESTDIR).
6610
6611 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6612
6613 PR gdb/11842
6614
6615 * linux-x86-low.c (compat_siginfo_from_siginfo)
6616 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6617 si_code is < 0. Check for si_code == SI_TIMER before checking for
6618 si_code < 0.
6619
6620 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6621
6622 * lynx-i386-low.c: New file.
6623 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6624
6625 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6626
6627 * lynx-low.c (ptrace_request_to_str): Remove handling for
6628 request values that have been removed in LynxOS 5.x.
6629
6630 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6631
6632 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6633 <ptrace.h>
6634
6635 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6636
6637 * configure.ac: Add --enable-inprocess-agent option.
6638 * configure: Rebuilt.
6639
6640 2010-09-06 Yao Qi <yao@codesourcery.com>
6641
6642 * linux-low.c (linux_kill): Remove unused variable.
6643 (linux_stabilize_threads): Likewise.
6644 * server.c (start_inferior): Likewise.
6645 (queue_stop_reply_callback): Likewise.
6646 * tracepoint.c (do_action_at_tracepoint): Likewise.
6647
6648 2010-09-06 Yao Qi <yao@codesourcery.com>
6649
6650 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6651 on return.
6652
6653 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6654
6655 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6656
6657 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6658
6659 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6660 "$(IPA_DEPFILES)".
6661
6662 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6663
6664 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6665 gdbserver/lynx-ppc-low.c: New files.
6666 * Makefile.in (lynx_low_h): New variable.
6667 (lynx-low.o, lynx-ppc-low.o): New rules.
6668 * configure.ac: On LynxOS, link with -lnetinet.
6669 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6670 * configure: regenerate.
6671
6672 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6673
6674 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6675 * configure.ac: Add check for vasprintf and vsnprintf.
6676 * configure, config.in: Regenerate.
6677 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6678
6679 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6680
6681 * gdbreplay.c: Move include of alloca.h up, next to include of
6682 malloc.h.
6683 * server.h: Add include of malloc.h.
6684 * mem-break.c: Remove include of malloc.h.
6685 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6686
6687 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6688
6689 * Makefile.in (memmem.o): Build with -Wno-error.
6690
6691 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6692
6693 * utils.c (xsnprintf): Make non-static.
6694 * server.h: Add xsnprintf declaration.
6695 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6696 replace calls to snprintf by calls to xsnprintf throughout.
6697
6698 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6699
6700 * configure.ac: Add configure check for alloca.
6701 * configure, config.in: Regenerate.
6702 * server.h: Include alloca.h if it exists.
6703 * gdbreplay.c: Include alloca.h if it exists.
6704
6705 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6706
6707 * linux-low.c (__SIGRTMIN): Define if not already defined.
6708 (linux_create_inferior): Check for __ANDROID__ rather than
6709 __SIGRTMIN.
6710 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6711 are already deferred.
6712 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6713 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6714 stopped and already has a pending signal to report.
6715 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6716 a pending signal to report or is moving out of a jump pad.
6717 (linux_init_signals): Check for __ANDROID__ rather than
6718 __SIGRTMIN.
6719
6720 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6721
6722 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6723 debug_threads check. Avoid a linear search when not doing debug
6724 output.
6725
6726 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6727
6728 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6729 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6730 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6731 (process_event): Change local fd's type to gdb_fildes_t.
6732 (create_file_handler): Adjust prototype.
6733 (delete_file_handler): Adjust prototype.
6734 (handle_file_event): Adjust prototype. Use pfildes.
6735 (create_file_event): Adjsut prototype.
6736 * remote-utils.c (remote_desc, listen_desc): Change type to
6737 gdb_fildes_t.
6738 * server.h: New gdb_fildes_t typedef.
6739 [USE_WIN32API]: Include winsock2.h.
6740 (delete_file_handler, add_file_handler): Adjust prototypes.
6741 (pfildes): Declare.
6742 * utils.c (pfildes): New.
6743
6744 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6745
6746 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6747 * configure: Regenerate.
6748
6749 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6750
6751 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6752 (linux_done_accessing_memory): ... this.
6753 (linux_target_ops): Adjust.
6754 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6755 * nto-low.c (nto_target_ops): Adjust comment.
6756 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6757 * spu-low.c (spu_target_ops): Adjust comment.
6758 * target.h (target_ops): Rename unprepare_to_access_memory field
6759 to done_accessing_memory.
6760 (unprepare_to_access_memory): Rename to ...
6761 (done_accessing_memory): ... this.
6762
6763 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6764
6765 * linux-low.c (linux_prepare_to_access_memory): New.
6766 (linux_unprepare_to_access_memory): New.
6767 (linux_target_ops): Install them.
6768 * server.c (read_memory): Rename to ...
6769 (gdb_read_memory): ... this. Use
6770 prepare_to_access_memory/prepare_to_access_memory.
6771 (write_memory): Rename to ...
6772 (gdb_write_memory): ... this. Use
6773 prepare_to_access_memory/prepare_to_access_memory.
6774 (handle_search_memory_1): Adjust.
6775 (process_serial_event): Adjust.
6776 * target.h (struct target_ops): New fields
6777 prepare_to_access_memory and unprepare_to_access_memory.
6778 (prepare_to_access_memory, unprepare_to_access_memory): New.
6779 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6780 prepare_to_access_memory/prepare_to_access_memory.
6781 * nto-low.c (nto_target_ops): Adjust.
6782 * spu-low.c (spu_target_ops): Adjust.
6783 * win32-low.c (win32_target_ops): Adjust.
6784
6785 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6786
6787 * Makefile.in (WARN_CFLAGS): Get it from configure.
6788 (WERROR_CFLAGS): New.
6789 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6790 * configure.ac: Introduce --enable-werror, which adds -Werror to
6791 the compiler command line. Enabled by default. Disable with
6792 --disable-werror. Add -Wdeclaration-after-statement
6793 Wpointer-arith and -Wformat-nonliteral to warning flags.
6794 * configure: Regenerate.
6795
6796 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6797
6798 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6799
6800 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6801
6802 * gdbreplay.c (remote_error): New.
6803 (gdbchar): New.
6804 (expect): Use gdbchar. Check for error reading from GDB.
6805 Clarify sync error output.
6806 (play): Check for errors writing to GDB.
6807 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6808 * remote-utils.c (getpkt): Check for errors writing to the remote
6809 descriptor.
6810
6811 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6812
6813 * linux-low.c (linux_wait_1): Move non-debugging code out of
6814 `debug_threads' control.
6815
6816 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6817
6818 * linux-low.c (linux_wait_1): Don't set last_status here.
6819 * server.c (push_event, queue_stop_reply_callback): Assert we're
6820 not pushing a TARGET_WAITKIND_IGNORE event.
6821 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6822 (myresume, handle_target_event): Set the thread's last_resume_kind
6823 and last_status from the target returned status.
6824
6825 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6826
6827 PR threads/10729
6828
6829 * linux-x86-low.c (update_debug_registers_callback): New.
6830 (i386_dr_low_set_addr): Use it.
6831 (i386_dr_low_get_addr): New.
6832 (i386_dr_low_set_control): Use update_debug_registers_callback.
6833 (i386_dr_low_get_control): New.
6834 (i386_dr_low_get_status): Adjust.
6835 * linux-low.c (linux_stop_lwp): New.
6836 * linux-low.h (linux_stop_lwp): Declare.
6837
6838 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6839 argument instead of a i386_debug_reg_state.
6840 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6841 a i386_debug_reg_state.
6842 (i386_insert_aligned_watchpoint): Adjust.
6843 (i386_remove_aligned_watchpoint): Adjust.
6844 (i386_low_stopped_data_address): Read the debug registers from the
6845 inferior instead of from the mirrors.
6846 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6847 (i386_dr_low_get_addr): Declare.
6848 (i386_dr_low_get_control): Declare.
6849 (i386_dr_low_get_status): Change prototype.
6850
6851 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6852 (i386_dr_low_get_addr): New.
6853 (i386_dr_low_get_control): New.
6854 (i386_dr_low_get_status): Adjust prototype. Return
6855 dr_status_mirror.
6856 (i386_initial_stuff): Clear dr_status_mirror and
6857 dr_control_mirror.
6858 (i386_get_thread_context): Adjust.
6859 (i386_set_thread_context): Adjust.
6860 (i386_thread_added): Adjust.
6861
6862 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6863
6864 * linux-low.h (linux_thread_area): Delete declaration.
6865
6866 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6867
6868 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6869 after its termination.
6870
6871 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6872
6873 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6874 (gdb_wants_all_stopped): Delete.
6875 (linux_wait_1): Don't call them.
6876 * server.c (handle_v_cont): Tag all threads as want-stopped.
6877 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6878 stopped as "client-wants-stopped".
6879
6880 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6881
6882 * Makefile.in (signals_h): New.
6883 (server_h): Depend on it.
6884 (server.o): Don't depend on $(signals_def).
6885 (signals.o): Depend on $(signals_def).
6886
6887 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6888
6889 * Makefile.in (signals_def): New.
6890 (server_h): Append include/gdb/signals.h and signals_def.
6891 (server.o): Append signals_def.
6892
6893 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6894
6895 * server.c (handle_target_event): Use target_signal_to_host for
6896 resume_info.sig initialization.
6897 * target.h (struct thread_resume) <sig>: New comment.
6898
6899 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6900
6901 * server.c (handle_query): strcpy() the returned string from paddress()
6902 instead of sprintf().
6903 * utils.c (paddress): Return phex_nz().
6904
6905 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6906
6907 * server.c (handle_v_cont): Call mourn_inferior if process
6908 just exited.
6909 (myresume): Likewise.
6910
6911 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6912
6913 Static tracepoints, and integration with UST.
6914
6915 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6916 * mem-break.c (uninsert_all_breakpoints)
6917 (reinsert_all_breakpoints): New.
6918 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6919 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6920 (gdb_agent_ust_loaded, helper_thread_id)
6921 (gdb_agent_helper_thread_id): New macros.
6922 (struct ipa_sym_addresses): Add addr_ust_loaded,
6923 addr_helper_thread_id, addr_cmd_buf.
6924 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6925 (in_process_agent_loaded_ust): New.
6926 (write_e_ust_not_loaded): New.
6927 (maybe_write_ipa_ust_not_loaded): New.
6928 (struct collect_static_trace_data_action): New.
6929 (enum tracepoint_type) <static_tracepoint>: New.
6930 (struct tracepoint) <handle>: Mention static tracepoints.
6931 (struct static_tracepoint_ctx): New.
6932 (CMD_BUF_SIZE): New.
6933 (add_tracepoint_action): Handle static tracepoint actions.
6934 (unprobe_marker_at): New.
6935 (clear_installed_tracepoints): Handle static tracepoints.
6936 (cmd_qtdp): Handle static tracepoints.
6937 (probe_marker_at): New.
6938 (cmd_qtstart): Handle static tracepoints.
6939 (response_tracepoint): Handle static tracepoints.
6940 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6941 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6942 (get_context_regcache): Handle static tracepoints.
6943 (do_action_at_tracepoint): Handle static tracepoint actions.
6944 (traceframe_find_block_type): Handle static trace data blocks.
6945 (traceframe_read_sdata): New.
6946 (download_tracepoints): Download static tracepoint actions.
6947 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6948 (GDB_PROBE_NAME): New.
6949 (ust_ops): New.
6950 (GET_UST_SYM): New.
6951 (USTF): New.
6952 (dlsym_ust): New.
6953 (ust_marker_to_static_tracepoint): New.
6954 (gdb_probe): New.
6955 (collect_ust_data_at_tracepoint): New.
6956 (gdb_ust_probe): New.
6957 (UNIX_PATH_MAX, SOCK_DIR): New.
6958 (gdb_ust_connect_sync_socket): New.
6959 (resume_thread, stop_thread): New.
6960 (run_inferior_command): New.
6961 (init_named_socket): New.
6962 (gdb_ust_socket_init): New.
6963 (cstr_to_hexstr): New.
6964 (next_st): New.
6965 (first_marker, next_marker): New.
6966 (response_ust_marker): New.
6967 (cmd_qtfstm, cmd_qtsstm): New.
6968 (unprobe_marker_at, probe_marker_at): New.
6969 (cmd_qtstmat, gdb_ust_thread): New.
6970 (gdb_ust_init): New.
6971 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6972 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6973 (ST_REGENTRY): New.
6974 (x86_64_st_collect_regmap): New.
6975 (X86_64_NUM_ST_COLLECT_GREGS): New.
6976 (AMD64_RIP_REGNUM): New.
6977 (supply_static_tracepoint_registers): New.
6978 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6979 (ST_REGENTRY): New.
6980 (i386_st_collect_regmap): New.
6981 (i386_NUM_ST_COLLECT_GREGS): New.
6982 (supply_static_tracepoint_registers): New.
6983 * server.c (handle_query): Handle qXfer:statictrace:read.
6984 <qSupported>: Report support for StaticTracepoints, and
6985 qXfer:statictrace:read features.
6986 * server.h (traceframe_read_sdata)
6987 (supply_static_tracepoint_registers): Declare.
6988 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6989 (unpack_varlen_hex): Include in IPA build.
6990 * Makefile.in (ustlibs, ustinc): New.
6991 (IPA_OBJS): Add remote-utils-ipa.o.
6992 ($(IPA_LIB)): Link -ldl and -lpthread.
6993 (UST_CFLAGS): New.
6994 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6995 * config.in, configure: Regenerate.
6996
6997 2010-06-20 Ian Lance Taylor <iant@google.com>
6998 Pedro Alves <pedro@codesourcery.com>
6999
7000 * linux-x86-low.c (always_true): Delete.
7001 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7002 trying to fool the compiler with always_true.
7003
7004 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7005
7006 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7007 conditions in gdbserver.
7008
7009 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7010
7011 * spu-low.c (spu_read_memory): Wrap around local store limit.
7012 (spu_write_memory): Likewise.
7013
7014 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7015
7016 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7017 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7018 LONGEST uses.
7019 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7020 uses.
7021 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7022 uses with LONGEST uses.
7023
7024 2010-06-14 Stan Shebs <stan@codesourcery.com>
7025 Pedro Alves <pedro@codesourcery.com>
7026
7027 Bytecode compiler.
7028
7029 * linux-x86-low.c: Include limits.h.
7030 (add_insns): New.
7031 (always_true): New.
7032 (EMIT_ASM): New.
7033 (EMIT_ASM32): New.
7034 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7035 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7036 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7037 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7038 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7039 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7040 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7041 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7042 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7043 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7044 (amd64_emit_void_call_2): New.
7045 (amd64_emit_ops): New.
7046 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7047 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7048 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7049 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7050 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7051 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7052 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7053 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7054 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7055 (i386_emit_stack_adjust, i386_emit_int_call_1)
7056 (i386_emit_void_call_2): New.
7057 (i386_emit_ops): New.
7058 (x86_emit_ops): New.
7059 (the_low_target): Install x86_emit_ops.
7060 * server.h (struct emit_ops): New.
7061 (get_raw_reg_func_addr): Declare.
7062 (current_insn_ptr, emit_error): Declare.
7063 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7064 (set_trace_state_variable_value): New defines.
7065 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7066 addr_get_trace_state_variable_value and
7067 addr_set_trace_state_variable_value.
7068 (symbol_list): New fields for get_raw_reg,
7069 get_trace_state_variable_value and set_trace_state_variable_value.
7070 (condfn): New typedef.
7071 (struct tracepoint): New field `compiled_cond'.
7072 (do_action_at_tracepoint): Clear compiled_cond.
7073 (get_trace_state_variable_value, set_trace_state_variable_value):
7074 Export in the IPA.
7075 (condition_true_at_tracepoint): If there's a compiled condition,
7076 run that.
7077 (current_insn_ptr, emit_error): New globals.
7078 (struct bytecode_address): New.
7079 (get_raw_reg_func_addr): New.
7080 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7081 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7082 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7083 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7084 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7085 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7086 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7087 (compile_tracepoint_condition, compile_bytecodes): New.
7088 * target.h (emit_ops): Forward declare.
7089 (struct target_ops): New field emit_ops.
7090 (target_emit_ops): New.
7091 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7092 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7093 * linux-low.c (linux_emit_ops): New.
7094 (linux_target_ops): Install it.
7095 * linux-low.h (struct linux_target_ops): New field emit_ops.
7096
7097 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7098
7099 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7100 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7101
7102 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7103 Stan Shebs <stan@codesourcery.com>
7104
7105 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7106 (all): Depend on $(extra_libraries).
7107 (install-only): Install the IPA.
7108 (IPA_OBJS, IPA_LIB): New.
7109 (clean): Remove the IPA lib.
7110 (IPAGENT_CFLAGS): New.
7111 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7112 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7113 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7114 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7115 * configure.ac: Check for atomic builtins support in the compiler.
7116 (IPA_DEPFILES, extra_libraries): Define.
7117 * configure.srv (ipa_obj): Add description.
7118 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7119 (i[34567]86-*-linux*): Set ipa_obj.
7120 (x86_64-*-linux*): Set ipa_obj.
7121 * linux-low.c (stabilizing_threads): New.
7122 (supports_fast_tracepoints): New.
7123 (linux_detach): Stabilize threads before detaching.
7124 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7125 the lwp is either not stabilizing, or is moving out of a jump pad.
7126 (linux_fast_tracepoint_collecting): New.
7127 (maybe_move_out_of_jump_pad): New.
7128 (enqueue_one_deferred_signal): New.
7129 (dequeue_one_deferred_signal): New.
7130 (linux_wait_for_event_1): If moving out of a jump pad, defer
7131 pending signals to later.
7132 (linux_stabilize_threads): New.
7133 (linux_wait_1): Check if threads need moving out of jump pads, and
7134 do it if so.
7135 (stuck_in_jump_pad_callback): New.
7136 (move_out_of_jump_pad_callback): New.
7137 (lwp_running): New.
7138 (linux_resume_one_lwp): Handle moving out of jump pads.
7139 (linux_set_resume_request): Dequeue deferred signals.
7140 (need_step_over_p): Also step over fast tracepoint jumps.
7141 (start_step_over): Also uninsert fast tracepoint jumps.
7142 (finish_step_over): Also reinsert fast tracepoint jumps.
7143 (linux_install_fast_tracepoint_jump): New.
7144 (linux_target_ops): Install linux_stabilize_threads and
7145 linux_install_fast_tracepoint_jump_pad.
7146 * linux-low.h (linux_target_ops) <get_thread_area,
7147 install_fast_tracepoint_jump_pad>: New fields.
7148 (struct lwp_info) <collecting_fast_tracepoint,
7149 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7150 (linux_get_thread_area): Declare.
7151 * linux-x86-low.c (jump_insn): New.
7152 (x86_get_thread_area): New.
7153 (append_insns): New.
7154 (push_opcode): New.
7155 (amd64_install_fast_tracepoint_jump_pad): New.
7156 (i386_install_fast_tracepoint_jump_pad): New.
7157 (x86_install_fast_tracepoint_jump_pad): New.
7158 (the_low_target): Install x86_get_thread_area and
7159 x86_install_fast_tracepoint_jump_pad.
7160 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7161 (struct fast_tracepoint_jump): New.
7162 (fast_tracepoint_jump_insn): New.
7163 (fast_tracepoint_jump_shadow): New.
7164 (find_fast_tracepoint_jump_at): New.
7165 (fast_tracepoint_jump_here): New.
7166 (delete_fast_tracepoint_jump): New.
7167 (set_fast_tracepoint_jump): New.
7168 (uninsert_fast_tracepoint_jumps_at): New.
7169 (reinsert_fast_tracepoint_jumps_at): New.
7170 (set_breakpoint_at): Use write_inferior_memory.
7171 (uninsert_raw_breakpoint): Use write_inferior_memory.
7172 (check_mem_read): Mask out fast tracepoint jumps.
7173 (check_mem_write): Mask out fast tracepoint jumps.
7174 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7175 (set_fast_tracepoint_jump): Declare.
7176 (delete_fast_tracepoint_jump)
7177 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7178 (reinsert_fast_tracepoint_jumps_at): Declare.
7179 * regcache.c: Don't compile many functions when building the
7180 in-process agent library.
7181 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7182 the register buffer in the heap.
7183 (free_register_cache): If the register buffer isn't owned by the
7184 regcache, don't free it.
7185 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7186 pre-existing register caches.
7187 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7188 type.
7189 (convert_ascii_to_int): : Constify `from' parameter type.
7190 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7191 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7192 the needed buffer in-place.
7193 (relocate_instruction): New.
7194 * server.c (handle_query) <qSymbols>: If the target supports
7195 tracepoints, give it a chance of looking up symbols. Report
7196 support for fast tracepoints.
7197 (handle_status): Stabilize threads.
7198 (process_serial_event): Adjust.
7199 * server.h (struct fast_tracepoint_jump): Forward declare.
7200 (struct process_info) <fast_tracepoint_jumps>: New field.
7201 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7202 (decode_X_packet, decode_M_packet): Adjust.
7203 (relocate_instruction): Declare.
7204 (in_process_agent_loaded): Declare.
7205 (tracepoint_look_up_symbols): Declare.
7206 (struct fast_tpoint_collect_status): Declare.
7207 (fast_tracepoint_collecting): Declare.
7208 (force_unlock_trace_buffer): Declare.
7209 (handle_tracepoint_bkpts): Declare.
7210 (initialize_low_tracepoint)
7211 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7212 * target.h (struct target_ops) <stabilize_threads,
7213 install_fast_tracepoint_jump_pad>: New fields.
7214 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7215 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7216 [HAVE_STDINT_H]: Include stdint.h.
7217 (trace_debug_1): Rename to ...
7218 (trace_vdebug): ... this.
7219 (trace_debug): Rename to ...
7220 (trace_debug_1): ... this. Add `level' parameter.
7221 (trace_debug): New.
7222 (ATTR_USED, ATTR_NOINLINE): New.
7223 (IP_AGENT_EXPORT): New.
7224 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7225 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7226 (about_to_request_buffer_space, trace_buffer_is_full)
7227 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7228 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7229 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7230 (traceframe_write_count, traceframes_created)
7231 (trace_state_variables)
7232 New renaming defines.
7233 (struct ipa_sym_addresses): New.
7234 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7235 (symbol_list): New.
7236 (ipa_sym_addrs): New.
7237 (all_tracepoint_symbols_looked_up): New.
7238 (in_process_agent_loaded): New.
7239 (write_e_ipa_not_loaded): New.
7240 (maybe_write_ipa_not_loaded): New.
7241 (tracepoint_look_up_symbols): New.
7242 (debug_threads) [IN_PROCESS_AGENT]: New.
7243 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7244 (UNKNOWN_SIDE_EFFECTS): New.
7245 (stop_tracing): New.
7246 (flush_trace_buffer): New.
7247 (stop_tracing_bkpt): New.
7248 (flush_trace_buffer_bkpt): New.
7249 (read_inferior_integer): New.
7250 (read_inferior_uinteger): New.
7251 (read_inferior_data_pointer): New.
7252 (write_inferior_data_pointer): New.
7253 (write_inferior_integer): New.
7254 (write_inferior_uinteger): New.
7255 (struct collect_static_trace_data_action): Delete.
7256 (enum tracepoint_type): New.
7257 (struct tracepoint) <type>: New field `type'.
7258 <actions_str, step_actions, step_actions_str>: Only include in
7259 GDBserver.
7260 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7261 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7262 (tracepoints): Use IP_AGENT_EXPORT.
7263 (last_tracepoint): Don't include in the IPA.
7264 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7265 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7266 (alloced_trace_state_variables): New.
7267 (trace_state_variables): Use IP_AGENT_EXPORT.
7268 (traceframe_t): Delete unused variable.
7269 (circular_trace_buffer): Don't include in the IPA.
7270 (trace_buffer_start): Delete.
7271 (struct trace_buffer_control): New.
7272 (trace_buffer_free): Delete.
7273 (struct ipa_trace_buffer_control): New.
7274 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7275 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7276 New.
7277 (trace_buffer_ctrl): New.
7278 (TRACE_BUFFER_CTRL_CURR): New.
7279 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7280 Reimplement as macros.
7281 (trace_buffer_wrap): Delete.
7282 (traceframe_write_count, traceframe_read_count)
7283 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7284 (struct tracepoint_hit_ctx) <type>: New field.
7285 (struct fast_tracepoint_ctx): New.
7286 (memory_barrier): New.
7287 (cmpxchg): New.
7288 (record_tracepoint_error): Update atomically in the IPA.
7289 (clear_inferior_trace_buffer): New.
7290 (about_to_request_buffer_space): New.
7291 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7292 updating the same buffer.
7293 (add_tracepoint): Default the tracepoint's type to trap
7294 tracepoint, and orig_size to -1.
7295 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7296 internal variables.
7297 (create_trace_state_variable): New parameter `gdb'. Handle it.
7298 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7299 (cmd_qtdp): Handle fast tracepoints.
7300 (cmd_qtdv): Adjust.
7301 (max_jump_pad_size): New.
7302 (gdb_jump_pad_head): New.
7303 (get_jump_space_head): New.
7304 (claim_jump_space): New.
7305 (sort_tracepoints): New.
7306 (MAX_JUMP_SIZE): New.
7307 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7308 IPA.
7309 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7310 support. Upload fast traceframes, and delete internal IPA
7311 breakpoints.
7312 (stop_tracing_handler): New.
7313 (flush_trace_buffer_handler): New.
7314 (cmd_qtstop): Upload fast tracepoints.
7315 (response_tracepoint): Handle fast tracepoints.
7316 (tracepoint_finished_step): Upload fast traceframes. Set the
7317 tracepoint hit context's tracepoint type.
7318 (handle_tracepoint_bkpts): New.
7319 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7320 type. Add comment about fast tracepoints.
7321 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7322 non-existing action_str field.
7323 (get_context_regcache): Handle fast tracepoints.
7324 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7325 to the regcache.
7326 (fast_tracepoint_from_jump_pad_address): New.
7327 (fast_tracepoint_from_ipa_tpoint_address): New.
7328 (collecting_t): New.
7329 (force_unlock_trace_buffer): New.
7330 (fast_tracepoint_collecting): New.
7331 (collecting): New.
7332 (gdb_collect): New.
7333 (write_inferior_data_ptr): New.
7334 (target_tp_heap): New.
7335 (target_malloc): New.
7336 (download_agent_expr): New.
7337 (UALIGN): New.
7338 (download_tracepoints): New.
7339 (download_trace_state_variables): New.
7340 (upload_fast_traceframes): New.
7341 (IPA_FIRST_TRACEFRAME): New.
7342 (IPA_NEXT_TRACEFRAME_1): New.
7343 (IPA_NEXT_TRACEFRAME): New.
7344 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7345 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7346 (gdb_jump_pad_buffer_end): New.
7347 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7348 (initialize_tracepoint): Adjust.
7349 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7350 buffer. Initialize the low module.
7351 * utils.c (PREFIX, TOOLNAME): New.
7352 (malloc_failure): Use PREFIX.
7353 (error): In the IPA, an error causes an exit.
7354 (fatal, warning): Use PREFIX.
7355 (internal_error): Use TOOLNAME.
7356 (NUMCELLS): Increase to 10.
7357 * configure, config.in: Regenerate.
7358
7359 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7360
7361 * server.c (handle_query) <qSupported>: Do two passes over the
7362 qSupported string to avoid nesting strtok.
7363
7364 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7365
7366 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7367 (CDEPS): New.
7368 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7369 -Wl,--dynamic-list.
7370 * configure: Regenerate.
7371 * proc-service.list: New.
7372
7373 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7374
7375 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7376 New comment.
7377
7378 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7379
7380 * gdbreplay.c (remote_open): Check error return from socket() call by
7381 its equality to -1 not by it being negative.
7382 * remote-utils.c (remote_open): Likewise.
7383
7384 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7385
7386 * config.h: Regenerate.
7387
7388 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7389
7390 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7391 doesn't provide PTRACE_GET_THREAD_AREA.
7392
7393 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7394
7395 * linux-m68k-low.c: Include <asm/ptrace.h>
7396 (ps_get_thread_area): Implement.
7397
7398 2010-05-03 Doug Evans <dje@google.com>
7399
7400 * event-loop.c (struct callback_event): New struct.
7401 (callback_list): New global.
7402 (append_callback_event, delete_callback_event): New functions.
7403 (process_callback): New function.
7404 (start_event_loop): Call it.
7405 * remote-utils.c (NOT_SCHEDULED): Define.
7406 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7407 moved out of readchar.
7408 (readchar): Rewrite. Call reschedule before returning.
7409 (reset_readchar): New function.
7410 (remote_close): Call it.
7411 (process_remaining, reschedule): New functions.
7412 * server.h (callback_handler_func): New typedef.
7413 (append_callback_event, delete_callback_event): Declare.
7414
7415 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7416
7417 * proc-service.c (ps_pglobal_lookup): Use
7418 thread_db_look_up_one_symbol.
7419 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7420 parameter. Use it instead of all_symbols_looked_up.
7421 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7422 field.
7423 (all_symbols_looked_up): Don't declare.
7424 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7425 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7426 field.
7427 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7428 Set all_symbols_looked_up here.
7429 (thread_db_look_up_one_symbol): New.
7430 (thread_db_get_tls_address): Adjust.
7431 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7432 thread_db object on the heap, and tentatively set it in the
7433 process structure.
7434 (thread_db_init): Don't set all_symbols_looked_up here.
7435 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7436
7437 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7438
7439 * linux-low.c (linux_kill, linux_detach): Adjust.
7440 (status_pending_p_callback): Remove redundant statement. Check
7441 for !TARGET_WAITIKIND_IGNORE, instead of
7442 TARGET_WAITKIND_STOPPED.
7443 (handle_tracepoints): Make sure LWP is locked. Adjust.
7444 (linux_wait_for_event_1): Adjust.
7445 (linux_cancel_breakpoints): New.
7446 (unsuspend_one_lwp): New.
7447 (unsuspend_all_lwps): New.
7448 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7449 (send_sigstop_callback): Change return type to int, add new
7450 `except' parameter and handle it.
7451 (suspend_and_send_sigstop_callback): New.
7452 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7453 pass them down. If SUSPEND, also increment the lwp's suspend
7454 count.
7455 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7456 (need_step_over_p): Don't consider suspended LWPs.
7457 (start_step_over): Adjust.
7458 (proceed_one_lwp): Change return type to int, add new `except'
7459 parameter and handle it.
7460 (unsuspend_and_proceed_one_lwp): New.
7461 (proceed_all_lwps): Use find_inferior instead of
7462 for_each_inferior.
7463 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7464 also decrement the suspend count of LWPs. Pass `except' down,
7465 instead of hacking its suspend count.
7466 (linux_pause_all): Add `freeze' parameter. Adjust.
7467 (linux_unpause_all): New.
7468 (linux_target_ops): Install linux_unpause_all.
7469 * server.c (handle_status): Adjust.
7470 * target.h (struct target_ops): New fields `unpause_all' and
7471 `cancel_breakpoints'. Add new parameter to `pause_all'.
7472 (pause_all): Add new `freeze' parameter.
7473 (unpause_all): New.
7474 (cancel_breakpoints): New.
7475 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7476 cancel breakpoints.
7477 (cmd_qtstart): Pause threads.
7478 (stop_tracing): Pause threads, and cancel breakpoints.
7479 * win32-low.c (win32_target_ops): Adjust.
7480
7481 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7482
7483 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7484 the inferior right away from here...
7485 (linux_wait_1): ... to here, and adjust to check the thread's
7486 last_resume_kind instead of the lwp's step or stop_expected flags.
7487
7488 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7489
7490 * README: Use consistent `GDB' and `GDBserver' spellings.
7491
7492 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7493
7494 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7495 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7496 (linux_detach_one_lwp): Assume the lwp is stopped.
7497 (any_thread_of): Delete.
7498 (linux_detach): Stop all lwps here. Don't blindly delete all
7499 breakpoints.
7500 (delete_lwp_callback): New.
7501 (linux_mourn): Delete all lwps of the process that is gone.
7502 (linux_wait_1): Don't delete the last lwp of the process here.
7503 * mem-break.h (mark_breakpoints_out): Declare.
7504 * mem-break.c (mark_breakpoints_out): New.
7505 (free_all_breakpoints): Use it.
7506 * server.c (handle_target_event): If the process is gone, mark
7507 breakpoints out.
7508 * thread-db.c (struct thread_db) <create_bp>: New field.
7509 (thread_db_enable_reporting): Fix prototype. Store a thread event
7510 breakpoint reference in the thread_db struct.
7511 (thread_db_load_search): Clear the thread_db object.
7512 (try_thread_db_load_1): Ditto.
7513 (switch_to_process): New.
7514 (disable_thread_event_reporting): Use it.
7515 (remove_thread_event_breakpoints): New.
7516 (thread_db_detach, thread_db_mourn): Use it.
7517
7518 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7519
7520 * linux-low.c (linux_enable_event_reporting): New.
7521 (linux_wait_for_event_1, handle_extended_wait): Use it.
7522
7523 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7524
7525 * linux-low.c (linux_kill_one_lwp, linux_kill)
7526 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7527 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7528 SIGSTOP even if the LWP is stopped.
7529 (send_sigstop_callback): New.
7530 (stop_all_lwps): Use send_sigstop_callback instead.
7531 (linux_resume_one_thread): Adjust.
7532 (proceed_one_lwp): Still proceed an LWP that the client has
7533 requested to stop, if we haven't reported it as stopped yet. Make
7534 sure that LWPs the client want stopped, have a pending SIGSTOP.
7535
7536 2010-04-26 Doug Evans <dje@google.com>
7537
7538 * server.c (handle_general_set): Make static.
7539
7540 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7541 Print received char after testing for error/eof instead of before.
7542 (input_interrupt): Tweak comment.
7543
7544 2010-04-23 Doug Evans <dje@google.com>
7545
7546 * server.c (start_inferior): Print inferior argv if --debug.
7547
7548 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7549
7550 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7551 * nto-x86-low.c: Include server.h
7552
7553 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7554
7555 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7556 be consistent with other sources of this directory.
7557 (init_registers_amd64): Correct name of source file of this function
7558 in the comment.
7559
7560 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7561
7562 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7563 64-bit executables.
7564
7565 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7566
7567 * win32-i386-low.c: Add 64-bit support.
7568 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7569 (init_registers_amd64): Declare.
7570 (mappings): Add 64-bit version of array.
7571 (init_windows_x86): New function.
7572 (the_low_target): Change init_arch field to init_windows_x86.
7573
7574 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7575
7576 * win32-low.c: Adapt to support also 64-bit architecture.
7577 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7578 (get_image_name): Use SIZE_T type for local variable `done'.
7579 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7580 (toolhelp_get_dll_name): Idem.
7581 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7582 Use uintptr_t typecast to avoid warning.
7583 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7584 (handle_exception): Use phex_nz to avoid warning.
7585 (win32_wait): Remove unused local variable `process'.
7586
7587 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7588
7589 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7590 `amd64-avx.o'.
7591
7592 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7593
7594 * configure.ac: Use `ws2_32' library for srv_mingw.
7595 * configure: Regenerate.
7596 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7597 * remote-utils.c: Likewise.
7598
7599 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7600
7601 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7602 if __x86_64__ is defined.
7603
7604 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7605
7606 * configure: Regenerate.
7607
7608 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7609
7610 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7611 * target.h (target_ops): New get_tib_address field.
7612 * win32-low.h (win32_thread_info): Add thread_local_base field.
7613 * win32-low.c (child_add_thread): Add tlb argument.
7614 Set thread_local_base field to TLB.
7615 (get_child_debug_event): Adapt to child_add_thread change.
7616 (win32_get_tib_address): New function.
7617 (win32_target_ops): Set get_tib_address field to
7618 win32_get_tib_address.
7619 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7620
7621 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7622
7623 * linux-low.c (linux_mourn): Also remove the process.
7624 * server.c (handle_target_event): Don't remove the process here.
7625 * nto-low.c (nto_mourn): New.
7626 (nto_target_ops): Install it.
7627 * spu-low.c (spu_mourn): New.
7628 (spu_target_ops): Install it.
7629 * win32-low.c (win32_mourn): New.
7630 (win32_target_ops): Install it.
7631
7632 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7633
7634 * server.h (buffer_xml_printf): Remove redundant `;'.
7635
7636 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7637
7638 * regcache.c (set_register_cache): Invalidate regcaches before
7639 changing the register cache layout.
7640 (regcache_invalidate_one): Allow a NULL regcache.
7641 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7642 regcaches before changing the register cache layout or the target
7643 regsets.
7644
7645 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7646
7647 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7648 variable warning on Linux/x86-64.
7649
7650 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7651
7652 GDBserver disconnected tracing support.
7653
7654 * linux-low.c (linux_remove_process): Delete.
7655 (add_lwp): Don't set last_resume_kind here.
7656 (linux_kill): Use `mourn'.
7657 (linux_detach): Use `thread_db_detach', and `mourn'.
7658 (linux_mourn): New.
7659 (linux_attach_lwp_1): Adjust comment.
7660 (linux_attach): last_resume_kind moved the thread_info; adjust.
7661 (status_pending_p_callback): Adjust.
7662 (linux_wait_for_event_1): Adjust.
7663 (count_events_callback, select_singlestep_lwp_callback)
7664 (select_event_lwp_callback, cancel_breakpoints_callback)
7665 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7666 (proceed_one_lwp): Adjust.
7667 (linux_async): Add debug output.
7668 (linux_thread_stopped): New.
7669 (linux_pause_all): New.
7670 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7671 linux_pause_all.
7672 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7673 (thread_db_free): Delete declaration.
7674 (thread_db_detach, thread_db_mourn): Declare.
7675 * thread-db.c (thread_db_init): Use thread_db_mourn.
7676 (thread_db_free): Delete, split in two.
7677 (disable_thread_event_reporting): New.
7678 (thread_db_detach): New.
7679 (thread_db_mourn): New.
7680
7681 * server.h (struct thread_info) <last_resume_kind>: New field.
7682 <attached>: Add comment.
7683 <gdb_detached>: New field.
7684 (handler_func): Change return type to int.
7685 (handle_serial_event, handle_target_event): Ditto.
7686 (gdb_connected): Declare.
7687 (tracing): Delete.
7688 (disconnected_tracing): Declare.
7689 (stop_tracing): Declare.
7690
7691 * server.c (handle_query) <qSupported>: Report support for
7692 disconnected tracing.
7693 (queue_stop_reply_callback): Account for running threads.
7694 (gdb_wants_thread_stopped): New.
7695 (gdb_wants_all_threads_stopped): New.
7696 (gdb_reattached_process): New.
7697 (handle_status): Clear the `gdb_detached' flag of all processes.
7698 In all-stop, stop all threads.
7699 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7700 (process_serial_event): If the remote connection breaks, or if an
7701 exit was forced with "monitor exit", force an event loop exit.
7702 Handle disconnected tracing on detach.
7703 (handle_serial_event): Adjust.
7704 (handle_target_event): If GDB isn't connected, forward events back
7705 to the inferior, unless the last process exited, in which case,
7706 exit gdbserver. Adjust interface.
7707
7708 * remote-utils.c (remote_open): Don't block in accept. Instead
7709 register an event loop source on the listen socket file
7710 descriptor. Refactor bits into ...
7711 (listen_desc): ... this new global.
7712 (gdb_connected): ... this new function.
7713 (enable_async_notification): ... this new function.
7714 (handle_accept_event): ... this new function.
7715 (remote_close): Clear remote_desc.
7716
7717 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7718
7719 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7720 New fields.
7721 (mourn_inferior): Define.
7722 (target_process_qsupported): Avoid the dangling else problem.
7723 (thread_stopped): Define.
7724 (pause_all): Define.
7725 (target_waitstatus_to_string): Declare.
7726 * target.c (target_waitstatus_to_string): New.
7727
7728 * tracepoint.c (tracing): Make extern.
7729 (disconnected_tracing): New.
7730 (stop_tracing): Make extern. Handle tracing stops due to GDB
7731 disconnecting.
7732 (cmd_qtdisconnected): New.
7733 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7734 (handle_tracepoint_general_set): Handle QTDisconnected.
7735
7736 * event-loop.c (event_handler_func): Change return type to int.
7737 (process_event): Bail out if the event handler wants the event
7738 loop to stop.
7739 (handle_file_event): Ditto.
7740 (start_event_loop): Bail out if the event handler wants the event
7741 loop to stop.
7742
7743 * nto-low.c (nto_target_ops): Adjust.
7744 * spu-low.c (spu_wait): Don't remove the process here.
7745 (spu_target_ops): Adjust.
7746 * win32-low.c (win32_wait): Don't remove the process here.
7747 (win32_target_ops): Adjust.
7748
7749 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7750
7751 * regcache.c (realloc_register_cache): Invalidate inferior's
7752 regcache before recreating it.
7753
7754 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7755
7756 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7757
7758 2010-04-09 Stan Shebs <stan@codesourcery.com>
7759 Pedro Alves <pedro@codesourcery.com>
7760
7761 * server.h (LONGEST): New.
7762 (struct thread_info) <while_stepping>: New field.
7763 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7764 Declare.
7765 (initialize_tracepoint, handle_tracepoint_general_set)
7766 (handle_tracepoint_query, tracepoint_finished_step)
7767 (tracepoint_was_hit, release_while_stepping_state_list):
7768 (current_traceframe): Declare.
7769 * server.c (handle_general_set): Handle tracepoint packets.
7770 (read_memory): New.
7771 (write_memory): New.
7772 (handle_search_memory_1): Use read_memory.
7773 (handle_query): Report support for conditional tracepoints, trace
7774 state variables, and tracepoint sources. Handle tracepoint
7775 queries.
7776 (main): Initialize the tracepoints module.
7777 (process_serial_event): Handle traceframe reads/writes.
7778
7779 * linux-low.c (handle_tracepoints): New.
7780 (linux_wait_1): Call it.
7781 (linux_resume_one_lwp): Handle while-stepping.
7782 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7783 (linux_target_ops): Install them.
7784 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7785 New field.
7786 * linux-x86-low.c (x86_supports_tracepoints): New.
7787 (the_low_target). Install it.
7788
7789 * mem-break.h (delete_breakpoint): Declare.
7790 * mem-break.c (delete_breakpoint): Make external.
7791
7792 * target.h (struct target_ops): Add `supports_tracepoints',
7793 `read_pc', and `write_pc' fields.
7794 (target_supports_tracepoints): Define.
7795 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7796 (phex_nz): New.
7797
7798 * regcache.h (struct regcache) <registers_owned>: New field.
7799 (init_register_cache, regcache_cpy): Declare.
7800 (regcache_read_pc, regcache_write_pc): Declare.
7801 (register_cache_size): Declare.
7802 (supply_regblock): Declare.
7803 * regcache.c (init_register_cache): New.
7804 (new_register_cache): Use it.
7805 (regcache_cpy): New.
7806 (register_cache_size): New.
7807 (supply_regblock): New.
7808 (regcache_read_pc, regcache_write_pc): New.
7809
7810 * tracepoint.c: New.
7811
7812 * Makefile.in (OBS): Add tracepoint.o.
7813 (tracepoint.o): New rule.
7814
7815 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7816
7817 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7818 (i386-mmx.o): New.
7819 (i386-mmx.c): Likewise.
7820 (i386-mmx-linux.o): Likewise.
7821 (i386-mmx-linux.c): Likewise.
7822
7823 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7824 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7825 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7826 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7827
7828 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7829 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7830 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7831
7832 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7833
7834 * Makefile.in (clean): Updated.
7835 (i386-avx.o): New.
7836 (i386-avx.c): Likewise.
7837 (i386-avx-linux.o): Likewise.
7838 (i386-avx-linux.c): Likewise.
7839 (amd64-avx.o): Likewise.
7840 (amd64-avx.c): Likewise.
7841 (amd64-avx-linux.o): Likewise.
7842 (amd64-avx-linux.c): Likewise.
7843
7844 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7845 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7846 (srv_amd64_regobj): Add amd64-avx.o.
7847 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7848 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7849 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7850 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7851 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7852 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7853 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7854
7855 * i387-fp.c: Include "i386-xstate.h".
7856 (i387_xsave): New.
7857 (i387_cache_to_xsave): Likewise.
7858 (i387_xsave_to_cache): Likewise.
7859 (x86_xcr0): Likewise.
7860
7861 * i387-fp.h (i387_cache_to_xsave): Likewise.
7862 (i387_xsave_to_cache): Likewise.
7863 (x86_xcr0): Likewise.
7864
7865 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7866 * linux-crisv32-low.c (target_regsets): Likewise.
7867 * linux-m68k-low.c (target_regsets): Likewise.
7868 * linux-mips-low.c (target_regsets): Likewise.
7869 * linux-ppc-low.c (target_regsets): Likewise.
7870 * linux-s390-low.c (target_regsets): Likewise.
7871 * linux-sh-low.c (target_regsets): Likewise.
7872 * linux-sparc-low.c (target_regsets): Likewise.
7873 * linux-xtensa-low.c (target_regsets): Likewise.
7874
7875 * linux-low.c: Include <sys/uio.h>.
7876 (regsets_fetch_inferior_registers): Support nt_type.
7877 (regsets_store_inferior_registers): Likewise.
7878 (linux_process_qsupported): New.
7879 (linux_target_ops): Add linux_process_qsupported.
7880
7881 * linux-low.h (regset_info): Add nt_type.
7882 (linux_target_ops): Add process_qsupported.
7883
7884 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7885 and <sys/uio.h>.
7886 (init_registers_i386_avx_linux): New.
7887 (init_registers_amd64_avx_linux): Likewise.
7888 (xmltarget_i386_linux_no_xml): Likewise.
7889 (xmltarget_amd64_linux_no_xml): Likewise.
7890 (PTRACE_GETREGSET): Likewise.
7891 (PTRACE_SETREGSET): Likewise.
7892 (x86_fill_xstateregset): Likewise.
7893 (x86_store_xstateregset): Likewise.
7894 (use_xml): Likewise.
7895 (x86_linux_update_xmltarget): Likewise.
7896 (x86_linux_process_qsupported): Likewise.
7897 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7898 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7899 init_registers_i386_linux here. Call
7900 x86_linux_update_xmltarget.
7901 (the_low_target): Add x86_linux_process_qsupported.
7902
7903 * server.c (handle_query): Call target_process_qsupported.
7904
7905 * target.h (target_ops): Add process_qsupported.
7906 (target_process_qsupported): New.
7907
7908 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7909
7910 * inferiors.c (add_thread): Set last_status kind to
7911 TARGET_WAITKIND_IGNORE.
7912 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7913 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7914 (linux_wait_1): Move `thread' local definition to block that uses
7915 it. Don't NULL initialize `event_child'.
7916 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7917 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7918 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7919
7920 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7921
7922 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7923 an extended waitstatus, or by a watchpoint.
7924 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7925 thread was stepping or has been stopped by a watchpoint.
7926
7927 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7928
7929 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7930 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7931 of another, then delete the previous, and validate all
7932 breakpoints.
7933 (validate_inserted_breakpoint): New.
7934 (delete_disabled_breakpoints): New.
7935 (validate_breakpoints): New.
7936 (check_mem_read): Validate breakpoints before trusting their
7937 shadow. Delete disabled breakpoints.
7938 (check_mem_write): Validate breakpoints before trusting they
7939 should be inserted. Delete disabled breakpoints.
7940 * mem-break.h (validate_breakpoints):
7941 * server.c (handle_query): Validate breakpoints when we see a
7942 qSymbol query.
7943
7944 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7945
7946 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7947 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7948 if we could tell there's a GDB breakpoint at stop_pc.
7949 (need_step_over_p): Don't do a step over if we find a GDB
7950 breakpoint at the resume PC.
7951
7952 * mem-break.c (struct raw_breakpoint): New.
7953 (enum bkpt_type): New type `gdb_breakpoint'.
7954 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7955 fields. New field `raw'.
7956 (find_raw_breakpoint_at): New.
7957 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7958 breakpoint instead.
7959 (set_breakpoint_at): Adjust.
7960 (delete_raw_breakpoint): New.
7961 (release_breakpoint): New.
7962 (delete_breakpoint): Rename to...
7963 (delete_breakpoint_1): ... this. Add proc parameter. Use
7964 release_breakpoint. Return ENOENT.
7965 (delete_breakpoint): Reimplement.
7966 (find_breakpoint_at): Delete.
7967 (find_gdb_breakpoint_at): New.
7968 (delete_breakpoint_at): Delete.
7969 (set_gdb_breakpoint_at): New.
7970 (delete_gdb_breakpoint_at): New.
7971 (gdb_breakpoint_here): New.
7972 (set_reinsert_breakpoint): Use release_breakpoint.
7973 (uninsert_breakpoint): Rename to ...
7974 (uninsert_raw_breakpoint): ... this.
7975 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7976 (reinsert_raw_breakpoint): Change parameter type to
7977 raw_breakpoint.
7978 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7979 instead.
7980 (check_breakpoints): Adjust. Use release_breakpoint.
7981 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7982 (breakpoint_inserted_here): Ditto.
7983 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7984 Don't trust the breakpoint's shadow if it is not inserted.
7985 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7986 (delete_all_breakpoints): Adjust.
7987 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7988 use delete_breakpoint_1.
7989
7990 * mem-break.h (breakpoints_supported): Delete declaration.
7991 (set_gdb_breakpoint_at): Declare.
7992 (gdb_breakpoint_here): Declare.
7993 (delete_breakpoint_at): Delete.
7994 (delete_gdb_breakpoint_at): Declare.
7995
7996 * server.h (struct raw_breakpoint): Forward declare.
7997 (struct process_info): New field `raw_breakpoints'.
7998
7999 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8000 breakpoints.
8001
8002 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8003
8004 * linux-low.c (status_pending_p_callback): Fix comment.
8005 (linux_wait_for_event_1): Move most of the internal breakpoint
8006 handling from here...
8007 (linux_wait_1): ... to here.
8008 (count_events_callback): New.
8009 (select_singlestep_lwp_callback): New.
8010 (select_event_lwp_callback): New.
8011 (cancel_breakpoints_callback): New.
8012 (select_event_lwp): New.
8013 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8014 priority to all LWPs that have had events that should be reported
8015 to the client. Cancel breakpoints when about to reporting the
8016 event to the client, not while stopping lwps. No longer cancel
8017 finished single-steps here.
8018 (cancel_finished_single_step): Delete.
8019 (cancel_finished_single_steps): Delete.
8020
8021 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8022
8023 * mem-break.c (enum bkpt_type): New.
8024 (struct breakpoint): New field `type'.
8025 (set_breakpoint_at): Change return type to struct breakpoint
8026 pointer. Set type to `other_breakpoint' by default.
8027 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8028 in the breakpoint list.
8029 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8030 (reinsert_breakpoint): Rename to ...
8031 (reinsert_raw_breakpoint): ... this.
8032 (reinsert_breakpoints_at): Adjust.
8033 * mem-break.h (struct breakpoint): Declare.
8034 (set_breakpoint_at): Change return type to struct breakpoint
8035 pointer.
8036
8037 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8038
8039 * server.c (handle_query): Assign, not compare.
8040
8041 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8042
8043 Teach linux gdbserver to step-over-breakpoints.
8044
8045 * linux-low.c (can_hardware_single_step): New.
8046 (supports_breakpoints): New.
8047 (handle_extended_wait): If stopping threads, read the stop pc of
8048 the new cloned LWP.
8049 (get_pc): New.
8050 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8051 low target doesn't support retrieving the PC.
8052 (add_lwp): Set last_resume_kind to resume_continue.
8053 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8054 (linux_attach): Don't clear stop_expected. Set the lwp's
8055 last_resume_kind to resume_stop.
8056 (linux_detach_one_lwp): Don't check for removed breakpoints.
8057 (check_removed_breakpoint): Delete.
8058 (status_pending_p): Rename to ...
8059 (status_pending_p_callback): ... this. Don't check for removed
8060 breakpoints. Don't consider threads that are stopped from GDB's
8061 perspective.
8062 (linux_wait_for_lwp): Always read the stop_pc here.
8063 (cancel_breakpoint): New.
8064 (step_over_bkpt): New global.
8065 (linux_wait_for_event_1): Implement stepping over breakpoints.
8066 (gdb_wants_lwp_stopped): New.
8067 (gdb_wants_all_stopped): New.
8068 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8069 single-step traps here. Store the thread's last reported target
8070 wait status.
8071 (send_sigstop): Don't clear stop_expected. Always set it,
8072 instead.
8073 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8074 (cancel_finished_single_step): New.
8075 (cancel_finished_single_steps): New.
8076 (wait_for_sigstop): Don't cancel finished single-step traps here.
8077 (linux_resume_one_lwp): Don't check for removed breakpoints.
8078 Don't set `step' on non-hardware step archs.
8079 (linux_set_resume_request): Ignore resume_stop requests if already
8080 stopping or stopped. Set the lwp's last_resume_kind.
8081 (resume_status_pending_p): Don't check for removed breakpoints.
8082 (need_step_over_p): New.
8083 (start_step_over): New.
8084 (finish_step_over): New.
8085 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8086 requests. Clear the thread's last reported target waitstatus.
8087 Don't use the `suspended' flag. Don't consider pending breakpoints.
8088 (linux_resume): Start a step-over if necessary.
8089 (proceed_one_lwp): New.
8090 (proceed_all_lwps): New.
8091 (unstop_all_lwps): New.
8092 * linux-low.h (struct lwp_info): Rewrite comment for the
8093 `suspended' flag. Add the `stop_pc' field. Delete the
8094 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8095 Add `'last_resume_kind' and `need_step_over' fields.
8096 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8097 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8098 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8099 (set_raw_breakpoint_at): New.
8100 (set_breakpoint_at): Rewrite to use it.
8101 (reinsert_breakpoint_handler): Delete.
8102 (set_reinsert_breakpoint): New.
8103 (reinsert_breakpoint_by_bp): Delete.
8104 (delete_reinsert_breakpoints): New.
8105 (uninsert_breakpoint): Rewrite.
8106 (uninsert_breakpoints_at): New.
8107 (reinsert_breakpoint): Rewrite.
8108 (reinsert_breakpoints_at): New.
8109 (check_breakpoints): Rewrite.
8110 (breakpoint_here): New.
8111 (breakpoint_inserted_here): New.
8112 (check_mem_read): Adjust.
8113 * mem-break.h (breakpoints_supported, breakpoint_here)
8114 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8115 (reinsert_breakpoint_by_bp): Delete declaration.
8116 (delete_reinsert_breakpoints): Declare.
8117 (reinsert_breakpoint): Delete declaration.
8118 (reinsert_breakpoints_at): Declare.
8119 (uninsert_breakpoint): Delete declaration.
8120 (uninsert_breakpoints_at): Declare.
8121 (check_breakpoints): Adjust prototype.
8122 * server.h: Adjust include order.
8123 (struct thread_info): Declare here. Add a `last_status' field.
8124
8125 2010-03-23 Michael Snyder <msnyder@vmware.com>
8126
8127 * server.c (crc32): New function.
8128 (handle_query): Add handling for 'qCRC:' request.
8129
8130 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8131
8132 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8133 lwp had been stopped by a watchpoint.
8134
8135 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8136
8137 * server.h (internal_error): Declare.
8138 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8139 * utils.c (internal_error): New function.
8140
8141 2010-03-15 Andreas Schwab <schwab@redhat.com>
8142
8143 * configure.srv: Fix typo setting srv_regobj.
8144
8145 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8146
8147 * linux-low.c (fetch_register): Avoid passing a non string literal
8148 format to `error'.
8149 (usr_store_inferior_registers): Ditto.
8150
8151 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8152
8153 * linux-low.c (linux_write_memory): Bail out early if peeking
8154 memory failed.
8155
8156 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8157
8158 * linux-low.h (struct lwp_info): New fields
8159 `stopped_by_watchpoint' and `stopped_data_address'.
8160 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8161 here, and cache them in the lwp object.
8162 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8163 directly.
8164 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8165 field.
8166 (linux_stopped_by_watchpoint): Rewrite.
8167 (linux_stopped_data_address): Rewrite.
8168
8169 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8170
8171 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8172 switching the current inferior, not before.
8173
8174 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8175
8176 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8177 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8178 i386-linux.c and amd64-linux.c.
8179 (reg-i386.o): Removed.
8180 (reg-i386.c): Likewise.
8181 (reg-i386-linux.o): Likewise.
8182 (reg-i386-linux.c): Likewise.
8183 (reg-x86-64.o): Likewise.
8184 (reg-x86-64.c): Likewise.
8185 (reg-x86-64-linux.o): Likewise.
8186 (reg-x86-64-linux.c): Likewise.
8187 (i386.o): New.
8188 (i386.c): Likewise.
8189 (i386-linux.o): Likewise.
8190 (i386-linux.c): Likewise.
8191 (amd64.o): Likewise.
8192 (amd64.c): Likewise.
8193 (amd64-linux.o): Likewise.
8194 (amd64-linux.c): Likewise.
8195
8196 * configure.srv (srv_i386_regobj): New.
8197 (srv_i386_linux_regobj): Likewise.
8198 (srv_amd64_regobj): Likewise.
8199 (srv_amd64_linux_regobj): Likewise.
8200 (srv_i386_32bit_xmlfiles): Likewise.
8201 (srv_i386_64bit_xmlfiles): Likewise.
8202 (srv_i386_xmlfiles): Likewise.
8203 (srv_amd64_xmlfiles): Likewise.
8204 (srv_i386_linux_xmlfiles): Likewise.
8205 (srv_amd64_linux_xmlfiles): Likewise.
8206 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8207 srv_xmlfiles to $srv_i386_xmlfiles.
8208 (i[34567]86-*-mingw32ce*): Likewise.
8209 (i[34567]86-*-mingw*): Likewise.
8210 (i[34567]86-*-nto*): Likewise.
8211 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8212 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8213 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8214 (x86_64-*-linux*): Likewise.
8215
8216 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8217 (init_registers_amd64_linux): New.
8218 (x86_arch_setup): Replace init_registers_x86_64_linux with
8219 init_registers_amd64_linux.
8220
8221 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8222
8223 * configure.ac: Check for libdl. If it is not available link against
8224 static libthread_db.
8225 * configure: Regenerate.
8226
8227 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8228
8229 PR9605
8230
8231 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8232 handing a read watchpoint.
8233 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8234
8235 2010-02-12 Doug Evans <dje@google.com>
8236
8237 * linux-low.c (linux_supports_tracefork_flag): Document.
8238 (linux_look_up_symbols): Add comment.
8239
8240 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8241
8242 * regcache.c (supply_register): Clear regcache if buf is NULL.
8243
8244 2010-02-02 Nicolas Roche <roche@sourceware.org>
8245 Joel Brobecker <brobecker@adacore.com>
8246
8247 * inferiors.c (find_inferior): Add function documentation.
8248 (unloaded_dll): Handle the case where the unloaded dll has not
8249 been previously registered in the dll list.
8250
8251 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8252
8253 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8254 (thumb2_breakpoint): New.
8255 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8256
8257 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8258
8259 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8260 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8261 breakpoints.
8262
8263 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8264
8265 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8266
8267 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8268
8269 * linux-s390-low.c (s390_collect_ptrace_register)
8270 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8271
8272 2010-01-21 Doug Evans <dje@google.com>
8273
8274 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8275 (PTRACE_ARG4_TYPE): New macro.
8276 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8277 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8278 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8279 (usr_store_inferior_registers): Ditto.
8280 (linux_read_memory, linux_write_memory): Ditto.
8281 (linux_test_for_tracefork): Ditto.
8282
8283 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8284 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8285
8286 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8287
8288 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8289 target.
8290
8291 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8292
8293 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8294 prototype to take a regcache. Adjust.
8295
8296 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8297
8298 * regcache.h (struct thread_info): Forward declare.
8299 (struct regcache): New.
8300 (new_register_cache): Adjust prototype.
8301 (get_thread_regcache): Declare.
8302 (free_register_cache): Adjust prototype.
8303 (registers_to_string, registers_from_string): Ditto.
8304 (supply_register, supply_register_by_name, collect_register)
8305 (collect_register_as_string, collect_register_by_name): Ditto.
8306 * regcache.c (struct inferior_regcache_data): Delete.
8307 (get_regcache): Rename to ...
8308 (get_thread_regcache): ... this. Adjust. Switch inferior before
8309 fetching registers.
8310 (regcache_invalidate_one): Adjust.
8311 (regcache_invalidate): Fix prototype.
8312 (new_register_cache): Return the new register cache.
8313 (free_register_cache): Change prototype.
8314 (realloc_register_cache): Adjust.
8315 (registers_to_string): Change prototype to take a regcache. Adjust.
8316 (registers_from_string): Ditto.
8317 (register_data): Ditto.
8318 (supply_register): Ditto.
8319 (supply_register_by_name): Ditto.
8320 (collect_register): Ditto.
8321 (collect_register_as_string): Ditto.
8322 (collect_register_by_name): Ditto.
8323 * server.c (process_serial_event): Adjust.
8324 * linux-low.h (regset_fill_func, regset_store_func): Change
8325 prototype.
8326 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8327 Change prototype.
8328 * linux-low.c (get_stop_pc): Adjust.
8329 (check_removed_breakpoint): Adjust.
8330 (linux_wait_for_event): Adjust.
8331 (linux_resume_one_lwp): Adjust.
8332 (fetch_register): Add regcache parameter. Adjust.
8333 (usr_store_inferior_registers): Ditto.
8334 (regsets_fetch_inferior_registers): Ditto.
8335 (regsets_store_inferior_registers): Ditto.
8336 (linux_fetch_registers, linux_store_registers): Ditto.
8337 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8338 regcache. Adjust.
8339 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8340 Ditto.
8341 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8342 prototype to take a regcache.
8343 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8344 * remote-utils.c (convert_ascii_to_int, outreg)
8345 (prepare_resume_reply): Change prototype to take a regcache.
8346 Adjust.
8347 * target.h (struct target_ops) <fetch_registers, store_registers>:
8348 Change prototype to take a regcache.
8349 (fetch_inferior_registers, store_inferior_registers): Change
8350 prototype to take a regcache. Adjust.
8351 * proc-service.c (ps_lgetregs): Adjust.
8352 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8353 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8354 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8355 take a regcache. Adjust.
8356 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8357 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8358 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8359 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8360 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8361 (cris_cannot_fetch_register):
8362 (cris_breakpoint_at): Change prototype to take a regcache.
8363 Adjust.
8364 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8365 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8366 to take a regcache. Adjust.
8367 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8368 Adjust.
8369 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8370 take a regcache. Adjust.
8371 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8372 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8373 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8374 * linux-mips-low.c (mips_get_pc):
8375 (mips_set_pc): Change prototype to take a regcache. Adjust.
8376 (mips_reinsert_addr): Adjust.
8377 (mips_collect_register): Change prototype to take a regcache.
8378 Adjust.
8379 (mips_supply_register):
8380 (mips_collect_register_32bit, mips_supply_register_32bit)
8381 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8382 (mips_store_fpregset): Ditto.
8383 * linux-ppc-low.c (ppc_supply_ptrace_register)
8384 (ppc_supply_ptrace_register): Ditto.
8385 (parse_spufs_run): Adjust.
8386 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8387 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8388 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8389 take a regcache. Adjust.
8390 * linux-s390-low.c (s390_collect_ptrace_register)
8391 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8392 (s390_set_pc): Change prototype to take a regcache. Adjust.
8393 (s390_arch_setup): Adjust.
8394 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8395 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8396 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8397 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8398 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8399 regcache. Adjust.
8400 (sparc_breakpoint_at): Adjust.
8401 * linux-xtensa-low.c (xtensa_fill_gregset):
8402 (xtensa_store_gregset):
8403 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8404 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8405 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8406 prototype to take a regcache. Adjust.
8407 * win32-arm-low.c (arm_fetch_inferior_register)
8408 (arm_store_inferior_register): Change prototype to take a
8409 regcache. Adjust.
8410 * win32-i386-low.c (i386_fetch_inferior_register)
8411 (i386_store_inferior_register): Change prototype to take a
8412 regcache. Adjust.
8413 * win32-low.c (child_fetch_inferior_registers)
8414 (child_store_inferior_registers): Change prototype to take a
8415 regcache. Adjust.
8416 (win32_wait): Adjust.
8417 (win32_fetch_inferior_registers): Change prototype to take a
8418 regcache. Adjust.
8419 (win32_store_inferior_registers): Adjust.
8420 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8421 store_inferior_register>: Change prototype to take a regcache.
8422
8423 2010-01-20 Doug Evans <dje@google.com>
8424
8425 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8426 #ifdef.
8427 (linux_wait_for_event1, linux_init_signals): Ditto.
8428 (W_STOPCODE): Provide definition if missing.
8429
8430 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8431
8432 * linux-low.c (linux_core_of_thread): New.
8433 (compare_ints, show_process, list_threads): New.
8434 (linux_qxfer_osdata): Report threads and cores.
8435 (linux_target_op): Register linux_core_of_thread.
8436 * remote-utils.c (prepare_resume_reply): Report the core.
8437 (buffer_xml_printf): Support %d specifier.
8438 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8439 New.
8440 (handle_query): Handle qXfer:threads. Announce availability
8441 thereof.
8442 * target.h (struct target_ops): New field core_of_thread.
8443
8444 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8445
8446 * Makefile.in (clean): Remove new generated files.
8447 (reg-s390.o, reg-s390.c): Remove rules.
8448 (reg-s390x.o, reg-s390x.c): Likewise.
8449 (s390-linux32.o, s390-linux32.c): Add rules.
8450 (s390-linux64.o, s390-linux64.c): Likewise.
8451 (s390x-linux64.o, s390x-linux64.c): Likewise.
8452 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8453 * linux-s390-low.c: Include <elf.h>.
8454 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8455 (init_registers_s390): Remove prototype.
8456 (init_registers_s390x): Likewise.
8457 (init_registers_s390_linux32): Add prototype.
8458 (init_registers_s390_linux64): Likewise.
8459 (init_registers_s390x_linux64): Likewise.
8460 (s390_num_regs_3264): New define.
8461 (s390_regmap_3264): New global variable.
8462 (s390_cannot_fetch_register): Remove obsolete check.
8463 (s390_cannot_store_register): Likewise.
8464 (s390_collect_ptrace_register): Handle upper/lower register halves.
8465 (s390_supply_ptrace_register): Likewise.
8466 (s390_fill_gregset): Update to register number changes.
8467 (s390_get_hwcap): New routine.
8468 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8469 Install appropriate regmap and register set.
8470
8471 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8472
8473 * server.c (gdbserver_version): Update copyright year to 2010.
8474 * gdbreplay.c (gdbreplay_version): Likewise.
8475
8476 2009-12-28 Doug Evans <dje@google.com>
8477
8478 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8479 elf/external.h. Include <elf.h> instead but only if necessary.
8480
8481 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8482
8483 * linux-low.c (linux_remove_process): Remove `detaching'
8484 parameter. Don't release/detach from thread_db here.
8485 (linux_kill): Release/detach from thread_db here, ...
8486 (linux_detach): ... and here, before actually detaching.
8487 (linux_wait_1): ... and here, when a process exits.
8488 * thread-db.c (any_thread_of): New.
8489 (thread_db_free): Switch the current inferior to a thread of the
8490 passed in process.
8491
8492 2009-12-21 Doug Evans <dje@google.com>
8493
8494 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8495
8496 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8497 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8498 warning ifndef __NR_tkill. Move setting of errno there too.
8499 Delete unnecessary resetting of errno after syscall.
8500 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8501
8502 * configure.ac: Check for dladdr.
8503 * config.in: Regenerate.
8504 * configure: Regenerate.
8505 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8506 (try_thread_db_load): Update.
8507
8508 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8509
8510 2009-12-18 Doug Evans <dje@google.com>
8511
8512 * event-loop.c: Include unistd.h if it exists.
8513
8514 * linux-low.c (my_waitpid): Move definition away from being in
8515 between linux_tracefork_child/linux_test_for_tracefork.
8516
8517 * gdb_proc_service.h (psaddr_t): Fix type.
8518 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8519 signature to match glibc.
8520
8521 2009-12-16 Doug Evans <dje@google.com>
8522
8523 * linux-low.c (linux_read_memory): Fix argument to read.
8524
8525 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8526
8527 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8528 events, don't leave current_inferior pointing at null.
8529
8530 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8531
8532 * win32-low.c (LOG): Delete.
8533 (OUTMSG): Output to stderr.
8534 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8535 on compile time LOG macro.
8536 (win32_wait): Fix debug output.
8537
8538 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8539
8540 * win32-low.c (win32_add_one_solib): If the dll name is
8541 "ntdll.dll", prepend the system directory to the dll path.
8542
8543 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8544
8545 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8546
8547 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8548 Vladimir Prus <vladimir@codesourcery.com>
8549
8550 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8551 * configure.ac: Check for __mcoldfire__ and set
8552 gdb_cv_m68k_is_coldfire.
8553 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8554 reg-cf.o and reg-m68k.o.
8555 * configure: Regenerated.
8556
8557 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8558
8559 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8560 Pass it to thread_db_free.
8561 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8562 proper `detaching' argument to linux_remove_process.
8563 * linux-low.h (thread_db_free): Add `detaching' parameter.
8564 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8565 to thread_db_free.
8566 (thread_db_free): Add `detaching' parameter. Only
8567 call td_ta_clear_event if detaching from process.
8568
8569 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8570
8571 * thread-db.c (thread_db_free): Fix typo.
8572
8573 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8574
8575 PR gdb/10838
8576 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8577
8578 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8579
8580 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8581 with an i686 compiler.
8582 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8583 needed.
8584 * configure: Rebuilt.
8585
8586 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8587
8588 PR gdb/10783
8589
8590 * server.c (handle_search_memory_1): Correct read_addr initialization
8591 in loop for searching subsequent chunks.
8592
8593 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8594
8595 * configure.ac: New --with-libthread-db option.
8596 * thread-db.c: Allow direct dependence on libthread_db.
8597 (thread_db_free): Adjust.
8598 * config.in: Regenerate.
8599 * configure: Likewise.
8600
8601 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8602
8603 PR gdb/10757
8604 * thread-db.c (attach_thread): New function.
8605 (maybe_attach_thread): Return success/failure.
8606 (find_new_threads_callback): Adjust.
8607 (thread_db_find_new_threads): Loop until no new threads.
8608
8609 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8610
8611 * proc-service.c (ps_lgetregs): Formatting.
8612
8613 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8614
8615 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8616 * configure.ac: Adjust.
8617 * linux-low.h (struct process_info_private): Move members to struct
8618 thread_db.
8619 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8620 * linux-low.c (linux_remove_process): Adjust.
8621 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8622 * server.c (handle_query): Move code ...
8623 (handle_monitor_command): ... here. New function.
8624 * target.h (struct target_ops): New member.
8625 * thread-db.c (struct thread_db): New.
8626 (libthread_db_search_path): New variable.
8627 (thread_db_create_event, thread_db_enable_reporting)
8628 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8629 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8630 (try_thread_db_load_1, dladdr_to_soname): New functions.
8631 (try_thread_db_load, thread_db_load_search): New functions.
8632 (thread_db_init): Search for libthread_db.
8633 (thread_db_free): New function.
8634 (thread_db_handle_monitor_command): Likewise.
8635 * config.in: Regenerate.
8636 * configure: Regenerate.
8637
8638 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8639
8640 * spu-low.c (spu_kill): Wait for inferior to terminate.
8641 Call clear_inferiors.
8642 (spu_detach): Call clear_inferiors.
8643
8644 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8645
8646 * aclocal.m4: Regenerate.
8647 * config.in: Likewise.
8648 * configure: Likewise.
8649
8650 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8651
8652 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8653 (parse_spufs_run): New function.
8654 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8655 (ppc_breakpoint_at): Handle SPU breakpoints.
8656
8657 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8658
8659 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8660 (SPUFS_MAGIC): Define.
8661 (spu_enumerate_spu_ids): New function.
8662 (linux_qxfer_spu): New function.
8663 (linux_target_ops): Install linux_qxfer_spu.
8664
8665 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8666
8667 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8668 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8669 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8670 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8671 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8672 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8673 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8674 (init_registers_powerpc_cell32l): Add prototype.
8675 (init_registers_powerpc_cell64l): Likewise.
8676 (ppc_arch_setup): Detect Cell/B.E. architecture.
8677
8678 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8679
8680 * Makefile.in (datarootdir): New variable.
8681
8682 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8683
8684 * linux-low.c (linux_write_memory): Update debugging output.
8685 * Makefile.in (clean): Add new descriptions.
8686 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8687 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8688 * configure.srv: Add new files for arm*-*-linux*.
8689 * linux-arm-low.c: Add new declarations.
8690 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8691 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8692 (HWCAP_VFPv3D16): New.
8693 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8694 instead of __IWMMXT__.
8695 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8696 (arm_arch_setup): New.
8697 (target_regsets): Remove #ifdef. Add VFP regset.
8698 (the_low_target): Use arm_arch_setup.
8699
8700 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8701
8702 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8703 the main thread again.
8704
8705 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8706
8707 Adding Neutrino gdbserver.
8708 * configure: Regenerated.
8709 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8710 * configure.srv (i[34567]86-*-nto*): New target.
8711 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8712 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8713 (nto_comctrl) [__QNX__]: New function.
8714 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8715
8716 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8717
8718 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8719 srv_tgtobj.
8720
8721 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8722 Pedro Alves <pedro@codesourcery.com>
8723
8724 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8725 don't support CONTEXT_EXTENDED_REGISTERS.
8726 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8727 (the_low_target): Install them.
8728 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8729 failing with ERROR_PIPE_NOT_CONNECTED.
8730
8731 2009-06-30 Doug Evans <dje@google.com>
8732 Pierre Muller <muller@ics.u-strasbg.fr>
8733
8734 Add h/w watchpoint support to x86-linux, win32-i386.
8735 * Makefile.in (SFILES): Add i386-low.c
8736 (i386_low_h): Define.
8737 (i386-low.o): Add dependencies.
8738 (linux-x86-low.o): Add i386-low.h dependency.
8739 (win32-i386-low.o): Ditto.
8740 * i386-low.c: New file.
8741 * i386-low.h: New file.
8742 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8743 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8744 * linux-low.c (linux_add_process): Initialize arch_private.
8745 (linux_remove_process): Free arch_private.
8746 (add_lwp): Initialize arch_private.
8747 (delete_lwp): Free arch_private.
8748 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8749 provided.
8750 * linux-low.h (process_info_private): New member arch_private.
8751 (lwp_info): New member arch_private.
8752 (linux_target_ops): New members new_process, new_thread,
8753 prepare_to_resume.
8754 (ptid_of): New macro.
8755 * linux-x86-low.c: Include stddef.h, i386-low.h.
8756 (arch_process_info): New struct.
8757 (arch_lwp_info): New struct.
8758 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8759 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8760 (i386_dr_low_get_status): New function.
8761 (x86_insert_point, x86_remove_point): New functions.
8762 (x86_stopped_by_watchpoint): New function.
8763 (x86_stopped_data_address): New function.
8764 (x86_linux_new_process, x86_linux_new_thread): New functions.
8765 (x86_linux_prepare_to_resume): New function.
8766 (the_low_target): Add entries for insert_point, remove_point,
8767 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8768 prepare_to_resume.
8769 * server.c (debug_hw_points): New global.
8770 (monitor_show_help): Document set debug-hw-points.
8771 (handle_query): Process "set debug-hw-points".
8772 * server.h (debug_hw_points): Declare.
8773 (paddress): Declare.
8774 * utils.c (NUMCELLS, CELLSIZE): New macros.
8775 (get_sell, xsnprintf, paddress): New functions.
8776 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8777 remove_point, stopped_by_watchpoint, stopped_data_address.
8778 * win32-i386-low.c: Include i386-low.h.
8779 (debug_reg_state): Replaces dr.
8780 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8781 (i386_dr_low_get_status): New function.
8782 (i386_insert_point, i386_remove_point): New functions.
8783 (i386_stopped_by_watchpoint): New function.
8784 (i386_stopped_data_address): New function.
8785 (i386_initial_stuff): Update.
8786 (get_thread_context,set_thread_context,i386_thread_added): Update.
8787 (the_low_target): Add entries for insert_point,
8788 remove_point, stopped_by_watchpoint, stopped_data_address.
8789 * win32-low.c (win32_insert_watchpoint): New function.
8790 (win32_remove_watchpoint): New function.
8791 (win32_stopped_by_watchpoint): New function.
8792 (win32_stopped_data_address): New function.
8793 (win32_target_ops): Add entries for insert_watchpoint,
8794 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8795 * win32-low.h (win32_target_ops): New members insert_point,
8796 remove_point, stopped_by_watchpoint, stopped_data_address.
8797
8798 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8799
8800 * server.c (process_serial_event): Re-return unsupported, not
8801 error, if the type isn't recognized. Re-allow supporting only
8802 insert or remove packets. Also call require_running for
8803 breakpoints. Add missing break statement to default case. Tidy.
8804 * target.h (struct target_ops): Rename insert_watchpoint to
8805 insert_point, and remove_watchpoint to remove_point.
8806
8807 * linux-low.h (struct linux_target_ops): Likewise.
8808 * linux-low.c (linux_insert_watchpoint): Rename to ...
8809 (linux_insert_point): ... this. Adjust.
8810 (linux_remove_watchpoint): Rename to ...
8811 (linux_remove_point): ... this. Adjust.
8812 (linux_target_ops): Adjust.
8813 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8814 (cris_insert_point): ... this.
8815 (cris_remove_watchpoint): Rename to ...
8816 (cris_remove_point): ... this.
8817 (the_low_target): Adjust.
8818
8819 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8820
8821 * server.c (handle_v_kill): Pass signal_pid to
8822 kill_inferior if multi_process is zero.
8823
8824 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8825
8826 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8827 * target.h (target_ops): Comment for *_watchpoint to make it clear
8828 the functions can get types '0' and '1'.
8829
8830 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8831
8832 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8833 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8834 * regcache.c (get_regcache): Likewise.
8835 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8836 * win32-low.c (child_fetch_inferior_registers): Remove check for
8837 regno 0.
8838
8839 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8840 Pedro Alves <pedro@codesourcery.com>
8841
8842 * target.h (struct target_ops) <supports_multi_process>: New
8843 callback.
8844 (target_supports_multi_process): New.
8845 * server.c (handle_query): Even if GDB reports support, only
8846 enable multi-process if the target also supports it. Report
8847 multi-process support only if the target backend supports it.
8848 * linux-low.c (linux_supports_multi_process): New function.
8849 (linux_target_ops): Install it as target_supports_multi_process
8850 callback.
8851
8852 2009-05-24 Doug Evans <dje@google.com>
8853
8854 Global renaming of find_thread_pid to find_thread_ptid.
8855 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8856 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8857 All callers updated.
8858
8859 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8860 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8861 directly.
8862
8863 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8864 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8865 (linux_resume_one_lwp): Ditto.
8866
8867 2009-05-23 Doug Evans <dje@google.com>
8868
8869 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8870 from struct inferior_list_entry * to struct lwp_info *.
8871 All callers updated.
8872
8873 2009-05-13 Doug Evans <dje@google.com>
8874
8875 * linux-x86-low.c: Don't include assert.h.
8876 (x86_siginfo_fixup): Use fatal, not assert.
8877 (x86_arch_setup): Fix comment.
8878
8879 2009-05-12 Doug Evans <dje@google.com>
8880
8881 Biarch support for i386/amd64 gdbserver.
8882 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8883 Add linux-x86-low.c.
8884 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8885 (linux-x86-low.o): Add.
8886 * linux-x86-64-low.c: Delete.
8887 * linux-i386-low.c: Delete.
8888 * linux-x86-low.c: New file.
8889 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8890 linux-x86-low.o.
8891 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8892 linux-x86-low.o.
8893 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8894 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8895 (linux_child_pid_to_exec_file): New function.
8896 (elf_64_header_p, elf_64_file_p): New functions.
8897 (siginfo_fixup): New function.
8898 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8899 give target a chance to convert layout.
8900 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8901 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8902
8903 2009-05-07 Doug Evans <dje@google.com>
8904
8905 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8906 (regsets_store_inferior_registers): Ditto.
8907
8908 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8909
8910 PR server/10048
8911
8912 * linux-low.c (must_set_ptrace_flags): Delete.
8913 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8914 of the global.
8915 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8916 `lwp->must_set_ptrace_flags' instead.
8917 (linux_wait_for_event_1): Set ptrace options here.
8918 (linux_wait_1): ... not here.
8919
8920 2009-04-30 Doug Evans <dje@google.com>
8921
8922 * inferiors.c (started_inferior_callback): New function.
8923 (attached_inferior_callback): New function.
8924 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8925 * server.c (print_started_pid, print_attached_pid): New functions.
8926 (detach_or_kill_for_exit): New function.
8927 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8928 * server.h (have_started_inferiors_p): Declare.
8929 (have_attached_inferiors_p): Declare.
8930
8931 * inferiors.c (remove_process): Fix memory leak, free process.
8932 * linux-low.c (linux_remove_process): New function.
8933 (linux_kill): Call it instead of remove_process.
8934 (linux_detach, linux_wait_1): Ditto.
8935
8936 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8937
8938 * configure.srv: Add x86 Windows CE target.
8939
8940 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8941
8942 * inferiors.c (get_thread_process): Make global.
8943 * server.h (get_thread_process): Add prototype.
8944 * thread-db.c (find_one_thread): Use get_thread_process
8945 instead of current_process.
8946 (thread_db_get_tls_address): Do not crash if called when
8947 thread layer is not yet initialized.
8948
8949 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8950
8951 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8952 * spu-low.c (current_tid): Rename to ...
8953 (current_ptid): ... this.
8954 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8955 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8956 ptid_get_lwp (current_ptid) instead of current_tid.
8957 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8958 instead of current_tid. Use find_process_pid to verify pid
8959 argument is valid. Pass proper argument to remove_process.
8960 (spu_thread_alive): Compare current_ptid instead of current_tid.
8961 (spu_resume): Likewise.
8962
8963 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8964
8965 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8966 variable.
8967
8968 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8969
8970 Implement the multiprocess extensions, and add linux multiprocess
8971 support.
8972
8973 * server.h (ULONGEST): Declare.
8974 (struct ptid, ptid_t): New.
8975 (minus_one_ptid, null_ptid): Declare.
8976 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8977 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8978 (struct inferior_list_entry): Change `id' type from unsigned from
8979 to ptid_t.
8980 (struct sym_cache, struct breakpoint, struct
8981 process_info_private): Forward declare.
8982 (struct process_info): Declare.
8983 (current_process): Declare.
8984 (all_processes): Declare.
8985 (initialize_inferiors): Declare.
8986 (add_thread): Adjust to use ptid_t.
8987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8988 (add_process, remove_process, find_thread_pid): Declare.
8989 (find_inferior_id): Adjust to use ptid_t.
8990 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8991 (multi_process): Declare.
8992 (push_event): Adjust to use ptid_t.
8993 (read_ptid, write_ptid): Declare.
8994 (prepare_resume_reply): Adjust to use ptid_t.
8995 (clear_symbol_cache): Declare.
8996 * inferiors.c (all_processes): New.
8997 (null_ptid, minus_one_ptid): New.
8998 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8999 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9000 (add_thread): Change unsigned long to ptid. Remove gdb_id
9001 parameter. Adjust.
9002 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9003 (gdb_id_to_thread): Rename to ...
9004 (find_thread_pid): ... this. Change unsigned long to ptid.
9005 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9006 (loaded_dll, pull_pid_from_list): Adjust.
9007 (add_process, remove_process, find_process_pid)
9008 (get_thread_process, current_process, initialize_inferiors): New.
9009 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9010 (struct target_waitstatus) <related_pid>: Ditto.
9011 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9012 return type to int.
9013 (struct target_ops) <join>: Add `pid' argument.
9014 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9015 (struct target_ops) <wait>: Add `ptid' field. Change return type
9016 to ptid.
9017 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9018 (mywait): Add `ptid' argument. Change return type to ptid_t.
9019 (target_pid_to_str): Declare.
9020 * target.c (set_desired_inferior): Adjust to use ptids.
9021 (mywait): Add new `ptid' argument. Adjust.
9022 (target_pid_to_str): New.
9023 * mem-break.h (free_all_breakpoints): Declare.
9024 * mem-break.c (breakpoints): Delelete.
9025 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9026 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9027 to use per-process breakpoint list.
9028 (free_all_breakpoints): New.
9029 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9030 (symbol_cache, all_symbols_looked_up): Delete.
9031 (hexchars): New.
9032 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9033 read_ptid): New.
9034 (prepare_resume_reply): Change ptid argument's type from unsigned
9035 long to ptid_t. Adjust. Implement W;process and X;process.
9036 (free_sym_cache, clear_symbol_cache): New.
9037 (look_up_one_symbol): Adjust to per-process symbol cache. *
9038 * server.c (cont_thread, general_thread, step_thread): Change type
9039 to ptid_t.
9040 (attached): Delete.
9041 (multi_process): New.
9042 (last_ptid): Change type to ptid_t.
9043 (struct vstop_notif) <ptid>: Change type to ptid_t.
9044 (queue_stop_reply, push_event): Change `ptid' argument's type to
9045 ptid_t.
9046 (discard_queued_stop_replies): Add `pid' argument.
9047 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9048 changes. Don't reference the `attached' global.
9049 (attach_inferior): Adjust to mywait interface changes.
9050 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9051 features. Handle and report "multiprocess+". Handle
9052 "qAttached:PID".
9053 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9054 changes.
9055 (handle_v_kill): New.
9056 (handle_v_stopped): Adjust to use target_pid_to_str.
9057 (handle_v_requests): Allow multiple attaches and runs when
9058 multiprocess extensions are in effect. Handle "vKill".
9059 (myresume): Adjust to use ptids.
9060 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9061 (handle_status): Adjust to discard_queued_stop_replies interface
9062 change.
9063 (first_thread_of, kill_inferior_callback)
9064 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9065 (main): Call initialize_inferiors. Adjust to use ptids, killing
9066 and detaching from all inferiors. Handle multiprocess packet
9067 variants.
9068 * linux-low.h: Include gdb_proc_service.h.
9069 (struct process_info_private): New.
9070 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9071 <lwpid_of>: Use ptid_get_lwp.
9072 (get_lwp_thread): Adjust.
9073 (struct lwp_info): Add `dead' member.
9074 (find_lwp_pid): Declare.
9075 * linux-low.c (thread_db_active): Delete.
9076 (new_inferior): Adjust comment.
9077 (inferior_pid): Delete.
9078 (linux_add_process): New.
9079 (handle_extended_wait): Adjust.
9080 (add_lwp): Change unsigned long to ptid.
9081 (linux_create_inferior): Add process to processes table. Adjust
9082 to use ptids. Don't set new_inferior here.
9083 (linux_attach_lwp): Rename to ...
9084 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9085 it. Adjust to use ptids.
9086 (linux_attach_lwp): New.
9087 (linux_attach): Add process to processes table. Don't set
9088 new_inferior here.
9089 (struct counter): New.
9090 (second_thread_of_pid_p, last_thread_of_process_p): New.
9091 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9092 multiple processes.
9093 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9094 processes. Remove process from process table.
9095 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9096 to multiple processes.
9097 (any_thread_of): New.
9098 (linux_detach): Add `pid' argument, and handle it. Remove process
9099 from processes table.
9100 (linux_join): Add `pid' argument. Handle it.
9101 (linux_thread_alive): Change unsighed long argument to ptid_t.
9102 Consider dead lwps as not being alive.
9103 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9104 threads we're not interested in.
9105 (same_lwp, find_lwp_pid): New.
9106 (linux_wait_for_lwp): Change `pid' argument's type from int to
9107 ptid_t. Adjust.
9108 (linux_wait_for_event): Rename to ...
9109 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9110 from int to ptid_t. Adjust.
9111 (linux_wait_for_event): New.
9112 (linux_wait_1): Add `ptid' argument. Change return type to
9113 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9114 that exit from the process table.
9115 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9116 Adjust.
9117 (mark_lwp_dead): New.
9118 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9119 stopping all threads, mark its main lwp as dead.
9120 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9121 ptids.
9122 (fetch_register, usr_store_inferior_registers)
9123 (regsets_fetch_inferior_registers)
9124 (regsets_store_inferior_registers, linux_read_memory)
9125 (linux_write_memory): Inline `inferior_pid'.
9126 (linux_look_up_symbols): Adjust to use per-process
9127 `thread_db_active'.
9128 (linux_request_interrupt): Adjust to use ptids.
9129 (linux_read_auxv): Inline `inferior_pid'.
9130 (initialize_low): Don't reference thread_db_active.
9131 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9132 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9133 (ps_getpid): Return the pid of the current inferior.
9134 * thread-db.c (proc_handle, thread_agent): Delete.
9135 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9136 per-process data.
9137 (find_one_thread): Change argument type to ptid_t. Adjust to
9138 per-process data.
9139 (maybe_attach_thread): Adjust to per-process data and ptids.
9140 (thread_db_find_new_threads): Ditto.
9141 (thread_db_init): Ditto.
9142 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9143 processes table. Adjust to use ptids.
9144 (spu_kill, spu_detach): Adjust interface. Remove process from
9145 processes table.
9146 (spu_join, spu_thread_alive): Adjust interface.
9147 (spu_wait): Adjust interface. Remove process from processes
9148 table. Adjust to use ptids.
9149 * win32-low.c (current_inferior_tid): Delete.
9150 (current_inferior_ptid): New.
9151 (debug_event_ptid): New.
9152 (thread_rec): Take a ptid. Adjust.
9153 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9154 (child_delete_thread): Ditto.
9155 (do_initial_child_stuff): Add `attached' argument. Add process to
9156 processes table.
9157 (child_fetch_inferior_registers, child_store_inferior_registers):
9158 Adjust.
9159 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9160 (win32_attach): Pass 1 to do_initial_child_stuff.
9161 (win32_kill): Adjust interface. Remove process from processes
9162 table.
9163 (win32_detach): Ditto.
9164 (win32_join): Adjust interface.
9165 (win32_thread_alive): Take a ptid.
9166 (win32_resume): Adjust to use ptids.
9167 (get_child_debug_event): Ditto.
9168 (win32_wait): Adjust interface. Remove exiting process from
9169 processes table.
9170
9171 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9172
9173 Non-stop mode support.
9174
9175 * server.h (non_stop): Declare.
9176 (gdb_client_data, handler_func): Declare.
9177 (delete_file_handler, add_file_handler, start_event_loop):
9178 Declare.
9179 (handle_serial_event, handle_target_event, push_event)
9180 (putpkt_notif): Declare.
9181 * target.h (enum resume_kind): New.
9182 (struct thread_resume): Replace `step' field by `kind' field.
9183 (TARGET_WNOHANG): Define.
9184 (struct target_ops) <wait>: Add `options' argument.
9185 <supports_non_stop, async, start_non_stop>: New fields.
9186 (target_supports_non_stop, target_async): New.
9187 (start_non_stop): Declare.
9188 (mywait): Add `options' argument.
9189 * target.c (mywait): Add `options' argument. Print child exit
9190 notifications here.
9191 (start_non_stop): New.
9192 * server.c (non_stop, own_buf, mem_buf): New globals.
9193 (struct vstop_notif): New.
9194 (notif_queue): New global.
9195 (queue_stop_reply, push_event, discard_queued_stop_replies)
9196 (send_next_stop_reply): New.
9197 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9198 interface changes.
9199 (attach_inferior): In non-stop mode, don't wait for the target
9200 here.
9201 (handle_general_set): Handle QNonStop.
9202 (handle_query): When handling qC, return the current general
9203 thread, instead of the first thread of the list.
9204 (handle_query): If the backend supports non-stop mode, include
9205 QNonStop+ in the qSupported query response.
9206 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9207 and non-stop mode.
9208 (handle_v_attach, handle_v_run): Handle non-stop mode.
9209 (handle_v_stopped): New.
9210 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9211 (myresume): Adjust to use resume_kind. Handle non-stop.
9212 (queue_stop_reply_callback): New.
9213 (handle_status): Handle non-stop mode.
9214 (main): Clear non_stop flag on reconnection. Use the event-loop.
9215 Refactor serial protocol handling from here ...
9216 (process_serial_event): ... to this new function. When GDB
9217 selects any thread, select one here. In non-stop mode, wait until
9218 GDB acks all pending events before exiting.
9219 (handle_serial_event, handle_target_event): New.
9220 * remote-utils.c (remote_open): Install remote_desc in the event
9221 loop.
9222 (remote_close): Remove remote_desc from the event loop.
9223 (putpkt_binary): Rename to...
9224 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9225 (putpkt_binary): New as wrapper around putpkt_binary_1.
9226 (putpkt_notif): New.
9227 (prepare_resume_reply): In non-stop mode, don't change the
9228 general_thread.
9229 * event-loop.c: New.
9230 * Makefile.in (OBJ): Add event-loop.o.
9231 (event-loop.o): New rule.
9232
9233 * linux-low.h (pid_of): Moved here.
9234 (lwpid_of): New.
9235 (get_lwp_thread): Use lwpid_of.
9236 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9237 * linux-low.c (pid_of): Delete.
9238 (inferior_pid): Use lwpid_of.
9239 (linux_event_pipe): New.
9240 (target_is_async_p): New.
9241 (delete_lwp): New.
9242 (handle_extended_wait): Use lwpid_of.
9243 (add_lwp): Don't set lwpid field.
9244 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9245 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9246 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9247 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9248 first. Adjust to linux_wait_for_event interface changes. Use
9249 lwpid_of.
9250 (linux_detach): Don't delete the main lwp here.
9251 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9252 (status_pending_p): Don't consider explicitly suspended lwps.
9253 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9254 pointer. Add OPTIONS argument. Change return type to int. Use
9255 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9256 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9257 pointer. Add status pointer argument. Return a pid instead of a
9258 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9259 changes. In non-stop mode, don't switch to a random thread.
9260 (linux_wait): Rename to...
9261 (linux_wait_1): ... this. Add target_options argument, and handle
9262 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9263 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9264 clean exit and signal exit code. Don't stop all threads in
9265 non-stop mode. In all-stop mode, only stop all threads when
9266 reporting a stop to GDB. Handle explicit thread stop requests.
9267 (async_file_flush, async_file_mark): New.
9268 (linux_wait): New.
9269 (send_sigstop): Use lwpid_of.
9270 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9271 interface changes. In non-stop mode, don't switch to a random
9272 thread.
9273 (linux_resume_one_lwp): Use lwpid_of.
9274 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9275 (linux_resume_one_thread): ... this. Handle resume_stop. In
9276 non-stop mode, don't look for pending flag in all threads.
9277 (resume_status_pending_p): Don't consider explicitly suspended
9278 threads.
9279 (my_waitpid): Reimplement. Emulate __WALL.
9280 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9281 Use lwpid_of.
9282 (sigchld_handler, linux_supports_non_stop, linux_async)
9283 (linux_start_non_stop): New.
9284 (linux_target_ops): Register linux_supports_non_stop, linux_async
9285 and linux_start_non_stop.
9286 (initialize_low): Install SIGCHLD handler.
9287 * thread-db.c (thread_db_create_event, find_one_thread)
9288 (thread_db_get_tls_address): Use lwpid_of.
9289 * win32-low.c (win32_detach): Adjust to use resume_kind.
9290 (win32_wait): Add `options' argument.
9291 * spu-low.c (spu_resume): Adjust to use resume_kind.
9292 (spu_wait): Add `options' argument.
9293
9294 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9295
9296 Decouple target code from remote protocol.
9297
9298 * target.h (enum target_waitkind): New.
9299 (struct target_waitstatus): New.
9300 (struct target_ops) <wait>: Return an unsigned long. Take a
9301 target_waitstatus pointer instead of a char pointer.
9302 (mywait): Likewise.
9303 * target.c (mywait): Change prototype to return an unsigned long.
9304 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9305 * server.h (thread_from_wait, old_thread_from_wait): Delete
9306 declarations.
9307 (prepare_resume_reply): Change prototype to take a
9308 target_waitstatus.
9309 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9310 (last_status, last_ptid): New.
9311 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9312 pid instead of a signal.
9313 (attach_inferior): Remove "status" and "signal" parameters.
9314 Adjust.
9315 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9316 not as an address.
9317 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9318 (handle_v_requests, myresume): Remove "status" and "signal"
9319 parameters. Adjust.
9320 (handle_status): New.
9321 (main): Delete local `status'. Adjust.
9322 * remote-utils.c: Include target.h.
9323 (prepare_resume_reply): Change prototype to take a
9324 target_waitstatus. Adjust.
9325
9326 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9327 interface.
9328 * spu-low.c (spu_wait): Adjust.
9329 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9330 Delete.
9331 (win32_wait): Adjust.
9332
9333 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9334
9335 * target.h (struct thread_resume): Delete leave_stopped member.
9336 (struct target_ops): Add a `n' argument to the `resume' callback.
9337 * server.c (start_inferior): Adjust.
9338 (handle_v_cont, myresume): Adjust.
9339 * linux-low.c (check_removed_breakpoint): Adjust to resume
9340 interface change, and to removed leave_stopped field.
9341 (resume_ptr): Delete.
9342 (struct thread_resume_array): New.
9343 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9344 resume interface change.
9345 (linux_continue_one_thread, linux_queue_one_thread)
9346 (resume_status_pending_p): Check if the resume field is NULL
9347 instead of checking the leave_stopped member.
9348 (linux_resume): Adjust to the target resume interface change.
9349 * spu-low.c (spu_resume): Adjust to the target resume interface
9350 change.
9351 * win32-low.c (win32_detach, win32_resume): Ditto.
9352
9353 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9354
9355 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9356 flag.
9357 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9358 pending.
9359 (linux_continue_one_thread): Only preserve the stepping flag if
9360 there's a pending breakpoint.
9361
9362 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9363
9364 * server.c (main): After the inferior having exited, call
9365 remote_close before exiting gdbserver.
9366
9367 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9368
9369 Fix size of FPSCR in Power 7 processors.
9370 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9371 (PPC_FEATURE_HAS_DFP): New #define.
9372 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9373 size of the FPSCR.
9374
9375 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9376
9377 * server.c (handle_query) Whitespace and formatting.
9378
9379 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9380
9381 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9382 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9383 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9384 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9385 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9386 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9387 Makefile.in, configure.ac: Fix whitespace throughout.
9388 * configure: Regenerate.
9389
9390 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9391
9392 * inferiors.c (find_inferior): Make it safe for the callback
9393 function to delete the currently iterated inferior.
9394
9395 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9396
9397 * Makefile.in (linuw_low_h): Move higher.
9398 (thread-db.o): Depend on $(linux_low_h).
9399
9400 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9401
9402 Rename "process" to "lwp" throughout.
9403
9404 * linux-low.c (all_processes): Rename to...
9405 (all_lwps): ... this.
9406 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9407 (add_process): Rename to ...
9408 (add_lwp): ... this. Adjust.
9409 (linux_create_inferior): Adjust.
9410 (linux_attach_lwp): Adjust.
9411 (linux_attach): Adjust.
9412 (linux_kill_one_process): Rename to ...
9413 (linux_kill_one_lwp): ... this. Adjust.
9414 (linux_kill): Adjust.
9415 (linux_detach_one_process): Rename to ...
9416 (linux_detach_one_lwp): ... this. Adjust.
9417 (linux_detach): Adjust.
9418 (check_removed_breakpoint): Adjust.
9419 (status_pending_p): Adjust.
9420 (linux_wait_for_process): Rename to ...
9421 (linux_wait_for_lwp): ... this. Adjust.
9422 (linux_wait_for_event): Adjust.
9423 (send_sigstop): Adjust.
9424 (wait_for_sigstop): Adjust.
9425 (stop_all_processes): Rename to ...
9426 (stop_all_lwps): ... this.
9427 (linux_resume_one_process): Rename to ...
9428 (linux_resume_one_lwp): ... this. Adjust.
9429 (linux_set_resume_request, linux_continue_one_thread)
9430 (linux_queue_one_thread, resume_status_pending_p)
9431 (usr_store_inferior_registers, regsets_store_inferior_registers)
9432 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9433 Adjust.
9434 * linux-low.h (get_process): Rename to ...
9435 (get_lwp): ... this. Adjust.
9436 (get_thread_process): Rename to ...
9437 (get_thread_lwp): ... this. Adjust.
9438 (get_process_thread): Rename to ...
9439 (get_lwp_thread): ... this. Adjust.
9440 (struct process_info): Rename to ...
9441 (struct lwp_info): ... this.
9442 (all_processes): Rename to ...
9443 (all_lwps): ... this.
9444 * proc-service.c (ps_lgetregs): Adjust.
9445 * thread-db.c (thread_db_create_event, find_one_thread)
9446 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9447
9448 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9449
9450 * server.c (handle_query): Handle "qAttached".
9451
9452 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9453
9454 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9455 GPLv3, update license URL.
9456
9457 2009-03-01 Doug Evans <dje@google.com>
9458
9459 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9460 (server_h): Add gdb_signals.h.
9461 (signals.o): Update.
9462 * server.h (target_signal_from_host,target_signal_to_host_p)
9463 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9464
9465 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9466
9467 * remote-utils.c (getpkt): Also generate remote-debug
9468 information if noack_mode is set.
9469
9470 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9471
9472 * server.c (handle_query): Report qXfer:siginfo:read and
9473 qXfer:siginfo:write as supported and handle them.
9474 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9475 * linux-low.c (linux_xfer_siginfo): New.
9476 (linux_target_ops): Set it.
9477
9478 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9479
9480 * server.c (gdbserver_usage): Mention --remote-debug.
9481 (main): Accept '--remote-debug' switch.
9482
9483 2009-01-18 Doug Evans <dje@google.com>
9484
9485 * regcache.c (new_register_cache): No need to check result of xcalloc.
9486 * server.c (handle_search_memory): Back out calls to xmalloc,
9487 result is checked and error is returned to user upon failure.
9488 (handle_query): Ditto. Add more checks for result of malloc.
9489 (handle_v_cont): Check result of malloc, report error back to
9490 user upon failure.
9491 (handle_v_run): Ditto. Call freeargv.
9492 * server.h (freeargv): Declare.
9493 * utils.c (freeargv): New fn.
9494
9495 2009-01-15 Doug Evans <dje@google.com>
9496
9497 * gdbreplay.c (perror_with_name): Make arg const char *.
9498 * server.h (target_signal_to_name): Make return type const char *.
9499 * thread-db.c (thread_db_err_str): Make return type const char *.
9500 * utils.c (perror_with_name): Make arg const char *.
9501
9502 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9503
9504 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9505 when handling a EXIT_PROCESS_DEBUG_EVENT.
9506
9507 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9508
9509 * gdbreplay.c (gdbreplay_version): Update copyright year.
9510 * server.c (gdbserver_version): Likewise.
9511
9512 2009-01-05 Doug Evans <dje@google.com>
9513
9514 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9515 (handle_extended_wait): Improve comment.
9516
9517 2008-12-13 Doug Evans <dje@google.com>
9518
9519 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9520 * server.h (ATTR_MALLOC): New macro.
9521 (xmalloc,xcalloc,xstrdup): Declare.
9522 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9523 * inferiors.c: Ditto.
9524 * linux-low.c: Ditto.
9525 * mem-break.c: Ditto.
9526 * regcache.c: Ditto.
9527 * remote-utils.c: Ditto.
9528 * server.c: Ditto.
9529 * target.c: Ditto.
9530 * win32-low.c: Ditto.
9531
9532 2008-12-12 Doug Evans <dje@google.com>
9533
9534 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9535 in debugging printf.
9536
9537 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9538
9539 2008-12-09 Doug Evans <dje@google.com>
9540
9541 * linux-low.h (struct process_info): Delete member tid, unused.
9542 * thread-db.c (find_one_thread): Update.
9543 (maybe_attach_thread): Update.
9544
9545 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9546
9547 * target.h (struct target_ops): Add qxfer_osdata member.
9548 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9549 and dirent.h.
9550 (linux_qxfer_osdata): New functions.
9551 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9552 callback.
9553 * server.c (handle_query): Handle "qXfer:osdata:read:".
9554 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9555 (buffer_xml_printf): New functions.
9556 * server.h (struct buffer): New.
9557 (buffer_grow_str, buffer_grow_str0): New macros.
9558 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9559 (buffer_xml_printf): Declare.
9560
9561 2008-11-24 Doug Evans <dje@google.com>
9562
9563 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9564
9565 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9566
9567 * server.c (handle_v_run): Always use the supplied argument list.
9568
9569 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9570
9571 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9572 (xtensa_regmap_table): Add entry for scompare1.
9573
9574 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9575
9576 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9577 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9578 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9579 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9580 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9581 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9582 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9583 XML target descriptions.
9584 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9585 when inferior is running on an ISA 2.05 or later processor. Add
9586 special case to return offset for full 64-bit slot of FPSCR when
9587 in 32-bits.
9588
9589 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9590
9591 * Makefile.in (SFILES, clean): Added sparc64 files.
9592 (reg-sparc64.o, reg-sparc64.c): New.
9593 * configure.srv (sparc*-*-linux*): New configuration.
9594 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9595 syscall arguments for SPARC.
9596 (regsets_store_inferior_registers): Likewise.
9597 * linux-sparc-low.c: New file.
9598
9599 2008-10-21 Doug Evans <dje@google.com>
9600
9601 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9602 (READLINE_DIR,READLINE_DEP): Delete.
9603 (INTERNAL_CFLAGS): Update.
9604 (LINTFLAGS): Update.
9605
9606 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9607
9608 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9609 whole argv from the last run, not just argv[0].
9610
9611 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9612
9613 * regcache.c (new_register_cache): Return NULL if the register
9614 cache size isn't known yet.
9615 (free_register_cache): Avoid dereferencing a NULL regcache.
9616
9617 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * configure.srv: Merge MIPS and MIPS64.
9620
9621 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9622
9623 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9624
9625 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9626
9627 * Makefile.in: Add required vsx dependencies.
9628
9629 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9630 Declare init_registers_powerpc_vsx32l.
9631 Declare init_registers_powerpc_vsx64l.
9632 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9633 (ppc_arch_setup): Check for VSX in hwcap.
9634 (ppc_fill_vsxregset): New function.
9635 (ppc_store_vsxregset): New function.
9636 Add new VSX entry in regset_info target_regsets.
9637
9638 * configure.srv: Add new VSX dependencies.
9639
9640 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9641
9642 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9643 (remote_open): Set or clear transport_is_reliable.
9644 (putpkt_binary): Don't expect acks in noack mode.
9645 (getpkt): Don't send ack/nac in noack mode.
9646 * server.c (handle_general_set): Handle QStartNoAckMode.
9647 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9648 qSupported.
9649 (main): Reset noack_mode on every connection.
9650 * server.h (noack_mode): Declare.
9651
9652 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9653
9654 * Makefile.in (GDBREPLAY_OBS): New variable.
9655 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9656
9657 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9658 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9661 (usr_store_inferior_registers): Likewise.
9662 (regsets_store_inferior_registers): Likewise.
9663
9664 2008-07-31 Rolf Jansen <rj@surtec.com>
9665 Pedro Alves <pedro@codesourcery.com>
9666
9667 * configure.ac: Check for memmem declaration.
9668 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9669 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9670 (disable_packet_qfThreadInfo): Unconditionally compile.
9671 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9672 * configure, config.in: Regenerate.
9673
9674 2008-07-28 Doug Kwan <dougkwan@google.com>
9675
9676 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9677 (linux_write_memory): Remove declaration of errno.
9678
9679 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9680
9681 * linux-low.c (handle_extended_wait): Do not use "status"
9682 variable uninitialized.
9683
9684 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9685
9686 * server.c (handle_v_attach): Inhibit reporting dll changes.
9687
9688 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9689
9690 * remote-utils.c (prepare_resume_reply): If requested, don't
9691 output "thread:TID" in the T stop reply.
9692
9693 * server.c (disable_packet_vCont, disable_packet_Tthread)
9694 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9695 (handle_query): If requested, disable support for qC, qfThreadInfo
9696 and qsThreadInfo.
9697 (handle_v_requests): If requested, disable support for vCont.
9698 (gdbserver_show_disableable): New.
9699 (main): Handle --disable-packet and --disable-packet=LIST.
9700
9701 * server.h (disable_packet_vCont, disable_packet_Tthread)
9702 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9703
9704 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9705
9706 * server.c (gdbserver_usage): Mention --version.
9707
9708 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9709
9710 * Makefile.in (gdbreplay.o): New rule.
9711
9712 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9713
9714 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9715 message, not gdbserver.
9716
9717 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9718 Nathan Sidwell <nathan@codesourcery.com>
9719 Joseph Myers <joseph@codesourcery.com>
9720
9721 * acinclude.m4: Include ../../config/acx.m4.
9722 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9723 * configure, config.in: Regenerate.
9724 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9725 * server.c (gdbserver_version): Print PKGVERSION.
9726 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9727 (main): Adjust gdbserver_usage calls.
9728 * gdbreplay.c (version, host_name): Add declarations.
9729 (gdbreplay_version, gdbreplay_usage): New.
9730 (main): Accept --version and --help options.
9731
9732 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9733
9734 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9735 (arm_breakpoint_at): Handle Thumb.
9736 (the_low_target): Add comment.
9737
9738 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9739
9740 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9741
9742 2008-05-09 Doug Evans <dje@google.com>
9743
9744 * server.h (decode_search_memory_packet): Declare.
9745 * remote-utils.c (decode_search_memory_packet): New fn.
9746 * server.c (handle_search_memory_1): New fn.
9747 (handle_search_memory): New fn.
9748 (handle_query): Process qSearch:memory packets.
9749
9750 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9751
9752 * regcache.c (registers_length): Remove.
9753 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9754 full register packet.
9755 * regcache.h (registers_length): Remove prototype.
9756 * server.h (PBUFSIZ): Define to 16384.
9757
9758 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9759
9760 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9761 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9762 powerpc-64l.o, and powerpc-altivec64l.o.
9763 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9764 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9765 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9766 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9767 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9768 to srv_xmlfiles.
9769
9770 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9771 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9772 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9773 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9774 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9775 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9776 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9777 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9778 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9779 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9780 (clean): Update.
9781
9782 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9783 (init_registers_powerpc_32l): ... this new prototype.
9784 (init_registers_powerpc_32): Remove, replace by ...
9785 (init_registers_powerpc_altivec32l): ... this new prototype.
9786 (init_registers_powerpc_e500): Remove, replace by ...
9787 (init_registers_powerpc_e500l): ... this new prototype.
9788 (init_registers_ppc64): Remove, replace by ...
9789 (init_registers_powerpc_64l): ... this new prototype.
9790 (init_registers_powerpc_64): Remove, replace by ...
9791 (init_registers_powerpc_altivec64l): ... this new prototype.
9792 (ppc_num_regs): Set to 73.
9793 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9794 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9795 (ppc_cannot_store_register): Handle orig_r3 and trap.
9796 (ppc_arch_setup): Update init_registers_... calls.
9797 (ppc_fill_gregset): Handle orig_r3 and trap.
9798
9799 * inferiors.c (clear_inferiors): Reset current_inferior.
9800
9801 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9802
9803 * acinclude.m4: Add override.m4.
9804 * configure: Regenerate.
9805
9806 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9807
9808 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9809 initial call to init_register_ppc64.
9810
9811 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9812
9813 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9814 single powerpc*-*-linux* case.
9815 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9816
9817 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9818
9819 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9820 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9821 from reg_xmlfiles.
9822 * linux-ppc-low.c: Include <elf.h>.
9823 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9824 (ppc_hwcap): New global variable.
9825 (ppc_regmap): Remove __SPE__ #ifdef sections.
9826 (ppc_regmap_e500): New global variable.
9827 (ppc_cannot_store_register): Update __SPE__ special case.
9828 (ppc_get_hwcap): New function.
9829 (ppc_arch_setup): Use it to determine whether inferior supports
9830 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9831 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9832 Do not access registers if target does not support AltiVec.
9833 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9834 Do not access registers if target does not support SPE.
9835 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9836
9837 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9838
9839 * linux-low.c (disabled_regsets, num_regsets): New.
9840 (use_regsets_p): Delete.
9841 (linux_wait_for_process): Clear disabled_regsets.
9842 (regsets_fetch_inferior_registers): Check and set it.
9843 (regsets_store_inferior_registers): Likewise.
9844 (linux_fetch_registers, linux_store_registers): Do not use
9845 use_regsets_p.
9846 (initialize_low): Allocate disabled_regsets.
9847
9848 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * Makefile.in (LIBOBJS): New.
9851 (OBS): Use LIBOBJS.
9852 (memmem.o): New rule.
9853 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9854 * configure: Regenerated.
9855
9856 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9857
9858 * server.c (handle_query): Never return "unsupported" for
9859 qXfer:features:read queries.
9860
9861 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9862
9863 * server.c (get_features_xml): Fix inverted condition.
9864 (handle_query): Always support qXfer:feature:read.
9865
9866 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9867
9868 * server.c (wrapper_argv): New.
9869 (start_inferior): Handle wrapper_argv. If set, expect an extra
9870 trap.
9871 (gdbserver_usage): Document --wrapper.
9872 (main): Parse --wrapper.
9873
9874 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9875
9876 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9877 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9878 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9879 (ppc_set_pc): Likewise.
9880 (ppc_arch_setup): New function.
9881 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9882 of collect_register.
9883 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9884
9885 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9886
9887 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9888 instead of linux-ppc64-low.o.
9889 * linux-ppc64-low.c: Remove file.
9890 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9891 (linux-ppc64-low.o): Remove rule.
9892
9893 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9894 (init_registers_powerpc_64): Likewise.
9895 (ppc_regmap): Conditionally define depending on __powerpc64__.
9896 (ppc_cannot_store_register): Do not special-case "fpscr" when
9897 compiled on __powerpc64__.
9898 (ppc_collect_ptrace_register): New function.
9899 (ppc_supply_ptrace_register): New function.
9900 (ppc_breakpoint): Change type to "unsigned int".
9901 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9902 (the_low_target): Conditionally provide initializers for the
9903 arch_setup member depending on __powerpc64__. Install
9904 collect_ptrace_register and supply_ptrace_register members.
9905
9906 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9907
9908 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9909 * server.c (gdbserver_xmltarget): Define.
9910 (get_features_xml): Use it to replace "target.xml" and arch_string.
9911
9912 * configure.srv: Remove srv_xmltarget. Add XML files that were
9913 mentioned there to srv_xmlfiles instead. Remove conditional tests
9914 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9915 srv_xmlfiles and srv_regobj to include all possible choices.
9916 * configure.ac (srv_xmltarget): Remove.
9917 (srv_xmlfiles): Do not add "target.xml".
9918 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9919 checks for supplementary target information.
9920 * configure: Regenerate.
9921 * Makefile.in (XML_TARGET): Remove.
9922 (target.xml): Remove rule.
9923 (clean): Do not clean up target.xml.
9924 (.PRECIOUS): Do not mention target.xml.
9925
9926 * target.h (struct target_ops): Remove arch_string member.
9927 * linux-low.c (linux_arch_string): Remove.
9928 (linux_target_ops): Remove arch_string initializer.
9929 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9930 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9931 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9932 * spu-low.c (spu_arch_string): Remove.
9933 (spu_target_ops): Remove arch_string initializer.
9934 * win32-low.c (win32_arch_string): Remove.
9935 (win32_target_ops): Remove arch_string initializer.
9936 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9937 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9938 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9939
9940 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9941
9942 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9943 by collect_ptrace_register and supply_ptrace_register hooks.
9944 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9945 instead of checking for the_low_target.left_pad_xfer.
9946 (usr_store_inferior_registers): Use collect_ptrace_register callback
9947 instead of checking for the_low_target.left_pad_xfer.
9948
9949 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9950 (s390_supply_ptrace_register): Likewise.
9951 (s390_fill_gregset): Call s390_collect_ptrace_register.
9952 (the_low_target): Update.
9953
9954 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9955 (ppc_supply_ptrace_register): Likewise.
9956 (the_low_target): Update.
9957
9958 * linux-i386-low.c (the_low_target): Update.
9959 * linux-x86-64-low.c (the_low_target): Update.
9960
9961 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9962
9963 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9964 reg-s390.o and reg-s390x.o.
9965
9966 * linux-low.c (new_inferior): New global variable.
9967 (linux_create_inferior, linux_attach): Set it.
9968 (linux_wait_for_process): Call the_low_target.arch_setup after the
9969 target has stopped for the first time.
9970 (initialize_low): Do not call the_low_target.arch_setup.
9971
9972 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9973 (s390_set_pc): Likewise.
9974 (s390_arch_setup): New function.
9975 (the_low_target): Use s390_arch_setup as arch_setup routine.
9976
9977 * regcache.c (realloc_register_cache): New function.
9978 (set_register_cache): Call it for each existing regcache.
9979
9980 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9981
9982 * server.h (init_registers): Remove prototype.
9983
9984 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9985 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9986 instead of init_registers ().
9987 * linux-arm-low.c (init_registers_arm): Add prototype.
9988 (init_registers_arm_with_iwmmxt): Likewise.
9989 (the_low_target): Add initializer for arch_setup field.
9990 * linux-cris-low.c (init_registers_cris): Add prototype.
9991 (the_low_target): Add initializer for arch_setup field.
9992 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9993 (the_low_target): Add initializer for arch_setup field.
9994 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9995 (the_low_target): Add initializer for arch_setup field.
9996 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9997 (the_low_target): Add initializer for arch_setup field.
9998 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9999 (the_low_target): Add initializer for arch_setup field.
10000 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10001 (the_low_target): Add initializer for arch_setup field.
10002 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10003 (init_registers_mips64_linux): Likewise.
10004 (the_low_target): Add initializer for arch_setup field.
10005 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10006 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10007 (the_low_target): Add initializer for arch_setup field.
10008 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10009 (init_registers_powerpc_64): Likewise.
10010 (the_low_target): Add initializer for arch_setup field.
10011 * linux-s390-low.c (init_registers_s390): Add prototype.
10012 (init_registers_s390x): Likewise.
10013 (the_low_target): Add initializer for arch_setup field.
10014 * linux-sh-low.c (init_registers_sh): Add prototype.
10015 (the_low_target): Add initializer for arch_setup field.
10016 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10017 (the_low_target): Add initializer for arch_setup field.
10018 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10019 (the_low_target): Add initializer for arch_setup field.
10020
10021 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10022 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10023 instead of init_registers ().
10024 * win32-arm-low.c (init_registers_arm): Add prototype.
10025 (the_low_target): Add initializer for arch_setup field.
10026 * win32-i386-low.c (init_registers_i386): Add prototype.
10027 (the_low_target): Add initializer for arch_setup field.
10028
10029 * spu-low.c (init_registers_spu): Add prototype.
10030 (initialize_low): Call initialie_registers_spu () instead of
10031 initialize_registers ().
10032
10033 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10034
10035 * server.c (handle_v_requests): When handling the vRun and vAttach
10036 packets, if already debugging a process, don't kill it. Return an
10037 error instead.
10038
10039 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10040
10041 * server.c (handle_query): Correct length check.
10042
10043 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10044
10045 * win32-low.c (do_initial_child_stuff): Add process handle
10046 parameter. Set current_process_handle and current_process_id from the
10047 parameters. Clear globals.
10048 (win32_create_inferior): Don't set current_process_handle and
10049 current_process_id here. Instead pass them on the call to
10050 do_initial_child_stuff.
10051 (win32_attach): Likewise.
10052 (win32_clear_inferiors): New.
10053 (win32_kill): Don't close the current process handle or the
10054 current thread handle here. Instead call win32_clear_inferiors.
10055 (win32_detach): Don't open a new handle to the process. Call
10056 win32_clear_inferiors.
10057 (win32_join): Don't rely on current_process_handle; open a new
10058 handle using the process id.
10059 (win32_wait): Call win32_clear_inferiors when the inferior process
10060 has exited.
10061
10062 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10063
10064 * server.c (monitor_show_help): Add "exit".
10065
10066 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10067
10068 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10069 (clean): Add reg-xtensa.c.
10070 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10071 * configure.srv (xtensa*-*-linux*) New target.
10072 * linux-xtensa-low.c: New.
10073 * xtensa-xtregs.c: New.
10074
10075 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10076
10077 * hostio.c: Don't include errno.h.
10078 (errno_to_fileio_errno): Move to hostio-errno.
10079 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10080 error number outputting to the target->hostio_last_error callback.
10081 (hostio_packet_error): Use FILEIO_EINVAL directly.
10082 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10083 calls to hostio_error.
10084 * hostio-errno.c: New.
10085 * server.h (hostio_last_error_from_errno): Declare.
10086 * target.h (target_ops): Add hostio_last_error member.
10087 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10088 as hostio_last_error handler.
10089 * spu-low.c (spu_target_ops): Likewise.
10090 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10091 (wince_hostio_last_error): New functions.
10092 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10093 as hostio_last_error handler.
10094 (win32_target_ops) [!_WIN32_WCE]: Register
10095 hostio_last_error_from_errno as hostio_last_error handler.
10096 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10097 (hostio-errno.o): New rule.
10098 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10099 * configure.srv (srv_hostio_err_objs): New variable. Default to
10100 hostio-errno.o.
10101 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10102 * configure: Regenerate.
10103
10104 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10105
10106 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10107 (linux_kill, linux_detach): Clean up the process list.
10108 * remote-utils.c (remote_open): Improve port number parsing.
10109 (putpkt_binary, input_interrupt): Only send interrupts if the target
10110 is running.
10111 * server.c (extended_protocol): Make static.
10112 (attached): Define earlier.
10113 (exit_requested, response_needed, program_argv): New variables.
10114 (target_running): New.
10115 (start_inferior): Clear attached here.
10116 (attach_inferior): Set attached here.
10117 (require_running): Define.
10118 (handle_query): Use require_running and target_running. Implement
10119 "monitor exit".
10120 (handle_v_attach, handle_v_run): New.
10121 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10122 (gdbserver_usage): Update.
10123 (main): Redo argument parsing. Handle --debug and --multi. Handle
10124 --attach along with other options or after the port. Save
10125 program_argv. Support no initial program. Resynchronize
10126 communication with GDB after an error. Handle "monitor exit".
10127 Use require_running and target_running. Always allow the extended
10128 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10129 restart in extended mode.
10130 * README: Refer to the GDB manual. Update --attach usage.
10131
10132 2007-12-20 Andreas Schwab <schwab@suse.de>
10133
10134 * linux-low.c (STACK_SIZE): Define.
10135 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10136 (linux_test_for_tracefork): Likewise.
10137
10138 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * linux-low.c (linux_wait_for_event): Update messages. Do not
10141 reinsert auto-delete breakpoints.
10142 * mem-break.c (struct breakpoint): Change return type of handler to
10143 int.
10144 (set_breakpoint_at): Update handler type.
10145 (reinsert_breakpoint_handler): Return 1 instead of calling
10146 delete_breakpoint.
10147 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10148 setting a new one.
10149 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10150 * mem-break.h (set_breakpoint_at): Update handler type.
10151 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10152 * win32-low.c (auto_delete_breakpoint): New.
10153 (get_child_debug_event): Use it.
10154
10155 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * configure.ac: Check for pread and pwrite.
10158 * hostio.c (handle_pread): Fall back to lseek and read.
10159 (handle_pwrite): Fall back to lseek and write.
10160 * config.in, configure: Regenerated.
10161
10162 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10163
10164 * server.c (myresume): Add own_buf argument.
10165 (main): Update calls.
10166
10167 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10168
10169 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10170 * remote-utils.c (remote_open): Do not call disable_async_io.
10171 (block_async_io): Delete.
10172 (unblock_async_io): Make static.
10173 (initialize_async_io): New.
10174 * server.c (handle_v_cont): Handle async I/O here.
10175 (myresume): Likewise. Move other common resume tasks here...
10176 (main): ... from here. Call initialize_async_io. Disable async
10177 I/O before the main loop.
10178 * server.h (initialize_async_io): Declare.
10179 (block_async_io, unblock_async_io): Delete prototypes.
10180 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10181
10182 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10183
10184 * remote-utils.c (readchar): Allow binary data in received messages.
10185
10186 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10187
10188 * win32-low.c (attaching): New global.
10189 (win32_create_inferior): Clear the `attaching' global.
10190 (win32_attach): Set the `attaching' global.
10191 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10192 attaching. Only set a breakpoint at the entry point if not
10193 attaching.
10194
10195 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10196
10197 * server.c (main): Don't report dll events on the initial
10198 connection on attaches.
10199
10200 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10201
10202 * server.c (main): Relax numerical bases supported for the pid of
10203 the --attach command line argument.
10204
10205 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10206
10207 * win32-low.c (win32_attach): Call OpenProcess before
10208 DebugActiveProcess, not after. Add last error output to error
10209 call.
10210
10211 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10212
10213 * win32-low.c (win32_get_thread_context)
10214 (win32_set_thread_context): New functions.
10215 (thread_rec): Use win32_get_thread_context.
10216 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10217 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10218 field.
10219
10220 2007-12-03 Leo Zayas
10221 Pedro Alves <pedro_alves@portugalmail.pt>
10222
10223 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10224 global variables.
10225 (child_add_thread): Minor cleanup.
10226 (child_continue): Resume artificially suspended threads before
10227 calling ContinueDebugEvent.
10228 (suspend_one_thread): New.
10229 (fake_breakpoint_event): New.
10230 (get_child_debug_event): Change return type to int. Check here if
10231 gdb sent an interrupt request. If a soft interrupt was requested,
10232 fake a breakpoint event. Return 0 if there is no event to handle,
10233 and 1 otherwise.
10234 (win32_wait): Don't check here if gdb sent an interrupt request.
10235 Ensure there is a valid event to handle.
10236 (win32_request_interrupt): Add soft interruption method as last
10237 resort.
10238
10239 2007-12-03 Leo Zayas
10240 Pedro Alves <pedro_alves@portugalmail.pt>
10241
10242 * win32-low.h (win32_thread_info): Add descriptions to the
10243 structure members. Replace `suspend_count' counter by a
10244 `suspended' flag.
10245 * win32-low.c (thread_rec): Update condition of when to get the
10246 context from the inferior. Rely on ContextFlags being set if it
10247 has already been retrieved. Only suspend the inferior thread if
10248 we haven't already. Warn if that fails.
10249 (continue_one_thread): s/suspend_count/suspended/. Only call
10250 ResumeThread once. Warn if that fails.
10251
10252 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10253
10254 * win32-low.c (win32_wait): Don't read from the inferior when it
10255 has already exited.
10256
10257 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10258
10259 * Makefile.in (win32_low_h): New variable.
10260 (win32-low.o): Add dependency on $(win32_low_h).
10261 (win32-arm-low.o, win32-i386-low.o): New rules.
10262
10263 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * hostio.c: Correct copyright year.
10266
10267 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10268
10269 * Makefile.in (OBS): Add hostio.o.
10270 (hostio.o): New rule.
10271 * server.h (handle_vFile): Declare.
10272 * hostio.c: New file.
10273 * server.c (handle_v_requests): Take packet_len and new_packet_len
10274 for binary packets. Call handle_vFile.
10275 (main): Update call to handle_v_requests.
10276
10277 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10278
10279 * linux-low.c: Include <sched.h>.
10280
10281 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * linux-low.c (linux_tracefork_grandchild): New.
10284 (linux_tracefork_child): Use clone.
10285 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10286
10287 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10288
10289 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10290
10291 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10294
10295 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10296
10297 * inferiors.c (change_inferior_id): Delete.
10298 (add_pid_to_list, pull_pid_from_list): New.
10299 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10300 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10301 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10302 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10303 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10304 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10305 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10306 (using_threads): Always set to 1.
10307 (handle_extended_wait): New.
10308 (add_process): Do not set TID.
10309 (linux_create_inferior): Set must_set_ptrace_flags.
10310 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10311 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10312 (linux_thread_alive): Rename TID argument to LWPID.
10313 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10314 (linux_wait_for_event): Do not use TID or check using_threads. Update
10315 call to dead_thread_notify. Call handle_extended_wait.
10316 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10317 (send_sigstop): Delete sigstop_sent.
10318 (wait_for_sigstop): Avoid TID.
10319 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10320 (linux_test_for_tracefork): New.
10321 (linux_lookup_signals): Use thread_db_active and
10322 linux_supports_tracefork_flag.
10323 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10324 * linux-low.h (get_process_thread): Avoid TID.
10325 (struct process_ifo): Move thread_known and tid to the end. Remove
10326 sigstop_sent.
10327 (linux_attach_lwp, thread_db_init): Update prototypes.
10328 * server.h (change_inferior_id): Delete prototype.
10329 (add_pid_to_list, pull_pid_from_list): New prototypes.
10330 * thread-db.c (thread_db_use_events): New.
10331 (find_first_thread): Rename to...
10332 (find_one_thread): ...this. Update callers and messages. Do not
10333 call fatal. Check thread_db_use_events. Do not call
10334 change_inferior_id or new_thread_notify.
10335 (maybe_attach_thread): Update. Do not call new_thread_notify.
10336 (thread_db_init): Set thread_db_use_events. Check use_events.
10337 * utils.c (fatal, warning): Correct message prefix.
10338
10339 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10340
10341 * Makefile.in (clean): Remove new files.
10342 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10343 (powerpc-64.o, powerpc-64.c): New rules.
10344 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10345 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10346 with SPE.
10347 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10348 SPE targets.
10349 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10350 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10351 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10352 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10353 (target_regsets): Add AltiVec and SPE register sets.
10354 * configure.ac: Check for AltiVec and SPE.
10355 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10356 (ppc_fill_vrregset, ppc_store_vrregset): New.
10357 (target_regsets): Add AltiVec register set.
10358 * configure: Regenerated.
10359
10360 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10361
10362 * linux-low.c (O_LARGEFILE): Define.
10363 (linux_read_memory): Use /proc/PID/mem.
10364 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10365 * configure, config.in: Regenerated.
10366
10367 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * linux-low.c (linux_wait_for_event): Do not pass signals while
10370 single-stepping.
10371
10372 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10373
10374 * win32-low.c (create_process): New.
10375 (win32_create_inferior): Use create_process instead of
10376 CreateProcess. If create_process failed retry appending an ".exe"
10377 suffix. Store the GetLastError result immediatelly after
10378 create_process calls and use it on the call to error.
10379
10380 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10381
10382 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10383
10384 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10385
10386 * configure.ac: Switch license to GPLv3.
10387
10388 2007-08-01 Michael Snyder <msnyder@access-company.com>
10389
10390 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10391
10392 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10393
10394 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10395 typedef.
10396 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10397 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10398 CloseToolhelp32Snapshot.
10399 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10400 CloseToolhelp32Snapshot.
10401
10402 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10403
10404 * server.c (main): Check for inferior exit before main loop.
10405
10406 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10407
10408 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10409 instead of on tmp_desc.
10410
10411 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10412 Daniel Jacobowitz <dan@codesourcery.com>
10413
10414 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10415 (add_thread): Minor cleanups.
10416 (clear_inferiors): Move lower in the file. Clear the DLL
10417 list.
10418 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10419 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10420 (xml_escape_text): New.
10421 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10422 for qSupported.
10423 (handle_v_cont): Report errors.
10424 (gdbserver_version): Update.
10425 (main): Correct size of own_buf. Do not report initial DLL events.
10426 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10427 (unloaded_dll, xml_escape_text): New.
10428 * win32-low.c (enum target_waitkind): Update comments.
10429 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10430 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10431 (win32_EnumProcessModules, win32_GetModuleInformation)
10432 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10433 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10434 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10435 (win32_Module32First, win32_Module32Next, load_toolhelp)
10436 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10437 (get_child_debug_event): Handle DLL events.
10438 (win32_wait): Likewise.
10439
10440 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10441
10442 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10443 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10444
10445 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10446
10447 * win32-low.c (handle_output_debug_string): Ignore event if not
10448 waiting.
10449
10450 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10451
10452 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10453
10454 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10455
10456 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10457
10458 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * inferiors.c (change_inferior_id): Add comment.
10461 * linux-low.c (check_removed_breakpoint): Add an early
10462 prototype. Improve debug output.
10463 (linux_attach): Doc update.
10464 (linux_detach_one_process, linux_detach): Clean up before releasing
10465 each process.
10466 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10467 * linux-low.h (struct process_info): Doc improvement.
10468 * mem-break.c (delete_all_breakpoints): New.
10469 * mem-break.h (delete_all_breakpoints): New prototype.
10470 * thread-db.c (find_first_thread): New.
10471 (thread_db_create_event): Call it instead of
10472 thread_db_find_new_threads. Clean up unused variables.
10473 (maybe_attach_thread): Remove first thread handling.
10474 (thread_db_find_new_threads): Use find_first_thread.
10475 (thread_db_get_tls_address): Likewise.
10476
10477 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10478
10479 * thread-db.c (thread_db_find_new_threads): Add prototype.
10480 (thread_db_create_event): Check for the main thread before adding
10481 a new thread.
10482 (maybe_attach_thread): Only enable event reporting if TID == 0.
10483 (thread_db_get_tls_address): Check for new threads.
10484
10485 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10486
10487 * linux-low.c (linux_create_inferior): Try execv before execvp.
10488 * spu-low.c (spu_create_inferior): Likewise.
10489
10490 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10491
10492 * linux-low.c (linux_create_inferior): Change execv to execvp.
10493 * spu-low.c (spu_create_inferior): Likewies.
10494
10495 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10496
10497 * Makefile.in (clean): Clean new files instead of deleted ones.
10498 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10499 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10500 rules.
10501 * configure.srv: Specify XML files and new regformats for MIPS and
10502 MIPS64 GNU/Linux.
10503 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10504 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10505 an entry for the restart register.
10506 (mips_cannot_fetch_register, mips_cannot_store_register)
10507 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10508 register names to match the XML descriptions.
10509 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10510 restart register instead of $0.
10511
10512 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10513 Markus Deuling <deuling@de.ibm.com>
10514
10515 * remote-utils.c (decode_xfer_write): New function.
10516 * server.h (decode_xfer_write): Add prototype.
10517 * server.c (handle_query): Add PACKET_LEN argument. Support
10518 qXfer:spu:read and qXfer:spu:write packets.
10519 (main): Pass packet_len to handle_query.
10520 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10521 * target.h (target_ops): Add qxfer_spu.
10522
10523 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10524
10525 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10526 accessing non-seekable spufs files.
10527
10528 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10529
10530 * server.c (handle_query): Add reply for qC packet.
10531
10532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10533 Leo Zayas <lerele@champenstudios@com>
10534
10535 * server.h (check_remote_input_interrupt_request): New function.
10536 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10537 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10538 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10539 (check_remote_input_interrupt_request): New function.
10540 * server.h (check_remote_input_interrupt_request): Declare.
10541 * win32-low.c (winapi_DebugBreakProcess,
10542 winapi_GenerateConsoleCtrlEvent): New typedefs.
10543 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10544 to 250 ms.
10545 (win32_wait): Check for remote interrupt request
10546 with check_remote_input_interrupt_request.
10547 (win32_request_interrupt): New function.
10548 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10549
10550 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10551
10552 * win32-low.c (debug_registers_changed,
10553 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10554 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10555 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10556 (thread_rec): Get context using the low target.
10557 (child_add_thread): Call thread_added on the low target,
10558 which does the same thing.
10559 (regptr): Delete.
10560 (do_initial_child_stuff): Remove debug registers references.
10561 Set context using the low target. Resume threads after
10562 setting the contexts.
10563 (child_continue): Remove dead variable. Remove debug
10564 registers references.
10565 (child_fetch_inferior_registers): Go through the low target.
10566 (do_child_store_inferior_registers): Remove.
10567 (child_store_inferior_registers): Go through the low target.
10568 (win32_resume): Remove debug registers references.
10569 Set context using the low target.
10570 (handle_exception): Change return type to void. Don't record
10571 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10572 first chance exception.
10573 (get_child_debug_event): Change return type to void. Remove
10574 goto loop. Always return after waiting for debug event.
10575 (win32_wait): Convert to switch statement. Handle spurious
10576 events.
10577
10578 * win32-i386-low.c (debug_registers_changed,
10579 debug_registers_used): New.
10580 (initial_stuff): Rename to ...
10581 (i386_initial_stuff): ... this. Clear debug registers
10582 state variables.
10583 (store_debug_registers): Delete.
10584 (i386_get_thread_context): New.
10585 (load_debug_registers): Delete.
10586 (i386_set_thread_context): New.
10587 (i386_thread_added): New.
10588 (single_step): Rename to ...
10589 (i386_single_step): ... this.
10590 (do_fetch_inferior_registers): Rename to ...
10591 (i386_fetch_inferior_register): ... this.
10592 (i386_store_inferior_register): New.
10593 (the_low_target): Adapt to new interface.
10594
10595 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10596 (arm_get_thread_context): New.
10597 (arm_set_thread_context): New.
10598 (regptr): New.
10599 (do_fetch_inferior_registers): Rename to ...
10600 (arm_fetch_inferior_register): ... this.
10601 (arm_store_inferior_register): New.
10602 (arm_wince_breakpoint): Reimplement as unsigned long.
10603 (arm_wince_breakpoint_len): Define.
10604 (the_low_target): Adapt to new interface.
10605
10606 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10607 load_debug_registers. Add get_thread_context, set_thread_context,
10608 thread_added and store_inferior_register. Rename
10609 fetch_inferior_registers to fetch_inferior_register.
10610 (regptr): Remove declaration.
10611
10612 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10613
10614 * linux-low.c (linux_detach): Change return type to int. Return 0.
10615 * spu-low.c (spu_detach): Likewise.
10616
10617 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10618
10619 * target.h (target_ops): Change return type of detach to int.
10620 Add join.
10621 (join_inferior): New.
10622 * server.c (main): Don't skip detach support on mingw32.
10623 If the inferior doesn't support detaching return error.
10624 Call join_inferior instead of using waitpid.
10625 * linux-low.c (linux_join): New.
10626 (linux_target_op): Add linux_join.
10627 * spu-low.c (spu_join): New.
10628 (spu_target_ops): Add spu_join.
10629 * win32-low.c (win32_detach): Adapt to new interface.
10630 Reopen current_process_handle before detaching. Issue a child
10631 resume before detaching.
10632 (win32_join): New.
10633 (win32_target_op): Add win32_join.
10634
10635 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10636
10637 * win32-low.c (win32-attach): Fix return value.
10638 * target.h (target_ops): Describe ATTACH return values.
10639
10640 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10641
10642 * win32-low.c (GETPROCADDRESS): Define.
10643 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10644 (winapi_DebugSetProcessKillOnExit): Likewise.
10645 (win32_create_inferior): Force usage of ansi CreateProcessA.
10646 (win32_attach): Use GETPROCADDRESS.
10647 (win32_detach): Likewise.
10648
10649 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10650
10651 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10652
10653 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10654
10655 * win32-low.c: Commit leftover changes from 2007-03-29.
10656
10657 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10658
10659 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10660 fields short instead of int. Add explicit padding.
10661 (i387_cache_to_fsave): Remove unnecessary casts.
10662 (i387_fsave_to_cache): Doc fix.
10663 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10664
10665 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10666
10667 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10668 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10669
10670 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10671
10672 * configure.srv (arm*-*-mingw32ce*): Move near the other
10673 arm targets.
10674
10675 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10676
10677 * configure.ac: Add errno checking.
10678 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10679 sys/file.h and malloc.h.
10680 (AC_CHECK_DECLS): Add perror.
10681 (srv_mingwce): Handle.
10682 * configure.srv (i[34567]86-*-cygwin*): Add
10683 win32-i386-low.o to srv_tgtobj.
10684 (i[34567]86-*-mingw*): Likewise.
10685 (arm*-*-mingw32ce*): Add case.
10686 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10687 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10688 [__MINGW32CE__] (strerror): New function.
10689 [__MINGW32CE__] (errno): Define to GetLastError.
10690 [__MINGW32CE__] (COUNTOF): New macro.
10691 (remote_open): Remove extra close call.
10692 * mem-break.c (delete_breakpoint_at): New function.
10693 * mem-break.h (delete_breakpoint_at): Declare.
10694 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10695 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10696 [USE_WIN32API] (read, write): Add char* casts.
10697 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10698 * server.h: Include wincecompat.h on Windows CE.
10699 [HAVE_ERRNO_H]: Check.
10700 (perror): Declare if not declared.
10701 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10702 (perror_with_name): Remove errno declaration.
10703 * wincecompat.h: New.
10704 * wincecompat.c: New.
10705 * win32-low.h: New.
10706 * win32-arm-low.c: New.
10707 * win32-i386-low.c: New.
10708 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10709 (OUTMSG2): Make it safe.
10710 (_T): New macro.
10711 (COUNTOF): New macro.
10712 (NUM_REGS): Get it from the low target.
10713 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10714 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10715 (thread_rec): Let low target handle debug registers.
10716 (child_add_thread): Likewise.
10717 (child_init_thread_list): Likewise.
10718 (continue_one_thread): Likewise.
10719 (regptr): New.
10720 (do_child_fetch_inferior_registers): Move to ...
10721 * win32-i386-low.c: ... here, and rename to ...
10722 (do_fetch_inferior_registers): ... this.
10723 * win32-low.c (child_fetch_inferior_registers):
10724 Go through the low target.
10725 (do_child_store_inferior_registers): Use regptr.
10726 (strwinerror): New function.
10727 (win32_create_inferior): Handle Windows CE.
10728 Use strwinerror instead of strerror on Windows error
10729 codes. Add program to the error output.
10730 Don't close the main thread handle on Windows CE.
10731 (win32_attach): Use coredll.dll on Windows CE.
10732 (win32_kill): Close current process and current
10733 thread handles.
10734 (win32_detach): Use coredll.dll on Windows CE.
10735 (win32_resume): Let low target handle debug registers, and
10736 step request.
10737 (handle_exception): Add/Remove initial breakpoint. Avoid
10738 non-existant WSTOPSIG on Windows CE.
10739 (win32_read_inferior_memory): Cast to remove warning.
10740 (win32_arch_string): Go through the low target.
10741 (initialize_low): Call set_breakpoint_data with the low
10742 target's breakpoint.
10743 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10744 FOP_REGNUM, mappings): Move to ...
10745 * win32-i386-low.c: ... here.
10746 * win32-low.c (win32_thread_info): Move to ...
10747 * win32-low.h: ... here.
10748 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10749 win32-arm-low.c and wincecompat.c.
10750 (all:): Add $EXEEXT.
10751 (install-only:): Likewise.
10752 (gdbserver:): Likewise.
10753 (gdbreplay:): Likewise.
10754 * config.in: Regenerate.
10755 * configure: Regenerate.
10756
10757 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10758
10759 * win32-low.c: Rename typedef thread_info to
10760 win32_thread_info throughout.
10761
10762 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10763
10764 * win32-i386-low.c: Rename to ...
10765 * win32-low.c: ... this.
10766 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10767 * Makefile.in: Likewise.
10768
10769 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10770
10771 * remote-utils.c (monitor_output): Constify msg parameter.
10772 * server.h (monitor_output): Likewise.
10773 * win32-i386-low.c (handle_output_debug_string): New.
10774 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10775 handle_output_debug_string.
10776 (get_child_debug_event): Likewise.
10777
10778 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10779
10780 * server.c (main): Correct strtoul check.
10781
10782 2007-03-27 Jon Ringle <jon@ringle.org>
10783
10784 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10785
10786 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10787
10788 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10789
10790 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10791
10792 * terminal.h: Check HAVE_SGTTY_H.
10793
10794 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10795
10796 * remote-utils.c (remote_open): Print out the assigned port number.
10797
10798 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10799
10800 * remote-utils.c (monitor_output): New function.
10801 * server.c (debug_threads): Define here.
10802 (monitor_show_help): New function.
10803 (handle_query): Handle qRcmd.
10804 (main): Do not handle 'd' packet.
10805 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10806 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10807 of debug_threads.
10808
10809 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10810
10811 * Makefile.in (EXEEXT): New.
10812 (clean): Use $(EXEEXT).
10813
10814 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10815
10816 * target.h (target_ops): Rename send_signal to request_interrupt,
10817 and remove enum target_signal parameter.
10818 * linux-low.c (linux_request_interrupt): Rename from
10819 linux_send_signal, and always send SIGINT.
10820 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10821 and always send SIGINT.
10822 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10823 of send_signal.
10824 (input_interrupt): Likewise.
10825
10826 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10827
10828 * server.c (get_features_xml): Check if target implemented
10829 arch_string.
10830 * win32-i386-low.c (win32_arch_string): New.
10831 (win32_target_ops): Add win32_arch_string as arch_string member.
10832
10833 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10834
10835 * spu-low.c (spu_arch_string): New.
10836 (spu_target_ops): Add spu_arch_string.
10837
10838 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10839
10840 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10841 * configure.ac: Do not check for terminal.h.
10842 * configure, config.in: Regenerated.
10843
10844 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * Makefile.in (OBS): Add $(XML_BUILTIN).
10847 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10848 (clean): Update.
10849 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10850 (arm-with-iwmmxt.c): New.
10851 * config.in, configure: Regenerate.
10852 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10853 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10854 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10855 (arm*-*-linux*): Add iWMMXt and regset support.
10856 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10857 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10858 (arm_store_wmmxregset, target_regsets): New.
10859 * server.c (get_features_xml): Take annex argument. Check builtin
10860 XML documents.
10861 (handle_query): Handle multiple annexes.
10862
10863 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10864
10865 * remote-utils.c [USE_WIN32API] (read, write): Define.
10866 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10867 write.
10868
10869 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10870
10871 * linux-i386-low.c (the_low_target): Set arch_string.
10872 * linux-x86-64-low.c (the_low_target): Likewise.
10873 * linux-low.c (linux_arch_string): New.
10874 (linux_target_ops): Add it.
10875 * linux-low.h (struct linux_target_ops): Add arch_string.
10876 * server.c (write_qxfer_response): Use const void * for DATA.
10877 (get_features_xml): New.
10878 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10879 * target.h (struct target_ops): Add arch_string method.
10880
10881 2007-01-03 Denis Pilat <denis.pilat@st.com>
10882 Daniel Jacobowitz <dan@codesourcery.com>
10883
10884 * linux-low.c (linux_kill): Handle being called with no threads.
10885 * win32-i386-low.c (win32_kill): Likewise.
10886 (get_child_debug_event): Clear current_process_handle.
10887
10888 2006-12-30 Denis PILAT <denis.pilat@st.com>
10889 Daniel Jacobowitz <dan@codesourcery.com>
10890
10891 * remote-utils.c (remote_open): Check the type of specified
10892 serial port devices before opening them.
10893 * server.c (main): Kill the inferior if an error occurs during
10894 the first remote_open.
10895
10896 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10897
10898 * README: Update supported targets.
10899
10900 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10901
10902 * Makefile.in (clean): Remove reg-mips64.c.
10903 (reg-mips64.c, reg-mips64.o): New rules.
10904 * configure.srv: Handle mips64. Include regset support for mips.
10905 * linux-mips-low.c (union mips_register): New.
10906 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10907 (mips_breakpoint, mips_breakpoint_at): Use int.
10908 (mips_collect_register, mips_supply_register)
10909 (mips_collect_register_32bit, mips_supply_register_32bit)
10910 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10911 (mips_store_fpregset, target_regsets): New.
10912 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10913
10914 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10915
10916 * configure.srv: Add target "spu*-*-*".
10917 * Makefile.in (clean): Remove reg-spu.c.
10918 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10919 * spu-low.c: New file.
10920
10921 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10922
10923 * configure.ac: Correct td_thr_tls_get_addr test.
10924 * configure: Regenerated.
10925
10926 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10927
10928 * linux-low.c (linux_wait_for_event): Reformat. Use the
10929 pass_signals array.
10930 * remote-utils.c (decode_address_to_semicolon): New.
10931 * server.c (pass_signals, handle_general_set): New.
10932 (handle_query): Mention QPassSignals for qSupported.
10933 (main): Call handle_general_set.
10934 * server.h (pass_signals, decode_address_to_semicolon): New.
10935
10936 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10937
10938 * server.c (handle_query): Correct error handling for read_auxv.
10939
10940 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10941
10942 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10943 and srv_linux_thread_db to yes.
10944 * linux-s390-low.c (s390_fill_gregset): New function.
10945 (target_regsets): Define data structure.
10946
10947 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10948
10949 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10950 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10951 * config.in, configure: Regenerated.
10952 * inferiors.c (gdb_id_to_thread): New function.
10953 (gdb_id_to_thread_id): Use it.
10954 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10955 * linux-low.h (struct process_info): Add th member.
10956 (thread_db_get_tls_address): New prototype.
10957 * remote-utils.c (decode_address): Make non-static.
10958 * server.c (handle_query): Handle qGetTLSAddr.
10959 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10960 * target.h (struct target_ops): Add get_tls_address.
10961 * thread-db.c (maybe_attach_thread): Save the thread handle.
10962 (thread_db_get_tls_address): New.
10963
10964 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10965
10966 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10967 (linux_resume_one_process): Take a siginfo_t *. Update all
10968 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10969 (struct pending_signals): Add a siginfo_t.
10970 (linux_wait_for_process): Always set last_status.
10971 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10972 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10973 * linux-low.h (struct process_info): Add last_status.
10974
10975 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10976
10977 * remote-utils.c (try_rle): New function.
10978 (putpkt_binary): Use it.
10979
10980 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10981
10982 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10983 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10984 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10985 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10986 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10987 point registers.
10988
10989 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10990
10991 * server.c (terminal_fd): New variable.
10992 (old_foreground_pgrp): Likewise.
10993 (restore_old_foreground_pgrp): New function.
10994 (start_inferior): Record the terminal file descriptor in terminal_fd
10995 and its original foreground group in old_foreground_pgrp. Register
10996 restore_old_foreground_pgrp with atexit().
10997
10998 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * server.c (handle_query): Correct qPart to qXfer.
11001
11002 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11003
11004 * configure.ac: Check for more headers which are missing on
11005 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11006 * configure.srv: Add Cygwin and mingw32.
11007 * remote-utils.c: Don't include headers unconditionally which
11008 are missing on mingw32. Include <winsock.h> for mingw32.
11009 (remote_open): Adjust for mingw32 support. Flush
11010 standard error after writing to it.
11011 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11012 (unblock_async_io, enable_async_io, disable_async_io)
11013 (readchar, getpkt): Update for Winsock support.
11014 (prepare_resume_reply): Expect a protocol signal number.
11015 * server.c: Disable <sys/wait.h> on mingw32.
11016 (start_inferior): Adjust for mingw32 support. Flush
11017 standard error after writing to it.
11018 (attach_inferior): Likewise. Use protocol signal
11019 numbers.
11020 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11021 and names.
11022 * win32-i386-low.c: New file.
11023 * Makefile.in (XM_CLIBS): Set.
11024 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11025 (win32-i386-low.o): New dependency rule.
11026 * linux-low.c (linux_wait): Use target signal numbers.
11027 * target.h (struct target_ops): Doc fix.
11028 * server.h (target_signal_to_name): New prototype.
11029 * gdbreplay.c: Don't include headers unconditionally which
11030 are missing on mingw32. Include <winsock.h> for mingw32.
11031 (remote_close, remote_open): Adjust for Winsock support.
11032 * configure, config.in: Regenerated.
11033
11034 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11035
11036 * server.c (decode_xfer_read, write_qxfer_response): New.
11037 (handle_query): Take a packet length argument. Handle
11038 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11039 the qSupported response.
11040 (main): Update call to handle_query.
11041
11042 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11043
11044 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11045 (putpkt_binary): Renamed from putpkt and adjusted for binary
11046 data.
11047 (putpkt): New wrapper for putpkt_binary.
11048 (readchar): Don't mask off the high bit.
11049 (decode_X_packet): New function.
11050 * server.c (main): Call putpkt_binary if a handler sets the packet
11051 length. Save the length of the incoming packet. Handle 'X'.
11052 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11053
11054 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * server.c (handle_query): Handle qSupported.
11057
11058 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11059
11060 * remote-utils.c (all_symbols_looked_up): New variable.
11061 (look_up_one_symbol): Check it.
11062 * server.h (look_up_one_symbol): New declaration.
11063 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11064
11065 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11066
11067 * Makefile.in (linux-arm-low.o): Update dependencies.
11068 * linux-arm-low.c: Include "gdb_proc_service.h".
11069 (PTRACE_GET_THREAD_AREA): Define.
11070 (ps_get_thread_area): New function.
11071
11072 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11073
11074 * configure.srv (m68k*-*-uclinux*): New target.
11075 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11076 (linux_resume_one_process): Remove extraneous cast.
11077 (linux_read_offsets): New.
11078 (linux_target_op): Add linux_read_offsets on mmuless systems.
11079 * server.c (handle_query): Add qOffsets logic.
11080 * target.h (struct target_ops): Add read_offsets.
11081
11082 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11083
11084 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11085 (PTRACE_GET_THREAD_AREA): Define.
11086 (ps_get_thread_area): New function.
11087 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11088 (linux-x86-64-low.o): Update.
11089
11090 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11091
11092 * configure.ac: Remove checks for prfpregset_t.
11093 * gdb_proc_service.h: New file.
11094 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11095 new "gdb_proc_service.h".
11096 * proc-service.c: Likewise.
11097 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11098 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11099 * Makefile.in (gdb_proc_service_h): Updated.
11100 * configure, config.in: Regenerated.
11101
11102 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11103
11104 * remote-utils.c (prepare_resume_reply): Move declaration
11105 of gdb_id_from_wait to the top of the block.
11106
11107 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * linux-low.c (regsets_store_inferior_registers): Read the regset
11110 from the target before filling it.
11111
11112 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11113
11114 * server.c (attach_inferior): Return SIGTRAP for a successful
11115 attach.
11116
11117 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11118
11119 * Makefile.in (OBS): Add version.o.
11120 (STAGESTUFF): Delete.
11121 (version.o): Add dependencies.
11122 (version.c): Replace rule.
11123 (clean): Remove version.c.
11124 * server.c (gdbserver_version): New.
11125 (gdbserver_usage): Use printf.
11126 (main): Handle --version and --help.
11127 * server.h (version, host_name): Add declarations.
11128
11129 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11130
11131 * linux-arm-low.c:
11132 * linux-arm-low.c:
11133 * inferiors.c:
11134 * i387-fp.h:
11135 * i387-fp.c:
11136 * gdbreplay.c:
11137 * regcache.c:
11138 * proc-service.c:
11139 * mem-break.h:
11140 * mem-break.c:
11141 * linux-x86-64-low.c:
11142 * linux-sh-low.c:
11143 * linux-s390-low.c:
11144 * linux-ppc64-low.c:
11145 * linux-ppc-low.c:
11146 * linux-mips-low.c:
11147 * linux-m68k-low.c:
11148 * linux-m32r-low.c:
11149 * linux-low.h:
11150 * linux-low.c:
11151 * linux-ia64-low.c:
11152 * linux-i386-low.c:
11153 * linux-crisv32-low.c:
11154 * thread-db.c:
11155 * terminal.h:
11156 * target.h:
11157 * target.c:
11158 * server.h:
11159 * server.c:
11160 * remote-utils.c:
11161 * regcache.h:
11162 * utils.c:
11163 * Makefile.in:
11164 * configure.ac:
11165 * gdbserver.1: Add (C) after Copyright. Update the FSF
11166 address.
11167
11168 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11169
11170 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11171 (arm_breakpoint_at): Recognize both breakpoints.
11172 (the_low_target): Use the correct breakpoint instruction.
11173
11174 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11175
11176 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11177 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11178 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11179 (the_low_target): Update.
11180
11181 2005-10-25 Andreas Schwab <schwab@suse.de>
11182
11183 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11184
11185 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11186 (ia64_num_regs): Reduce to 462.
11187
11188 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11189
11190 * acinclude.m4: Correct quoting.
11191 * aclocal.m4: Regenerated.
11192
11193 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11194 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11195 (thread_db_init): Call thread_db_err_str.
11196 * configure.ac: Check for TD_VERSION.
11197 * config.in, configure: Regenerated.
11198
11199 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11200
11201 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11202
11203 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11204
11205 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11206 is not available. Define HAVE_PTRACE_GETREGS if it is.
11207 * config.in, configure: Regenerated.
11208 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11209 * linux-i386-low.c, linux-m68k-low.c: Update to use
11210 HAVE_PTRACE_GETREGS.
11211 * linux-low.c (regsets_fetch_inferior_registers)
11212 (regsets_store_inferior_registers): Only return 0 if we processed
11213 GENERAL_REGS.
11214 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11215 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11216
11217 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11218
11219 * inferiors.c (struct thread_info): Add gdb_id.
11220 (add_thread): Add gdb_id argument.
11221 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11222 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11223 calls to add_thread.
11224 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11225 * server.c (handle_query): Use thread_to_gdb_id.
11226 (handle_v_cont, main): Use gdb_id_to_thread_id.
11227 * server.h (add_thread): Update prototype.
11228 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11229 prototypes.
11230
11231 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11232
11233 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11234 left-padded registers.
11235 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11236 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11237
11238 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11239
11240 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11241 * configure: Regenerate.
11242 * config.in: Regenerate.
11243 * server.h (NEED_DECLARATION_STRERROR):
11244 Replace with !HAVE_DECL_STRERROR.
11245
11246 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11247
11248 * linux-low.c (linux_wait, linux_send_signal): Don't test
11249 an unsigned long variable for > 0 if it could be MAX_ULONG.
11250 * server.c (myresume): Likewise.
11251 * target.c (set_desired_inferior): Likewise.
11252
11253 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11254
11255 * configure.ac: Simplify and improve check for socklen_t.
11256 * configure, config.in: Regenerate.
11257
11258 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11259
11260 * acconfig.h: Remove.
11261 * configure.ac: Add a test for socklen_t. Use three-argument
11262 AC_DEFINE throughout.
11263 * config.in: Regenerated using autoheader 2.59.
11264 * configure: Regenerated.
11265
11266 * gdbreplay.c (socklen_t): Provide a default.
11267 (remote_open): Use socklen_t.
11268 * remote-utils.c (socklen_t): Provide a default.
11269 (remote_open): Use socklen_t.
11270 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11271 unsigned char.
11272
11273 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11274 char for buffers.
11275 * linux-low.c (linux_read_memory, linux_write_memory)
11276 (linux_read_auxv): Likewise.
11277 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11278 (check_mem_write): Likewise.
11279 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11280 Likewise.
11281 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11282 (registers_from_string, register_data): Likewise.
11283 * server.c (handle_query, main): Likewise.
11284 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11285 (decode_M_packet): Likewise.
11286 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11287 * target.h (struct target_ops): Update read_memory, write_memory,
11288 and read_auxv.
11289 (read_inferior_memory, write_inferior_memory): Update.
11290 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11291 to unsigned char *.
11292 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11293 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11294 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11295 linux-s390-low.c, linux-sh-low.c: Update for changes in
11296 read_inferior_memory and the_low_target->breakpoint.
11297
11298 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11299
11300 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11301 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11302 * configure.srv: Add powerpc64-*-linux*.
11303 * linux-ppc64-low.c: New file.
11304
11305 2005-05-23 Orjan Friberg <orjanf@axis.com>
11306
11307 * linux-cris-low.c: New file with support for CRIS.
11308 * linux-crisv32-low.c: Ditto for CRISv32.
11309 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11310 (clean): Add reg-cris.c and reg-crisv32.c.
11311 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11312 reg-crisv32.o, and reg-crisv32.c to make rules.
11313 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11314 recognized targets.
11315
11316 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11317
11318 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11319 of sizeof (PTRACE_XFER_TYPE).
11320 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11321
11322 2005-05-12 Orjan Friberg <orjanf@axis.com>
11323
11324 * target.h (struct target_ops): Add insert_watchpoint,
11325 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11326 pointers for hardware watchpoint support.
11327 * linux-low.h (struct linux_target_ops): Ditto.
11328 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11329 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11330 to linux_target_ops.
11331 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11332 reply packet.
11333 * server.c (main): Recognize 'Z' and 'z' packets.
11334
11335 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11336
11337 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11338 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11339 (the_low_target): Add new members.
11340
11341 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11342
11343 * proc-service.c (ps_lgetregs): Search all_processes instead of
11344 all_threads.
11345
11346 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11347
11348 * server.c (start_inferior): Change return type to int.
11349 (attach_inferior): Change sigptr to int *.
11350 (handle_v_cont, handle_v_requests): Change signal to int *.
11351 (main): Change signal to int.
11352
11353 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11354
11355 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11356 * configure.srv: Add m32r*-*-linux*.
11357 * linux-m32r-low.c: New file.
11358
11359 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11362
11363 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11364
11365 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11366 Take unsigned long arguments for PIDs.
11367 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11368 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11369 (wait_for_sigstop, linux_resume_one_process)
11370 (regsets_fetch_inferior_registers, linux_send_signal)
11371 (linux_read_auxv): Likewise. Update the types of variables holding
11372 PIDs. Update format string specifiers.
11373 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11374 * remote-utils.c (prepare_resume_reply): Likewise.
11375 * server.c (cont_thread, general_thread, step_thread)
11376 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11377 unsigned long.
11378 (handle_query): Update format specifiers.
11379 (handle_v_cont, main): Use strtoul for thread IDs.
11380 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11381 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11382 (general_thread, step_thread, thread_from_wait)
11383 (old_thread_from_wait): Update.
11384 * target.h (struct thread_resume): Use unsigned long for THREAD.
11385 (struct target_ops): Use unsigned long for arguments to attach and
11386 thread_alive.
11387
11388 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11389
11390 * acinclude.m4: Include bfd/bfd.m4 directly.
11391 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11392 <agriffis@toolchain.org>.
11393 * aclocal.m4, configure: Regenerated.
11394
11395 2005-01-07 Andrew Cagney <cagney@gnu.org>
11396
11397 * configure.ac: Rename configure.in, require autoconf 2.59.
11398 * configure: Re-generate.
11399
11400 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11401
11402 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11403 LIBS when finished.
11404 * aclocal.m4: Regenerated.
11405 * configure: Regenerated.
11406
11407 2004-11-21 Andreas Schwab <schwab@suse.de>
11408
11409 * linux-m68k-low.c (m68k_num_gregs): Define.
11410 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11411 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11412 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11413 (m68k_breakpoint_at): New. Add to the_low_target.
11414
11415 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11416 srv_linux_thread_db to yes.
11417
11418 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11419
11420 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11421 (ARCH_SET_FS): Likewise.
11422 (ARCH_GET_FS): Likewise.
11423 (ARCH_GET_GS): Likewise.
11424
11425 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11426
11427 * linux-i386-low.c (ps_get_thread_area): New.
11428 * linux-x86-64-low.c (ps_get_thread_area): New.
11429 * linux-low.c: Include <sys/syscall.h>.
11430 (linux_kill_one_process): Don't kill the first thread here.
11431 (linux_kill): Kill the first thread here.
11432 (kill_lwp): New function.
11433 (send_sigstop, linux_send_signal): Use it.
11434 * proc-service.c: Clean up #ifdefs.
11435 (fpregset_info): Delete.
11436 (ps_lgetregs): Update and enable implementation.
11437 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11438 implementations.
11439 * remote-utils.c (struct sym_cache, symbol_cache): New.
11440 (input_interrupt): Print a clearer message.
11441 (async_io_enabled): New variable.
11442 (enable_async_io, disable_async_io): Use it. Update comments.
11443 (look_up_one_symbol): Use the symbol cache.
11444 * thread-db.c (thread_db_look_up_symbols): New function.
11445 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11446
11447 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11448
11449 * configure.in: Test for -rdynamic.
11450 * configure: Regenerated.
11451 * Makefile (INTERNAL_LDFLAGS): New.
11452 (gdbserver, gdbreplay): Use it.
11453
11454 2004-09-02 Andrew Cagney <cagney@gnu.org>
11455
11456 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11457
11458 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11459
11460 * linux-low.c (linux_wait): Clear all_processes list also.
11461
11462 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11463
11464 * linux-low.c: Include <errno.h>. Remove extern declaration of
11465 errno.
11466
11467 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11468
11469 * gdbreplay.c, server.h, utils.c: Update copyright years.
11470
11471 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11472
11473 * server.c (main): Print child status or termination signal from
11474 variable 'signal', not 'sig'.
11475
11476 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11477
11478 * linux-low.c (linux_read_memory): Change return type to
11479 int. Check for and return error from ptrace().
11480 * target.c (read_inferior_memory): Change return type to int. Pass
11481 back return status from the_target->read_memory().
11482 * target.h (struct target_ops): Adapt *read_memory() prototype.
11483 Update comment.
11484 (read_inferior_memory): Adapt prototype.
11485 * server.c (main): Return an error packet if
11486 read_inferior_memory() returns an error.
11487
11488 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11489
11490 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11491 Unify with other clean targets.
11492
11493 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11494
11495 * server.c (handle_v_cont): Call set_desired_inferior.
11496
11497 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11498
11499 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11500
11501 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11502
11503 * linux-low.c (linux_wait): Unblock async I/O.
11504 (linux_resume): Block and enable async I/O.
11505 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11506 * server.h (block_async_io, unblock_async_io): Add prototypes.
11507
11508 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11509
11510 * remote-utils.c (remote_open): Print a status notice after
11511 opening a TCP port.
11512 * server.c (attach_inferior): Print a status notice after
11513 attaching.
11514
11515 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11516
11517 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11518
11519 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11520
11521 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11522 error packet.
11523 * server.c, target.h: Update copyright years.
11524
11525 2004-02-25 Roland McGrath <roland@redhat.com>
11526
11527 * target.h (struct target_ops): New member `read_auxv'.
11528 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11529 * linux-low.c (linux_read_auxv): New function.
11530 (linux_target_ops): Initialize `read_auxv' member to that.
11531
11532 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11533
11534 Committed by Jim Blandy <jimb@redhat.com>.
11535
11536 * linux-s390-low.c (s390_num_regs): Update.
11537 (s390_regmap): Remove control registers. Use __s390x__ predefine
11538 instead of GPR_SIZE to distiguish s390 and s390x targets.
11539
11540 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11541
11542 * linux-low.c: Update copyright year.
11543 (check_removed_breakpoint): Clear pending_is_breakpoint.
11544 (linux_set_resume_request, linux_queue_one_thread)
11545 (resume_status_pending_p): New functions.
11546 (linux_continue_one_thread): Use process->resume.
11547 (linux_resume): Only resume threads if there are no pending events.
11548 * linux-low.h (struct process_info): Add resume request
11549 pointer.
11550
11551 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11552
11553 * regcache.c (new_register_cache): Clear the allocated register
11554 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11555
11556 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11557
11558 * linux-low.c (linux_resume): Take a struct thread_resume *
11559 argument.
11560 (linux_wait): Update call.
11561 (resume_ptr): New static variable.
11562 (linux_continue_one_thread): Renamed from
11563 linux_continue_one_process. Use resume_ptr.
11564 (linux_resume): Use linux_continue_one_thread.
11565 * server.c (handle_v_cont, handle_v_requests): New functions.
11566 (myresume): New function.
11567 (main): Handle 'v' case.
11568 * target.h (struct thread_resume): New type.
11569 (struct target_ops): Change argument of "resume" to struct
11570 thread_resume *.
11571 (myresume): Delete macro.
11572
11573 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11574
11575 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11576 (uninstall): Support DESTDIR.
11577
11578 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11579
11580 * configure.srv: Add xscale*linux copy of arm*linux entry.
11581
11582 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11583
11584 * linux-arm-low.c (arm_reinsert_addr): New function.
11585 (the_low_target): Add arm_reinsert_addr.
11586
11587 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11588
11589 * mem-break.c: Remove whitespace at end of file.
11590
11591 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11592
11593 * configure.in: Check whether we need to prototype strerror.
11594 * server.h: Optionally prototype strerror.
11595 * gdbreplay.c (perror_with_name): Use strerror.
11596 * linux-low.c (linux_attach_lwp): Use strerror.
11597 * utils.c (perror_with_name): Use strerror.
11598 * config.in, configure: Regenerated.
11599
11600 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11601
11602 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11603 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11604
11605 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11606
11607 * Makefile.in (SFILES): Update.
11608 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11609 low-sun3.c: Remove files.
11610
11611 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11612
11613 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11614 (linux_detach_one_process, linux_detach): New functions.
11615 (linux_target_ops): Add linux_detach.
11616 * server.c (main): Handle 'D' packet.
11617 * target.h (struct target_ops): Add "detach" member.
11618 (detach_inferior): Define.
11619
11620 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11621
11622 From Kelley Cook <kelleycook@wideopenwest.com>:
11623 * configure.srv: Accept i[34567]86 variants.
11624
11625 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11626
11627 * linux-low.c (linux_wait_for_event): Correct comment typos.
11628 (linux_resume_one_process): Call check_removed_breakpoint.
11629 (linux_send_signal): New function.
11630 (linux_target_ops): Add linux_send_signal.
11631 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11632 of kill.
11633 * target.h (struct target_ops): Add send_signal.
11634
11635 2003-05-29 Jim Blandy <jimb@redhat.com>
11636
11637 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11638 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11639 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11640 away part of the register's value.
11641
11642 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11643
11644 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11645 (linux_wait_for_event, linux_init_signals): Likewise.
11646
11647 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11648
11649 * configure.in: Check for stdlib.h.
11650 * configure: Regenerated.
11651 * config.in: Regenerated.
11652
11653 2003-01-04 Andreas Schwab <schwab@suse.de>
11654
11655 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11656
11657 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11658
11659 * Makefile.in: Remove obsolete code.
11660
11661 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11662
11663 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11664 defined(PT_FPR0_HI).
11665
11666 2002-11-17 Stuart Hughes <seh@zee2.com>
11667
11668 * linux-arm-low.c (arm_num_regs): Increase.
11669 (arm_regmap): Include status register.
11670
11671 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11672
11673 * linux-low.c (register_addr): Remove incorrect -1 check.
11674
11675 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11676
11677 * linux-low.c (linux_create_inferior): Call setpgid. Return
11678 the new PID.
11679 (unstopped_p, linux_signal_pid): Remove.
11680 (linux_target_ops): Remove linux_signal_pid.
11681 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11682 global instead of target method.
11683 * target.h (struct target_ops): Remove signal_pid. Update comment
11684 for create_inferior.
11685 * server.c (signal_pid): New variable.
11686 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11687 gdbserver. Set the child to be the foreground process group.
11688 (attach_inferior): Set signal_pid.
11689
11690 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11691
11692 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11693
11694 2002-08-20 Jim Blandy <jimb@redhat.com>
11695
11696 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11697 default for this.
11698
11699 2002-08-01 Andrew Cagney <cagney@redhat.com>
11700
11701 * Makefile.in: Make chill references obsolete.
11702
11703 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11704
11705 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11706 * configure: Regenerate.
11707 * config.in: Regenerate.
11708
11709 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11710
11711 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11712 (perror_with_name, remote_close, remote_open, expect, play): Static.
11713
11714 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11715
11716 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11717 byte offsets instead of an array of indexes.
11718 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11719
11720 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11721
11722 * regcache.c: Add comment.
11723
11724 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11725
11726 * thread-db.c: New file.
11727 * proc-service.c: New file.
11728 * acinclude.m4: New file.
11729 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11730 proc-service.o, and thread-db.o.
11731 (linux-low.o): Add USE_THREAD_DB.
11732 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11733 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11734 * aclocal.m4: Regenerated.
11735 * config.in: Regenerated.
11736 * configure: Regenerated.
11737 * configure.in: Check for proc_service.h, sys/procfs.h,
11738 thread_db.h, and linux/elf.h headrs.
11739 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11740 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11741 Check for -lthread_db and thread support.
11742 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11743 PowerPC, and SuperH.
11744 * i387-fp.c: Constify arguments.
11745 * i387-fp.h: Likewise.
11746 * inferiors.c: (struct thread_info): Renamed from
11747 `struct inferior_info'. Remove PID member. Use generic inferior
11748 list header. All uses updated.
11749 (inferiors, signal_pid): Removed.
11750 (all_threads): New variable.
11751 (get_thread): Define.
11752 (add_inferior_to_list): New function.
11753 (for_each_inferior): New function.
11754 (change_inferior_id): New function.
11755 (add_inferior): Removed.
11756 (remove_inferior): New function.
11757 (add_thread): New function.
11758 (free_one_thread): New function.
11759 (remove_thread): New function.
11760 (clear_inferiors): Use for_each_inferior and free_one_thread.
11761 (find_inferior): New function.
11762 (find_inferior_id): New function.
11763 (inferior_target_data): Update argument type.
11764 (set_inferior_target_data): Likewise.
11765 (inferior_regcache_data): Likewise.
11766 (set_inferior_regcache_data): Likewise.
11767 * linux-low.c (linux_bp_reinsert): Remove.
11768 (all_processes, stopping_threads, using_thrads)
11769 (struct pending_signals, debug_threads, pid_of): New.
11770 (inferior_pid): Replace with macro.
11771 (struct inferior_linux_data): Remove.
11772 (get_stop_pc, add_process): New functions.
11773 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11774 Use add_process and add_thread.
11775 (linux_attach_lwp): New function, based on old linux_attach. Use
11776 add_process and add_thread. Set stop_expected for new threads.
11777 (linux_attach): New function.
11778 (linux_kill_one_process): New function.
11779 (linux_kill): Kill all LWPs.
11780 (linux_thread_alive): Use find_inferior_id.
11781 (check_removed_breakpoints, status_pending_p): New functions.
11782 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11783 Update. Use WNOHANG. Wait for cloned processes also. Update process
11784 struct for the found process.
11785 (linux_wait_for_event): New function.
11786 (linux_wait): Use it. Support LWPs.
11787 (send_sigstop, wait_for_sigstop, stop_all_processes)
11788 (linux_resume_one_process, linux_continue_one_process): New functions.
11789 (linux_resume): Support LWPs.
11790 (REGISTER_RAW_SIZE): Remove.
11791 (fetch_register): Use register_size instead. Call supply_register.
11792 (usr_store_inferior_registers): Likewise. Call collect_register.
11793 Fix recursive case.
11794 (regsets_fetch_inferior_registers): Improve error message.
11795 (regsets_store_inferior_registers): Add debugging.
11796 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11797 (unstopped_p, linux_signal_pid): New functions.
11798 (linux_target_ops): Add linux_signal_pid.
11799 (linux_init_signals): New function.
11800 (initialize_low): Call it. Initialize using_threads.
11801 * regcache.c (inferior_regcache_data): Add valid
11802 flag.
11803 (get_regcache): Fetch registers lazily. Add fetch argument
11804 and update all callers.
11805 (regcache_invalidate_one, regcache_invalidate): New
11806 functions.
11807 (new_register_cache): Renamed from create_register_cache.
11808 Return the new regcache.
11809 (free_register_cache): Change argument to a void *.
11810 (registers_to_string, registers_from_string): Call get_regcache
11811 with fetch flag set.
11812 (register_data): Make static. Pass fetch flag to get_regcache.
11813 (supply_register): Call get_regcache with fetch flag clear.
11814 (collect_register): Call get_regcache with fetch flag set.
11815 (collect_register_as_string): New function.
11816 * regcache.h: Update.
11817 * remote-utils.c (putpkt): Flush after debug output and use
11818 stderr.
11819 Handle input interrupts while waiting for an ACK.
11820 (input_interrupt): Use signal_pid method.
11821 (getpkt): Flush after debug output and use stderr.
11822 (outreg): Use collect_register_as_string.
11823 (new_thread_notify, dead_thread_notify): New functions.
11824 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11825 and general_thread.
11826 (look_up_one_symbol): Flush after debug output.
11827 * server.c (step_thread, server_waiting): New variables.
11828 (start_inferior): Don't use signal_pid. Update call to mywait.
11829 (attach_inferior): Update call to mywait.
11830 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11831 (main): Don't fetch/store registers explicitly. Use
11832 set_desired_inferior. Support proposed ``Hs'' packet. Update
11833 calls to mywait.
11834 * server.h: Update.
11835 (struct inferior_list, struct_inferior_list_entry): New.
11836 * target.c (set_desired_inferior): New.
11837 (write_inferior_memory): Constify.
11838 (mywait): New function.
11839 * target.h: Update.
11840 (struct target_ops): New signal_pid method.
11841 (mywait): Removed macro, added prototype.
11842
11843 * linux-low.h (regset_func): Removed.
11844 (regset_fill_func, regset_store_func): New.
11845 (enum regset_type): New.
11846 (struct regset_info): Add type field. Use new operation types.
11847 (struct linux_target_ops): stop_pc renamed to get_pc.
11848 Add decr_pc_after_break and breakpoint_at.
11849 (get_process, get_thread_proess, get_process_thread)
11850 (strut process_info, all_processes, linux_attach_lwp)
11851 (thread_db_init): New.
11852
11853 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11854 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11855 (the_low_target): Add new members.
11856 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11857 (i386_store_fpxregset): Constify.
11858 (target_regsets): Add new kind identifier.
11859 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11860 (i386_set_pc): Add debugging.
11861 (i386_breakpoint_at): New function.
11862 (the_low_target): Add new members.
11863 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11864 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11865 (mips_breakpoint_at): New.
11866 (the_low_target): Add new members.
11867 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11868 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11869 (the_low_target): Add new members.
11870 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11871 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11872 (the_low_target): Add new members.
11873 * linux-x86-64-low.c (target_regsets): Add new kind
11874 identifier.
11875
11876 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11877
11878 From Martin Pool <mbp@samba.org>:
11879 * server.c (gdbserver_usage): New function.
11880 (main): Call it.
11881
11882 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11883
11884 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11885 stop_at -> stop_pc.
11886
11887 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11888
11889 * Makefile.in: Remove obsolete code.
11890
11891 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11892
11893 * linux-low.c (regsets_fetch_inferior_registers),
11894 (regsets_store_inferior_registers): Removed cast to int from
11895 ptrace() calls.
11896 * regcache.h: Added declaration of struct inferior_info.
11897
11898 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11899
11900 * inferiors.c (struct inferior_info): Add regcache_data.
11901 (add_inferior): Call create_register_cache.
11902 (clear_inferiors): Call free_register_cache.
11903 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11904 * regcache.c (struct inferior_regcache_data): New.
11905 (registers): Remove.
11906 (get_regcache): New function.
11907 (create_register_cache, free_register_cache): New functions.
11908 (set_register_cache): Don't initialize the register cache here.
11909 (registers_to_string, registers_from_string, register_data): Call
11910 get_regcache.
11911 * regcache.h: Add prototypes.
11912 * server.h: Likewise.
11913
11914 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11915
11916 * mem-break.c: New file.
11917 * mem-break.h: New file.
11918 * Makefile.in: Add mem-break.o rule; update server.h
11919 dependencies.
11920 * inferiors.c (struct inferior_info): Add target_data
11921 member.
11922 (clear_inferiors): Free target_data member if set.
11923 (inferior_target_data, set_inferior_target_data): New functions.
11924 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11925 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11926 * linux-low.c (linux_bp_reinsert): New variable.
11927 (struct inferior_linux_data): New.
11928 (linux_create_inferior): Use set_inferior_target_data.
11929 (linux_attach): Likewise. Call add_inferior.
11930 (linux_wait_for_one_inferior): New function.
11931 (linux_wait): Call it.
11932 (linux_write_memory): Add const.
11933 (initialize_low): Call set_breakpoint_data.
11934 * linux-low.h (struct linux_target_ops): Add breakpoint
11935 handling members.
11936 * server.c (attach_inferior): Remove extra add_inferior
11937 call.
11938 * server.h: Include mem-break.h. Update inferior.c
11939 prototypes.
11940 * target.c (read_inferior_memory)
11941 (write_inferior_memory): New functions.
11942 * target.h (read_inferior_memory)
11943 (write_inferior_memory): Change macros to prototypes.
11944 (struct target_ops): Update comments. Add const to write_memory
11945 definition.
11946
11947 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11948
11949 * linux-low.c (usr_store_inferior_registers): Support
11950 registers which are allowed to fail to store.
11951 * linux-low.h (linux_target_ops): Likewise.
11952 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11953 (ppc_cannot_store_register): FPSCR may not be storable.
11954
11955 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11956
11957 * server.h: Include <string.h> if HAVE_STRING_H.
11958 * ChangeLog: Correct paths in last ChangeLog entry.
11959
11960 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11961
11962 * linux-low.h: Remove obsolete prototypes.
11963 (struct linux_target_ops): New.
11964 (extern the_low_target): New.
11965 * linux-low.c (num_regs, regmap): Remove declarations.
11966 (register_addr): Use the_low_target explicitly.
11967 (fetch_register): Likewise.
11968 (usr_fetch_inferior_registers): Likewise.
11969 (usr_store_inferior_registers): Likewise.
11970 * linux-arm-low.c (num_regs): Remove.
11971 (arm_num_regs): Define.
11972 (arm_regmap): Renamed from regmap, made static.
11973 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11974 made static.
11975 (arm_cannot_store_register): Renamed from cannot_store_register,
11976 made static.
11977 (the_low_target): New.
11978 * linux-i386-low.c (num_regs): Remove.
11979 (i386_num_regs): Define.
11980 (i386_regmap): Renamed from regmap, made static.
11981 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11982 made static.
11983 (i386_cannot_store_register): Renamed from cannot_store_register,
11984 made static.
11985 (the_low_target): New.
11986 * linux-ia64-low.c (num_regs): Remove.
11987 (ia64_num_regs): Define.
11988 (ia64_regmap): Renamed from regmap, made static.
11989 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11990 made static.
11991 (ia64_cannot_store_register): Renamed from cannot_store_register,
11992 made static.
11993 (the_low_target): New.
11994 * linux-m68k-low.c (num_regs): Remove.
11995 (m68k_num_regs): Define.
11996 (m68k_regmap): Renamed from regmap, made static.
11997 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11998 made static.
11999 (m68k_cannot_store_register): Renamed from cannot_store_register,
12000 made static.
12001 (the_low_target): New.
12002 * linux-mips-low.c (num_regs): Remove.
12003 (mips_num_regs): Define.
12004 (mips_regmap): Renamed from regmap, made static.
12005 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12006 made static.
12007 (mips_cannot_store_register): Renamed from cannot_store_register,
12008 made static.
12009 (the_low_target): New.
12010 * linux-ppc-low.c (num_regs): Remove.
12011 (ppc_num_regs): Define.
12012 (ppc_regmap): Renamed from regmap, made static.
12013 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12014 made static.
12015 (ppc_cannot_store_register): Renamed from cannot_store_register,
12016 made static.
12017 (the_low_target): New.
12018 * linux-s390-low.c (num_regs): Remove.
12019 (s390_num_regs): Define.
12020 (s390_regmap): Renamed from regmap, made static.
12021 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12022 made static.
12023 (s390_cannot_store_register): Renamed from cannot_store_register,
12024 made static.
12025 (the_low_target): New.
12026 * linux-sh-low.c (num_regs): Remove.
12027 (sh_num_regs): Define.
12028 (sh_regmap): Renamed from regmap, made static.
12029 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12030 made static.
12031 (sh_cannot_store_register): Renamed from cannot_store_register,
12032 made static.
12033 (the_low_target): New.
12034 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12035 (the_low_target): New.
12036
12037 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12038
12039 * Makefile.in: Add stamp-h target.
12040 * configure.in: Create stamp-h.
12041 * configure: Regenerated.
12042
12043 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12044
12045 * inferiors.c: New file.
12046 * target.c: New file.
12047 * target.h: New file.
12048 * Makefile.in: Add target.o and inferiors.o. Update
12049 dependencies.
12050 * linux-low.c (inferior_pid): New static variable,
12051 moved from server.c.
12052 (linux_create_inferior): Renamed from create_inferior.
12053 Call add_inferior. Return 0 on success instead of a PID.
12054 (linux_attach): Renamed from myattach.
12055 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12056 (linux_thread_alive): Renamed from mythread_alive.
12057 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12058 child dies.
12059 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12060 (regsets_store_inferior_registers): Correct error message.
12061 Add missing ``return 0''.
12062 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12063 (linux_store_registers): Renamed from store_inferior_registers.
12064 (linux_read_memory): Renamed from read_inferior_memory.
12065 (linux_write_memory): Renamed from write_inferior_memory.
12066 (linux_target_ops): New structure.
12067 (initialize_low): Call set_target_ops ().
12068 * remote-utils.c (unhexify): New function.
12069 (hexify): New function.
12070 (input_interrupt): Send signals to ``signal_pid''.
12071 * server.c (inferior_pid): Remove.
12072 (start_inferior): Update create_inferior call.
12073 (attach_inferior): Call add_inferior.
12074 (handle_query): New function.
12075 (main): Call handle_query for `q' packets.
12076 * server.h: Include "target.h". Remove obsolete prototypes.
12077 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12078
12079 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12080
12081 * Makefile.in: Add WARN_CFLAGS. Update configury
12082 dependencies.
12083 * configure.in: Check for <string.h>
12084 * configure: Regenerate.
12085 * config.in: Regenerate.
12086 * gdbreplay.c: Include needed system headers.
12087 (remote_open): Remove strchr prototype.
12088 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12089 * regcache.c (supply_register): Change buf argument to const void *.
12090 (supply_register_by_name): Likewise.
12091 (collect_register): Change buf argument to void *.
12092 (collect_register_by_name): Likewise.
12093 * regcache.h: Add missing prototypes.
12094 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12095 * server.c (handle_query): New function.
12096 (attached): New static variable, moved out of main.
12097 (main): Quiet longjmp clobber warnings.
12098 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12099 * utils.c (error): Remove NORETURN.
12100 (fatal): Likewise.
This page took 0.275436 seconds and 5 git commands to generate.