aarch64 multi-arch (part 3): get thread area
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2015-09-18  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-aarch64-low.c: Don't include sys/uio.h.
4         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5
6 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
7
8         * tracepoint.c (eval_result_type): Change prototype.
9         (condition_true_at_tracepoint): Fix argument to compiled_cond.
10
11 2015-09-15  Pedro Alves  <palves@redhat.com>
12
13         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
14         Check whether to report exec events instead of checking whether
15         multiprocess is enabled.
16
17 2015-09-15  Pedro Alves  <palves@redhat.com>
18
19         PR remote/18965
20         * remote-utils.c (prepare_resume_reply): Merge
21         TARGET_WAITKIND_VFORK_DONE switch case with the
22         TARGET_WAITKIND_FORKED case.
23
24 2015-09-15  Yao Qi  <yao.qi@linaro.org>
25
26         * server.c (handle_query): Check string comparison using
27         "else if" instead of "if".
28
29 2015-09-15  Yao Qi  <yao.qi@linaro.org>
30
31         * server.c (vCont_supported): New global variable.
32         (handle_query): Set vCont_supported to 1 if "vContSupported+"
33         matches.  Append ";vContSupported+" to own_buf.
34         (handle_v_requests): Append ";s;S" to own_buf if target supports
35         hardware single step or vCont_supported is false.
36         (capture_main): Set vCont_supported to zero.
37
38 2015-09-15  Yao Qi  <yao.qi@linaro.org>
39
40         * linux-low.c (linux_supports_conditional_breakpoints): Rename
41         it to ...
42         (linux_supports_hardware_single_step): ... New function.
43         (linux_target_ops): Update.
44         * lynx-low.c (lynx_target_ops): Set field
45         supports_hardware_single_step to target_can_do_hardware_single_step.
46         * nto-low.c (nto_target_ops): Likewise.
47         * spu-low.c (spu_target_ops): Likewise.
48         * win32-low.c (win32_target_ops): Likewise.
49         * target.c (target_can_do_hardware_single_step): New function.
50         * target.h (struct target_ops) <supports_conditional_breakpoints>:
51         Remove.  <supports_hardware_single_step>: New field.
52         (target_supports_conditional_breakpoints): Remove.
53         (target_supports_hardware_single_step): New macro.
54         (target_can_do_hardware_single_step): Declare.
55         * server.c (handle_query): Use target_supports_hardware_single_step
56         instead of target_supports_conditional_breakpoints.
57
58 2015-09-15  Yao Qi  <yao.qi@linaro.org>
59
60         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
61         function.
62         (struct linux_target_ops the_low_target): Install
63         aarch64_linux_siginfo_fixup.
64
65 2015-09-11  Don Breazeal  <donb@codesourcery.com>
66             Luis Machado  <lgustavo@codesourcery.com>
67
68         * linux-low.c (linux_mourn): Static declaration.
69         (linux_arch_setup): Move in front of
70         handle_extended_wait.
71         (linux_arch_setup_thread): New function.
72         (handle_extended_wait): Handle exec events.  Call
73         linux_arch_setup_thread.  Make event_lwp argument a
74         pointer-to-a-pointer.
75         (check_zombie_leaders): Do not check stopped threads.
76         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
77         (linux_low_filter_event): Add lwp and thread for exec'ing
78         non-leader thread if leader thread has been deleted.
79         Refactor code into linux_arch_setup_thread and call it.
80         Pass child lwp pointer by reference to handle_extended_wait.
81         (linux_wait_for_event_filtered): Update comment.
82         (linux_wait_1): Prevent clobbering exec event status.
83         (linux_supports_exec_events): New function.
84         (linux_target_ops) <supports_exec_events>: Initialize new member.
85         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
86         new member.
87         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
88         * server.c (report_exec_events): New global variable.
89         (handle_query): Handle qSupported query for exec-events feature.
90         (captured_main): Initialize report_exec_events.
91         * server.h (report_exec_events): Declare new global variable.
92         * target.h (struct target_ops) <supports_exec_events>: New
93         member.
94         (target_supports_exec_events): New macro.
95         * win32-low.c (win32_target_ops) <supports_exec_events>:
96         Initialize new member.
97
98 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
99
100         * linux-low.c (linux_low_enable_btrace): Remove.
101         (linux_target_ops): Replace linux_low_enable_btrace with
102         linux_enable_btrace.
103
104 2015-09-03  Yao Qi  <yao.qi@linaro.org>
105
106         * linux-aarch64-low.c (aarch64_insert_point): Call
107         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
108         returns true.
109
110 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
111
112         * linux-low.c (check_stopped_by_breakpoint): Use
113         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
114
115 2015-08-27  Pedro Alves  <palves@redhat.com>
116
117         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
118
119 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
120
121         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
122         the XNEW-family equivalent.
123         (compile_bytecodes): Likewise.
124         * dll.c (loaded_dll): Likewise.
125         * event-loop.c (append_callback_event): Likewise.
126         (create_file_handler): Likewise.
127         (create_file_event): Likewise.
128         * hostio.c (handle_open): Likewise.
129         * inferiors.c (add_thread): Likewise.
130         (add_process): Likewise.
131         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
132         * linux-arm-low.c (arm_new_process): Likewise.
133         (arm_new_thread): Likewise.
134         * linux-low.c (add_to_pid_list): Likewise.
135         (linux_add_process): Likewise.
136         (handle_extended_wait): Likewise.
137         (add_lwp): Likewise.
138         (enqueue_one_deferred_signal): Likewise.
139         (enqueue_pending_signal): Likewise.
140         (linux_resume_one_lwp_throw): Likewise.
141         (linux_resume_one_thread): Likewise.
142         (linux_read_memory): Likewise.
143         (linux_write_memory): Likewise.
144         * linux-mips-low.c (mips_linux_new_process): Likewise.
145         (mips_linux_new_thread): Likewise.
146         (mips_add_watchpoint): Likewise.
147         * linux-x86-low.c (initialize_low_arch): Likewise.
148         * lynx-low.c (lynx_add_process): Likewise.
149         * mem-break.c (set_raw_breakpoint_at): Likewise.
150         (set_breakpoint): Likewise.
151         (add_condition_to_breakpoint): Likewise.
152         (add_commands_to_breakpoint): Likewise.
153         (clone_agent_expr): Likewise.
154         (clone_one_breakpoint): Likewise.
155         * regcache.c (new_register_cache): Likewise.
156         * remote-utils.c (look_up_one_symbol): Likewise.
157         * server.c (queue_stop_reply): Likewise.
158         (start_inferior): Likewise.
159         (queue_stop_reply_callback): Likewise.
160         (handle_target_event): Likewise.
161         * spu-low.c (fetch_ppc_memory): Likewise.
162         (store_ppc_memory): Likewise.
163         * target.c (set_target_ops): Likewise.
164         * thread-db.c (thread_db_load_search): Likewise.
165         (try_thread_db_load_1): Likewise.
166         * tracepoint.c (add_tracepoint): Likewise.
167         (add_tracepoint_action): Likewise.
168         (create_trace_state_variable): Likewise.
169         (cmd_qtdpsrc): Likewise.
170         (cmd_qtro): Likewise.
171         (add_while_stepping_state): Likewise.
172         * win32-low.c (child_add_thread): Likewise.
173         (get_image_name): Likewise.
174
175 2015-08-25  Yao Qi  <yao.qi@linaro.org>
176
177         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
178
179 2015-08-25  Yao Qi  <yao.qi@linaro.org>
180
181         * Makefile.in (aarch64-linux.o): New rule.
182         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
183         srv_tgtobj.
184         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
185         (aarch64_init_debug_reg_state): Make it extern.
186         (aarch64_linux_prepare_to_resume): Remove.
187
188 2015-08-25  Yao Qi  <yao.qi@linaro.org>
189
190         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
191         lwp_arch_private_info and ptid_of_lwp.
192
193 2015-08-25  Yao Qi  <yao.qi@linaro.org>
194
195         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
196         Find proc_info by find_process_pid.  All callers updated.
197
198 2015-08-25  Yao Qi  <yao.qi@linaro.org>
199
200         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
201         Remove.
202         (debug_reg_change_callback): Remove.
203         (aarch64_notify_debug_reg_change): Remove.
204
205 2015-08-25  Yao Qi  <yao.qi@linaro.org>
206
207         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
208         Call current_lwp_ptid.
209
210 2015-08-25  Yao Qi  <yao.qi@linaro.org>
211
212         * linux-aarch64-low.c (debug_reg_change_callback): Use
213         debug_printf.
214
215 2015-08-25  Yao Qi  <yao.qi@linaro.org>
216
217         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
218
219 2015-08-25  Yao Qi  <yao.qi@linaro.org>
220
221         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
222
223 2015-08-25  Yao Qi  <yao.qi@linaro.org>
224
225         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
226         the code.
227
228 2015-08-25  Yao Qi  <yao.qi@linaro.org>
229
230         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
231         Remove.
232         (debug_reg_change_callback): Remove argument entry and add argument
233         lwp.  Remove local variable thread.  Don't print thread id in the
234         debugging output.  Don't check whether pid of thread equals to pid.
235         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
236         iterate_over_lwps instead find_inferior.
237
238 2015-08-24  Pedro Alves  <palves@redhat.com>
239
240         * inferiors.c (get_first_process): New function.
241         * inferiors.h (get_first_process): New declaration.
242         * remote-utils.c (read_ptid): Default to the first process in the
243         list, instead of to the current thread's process.
244
245 2015-08-24  Pedro Alves  <palves@redhat.com>
246
247         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
248         * event-loop.c: Likewise.
249         * remote-utils.c: Likewise.
250         * tracepoint.c: Likewise.
251
252 2015-08-24  Pedro Alves  <palves@redhat.com>
253
254         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
255         ptid_get_lwp.
256
257 2015-08-21  Pedro Alves  <palves@redhat.com>
258
259         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
260         instead of literal 1.
261
262 2015-08-21  Pedro Alves  <palves@redhat.com>
263
264         * tdesc.c (default_description): Explicitly zero-initialize.
265
266 2015-08-21  Pedro Alves  <palves@redhat.com>
267
268         PR gdb/18749
269         * inferiors.c (remove_thread): Discard any pending stop reply for
270         this thread.
271         * server.c (remove_all_on_match_pid): Rename to ...
272         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
273         instead of a pid.
274         (discard_queued_stop_replies): Change parameter to a ptid.  Now
275         extern.
276         (handle_v_kill, kill_inferior_callback, captured_main)
277         (process_serial_event): Adjust.
278         * server.h (discard_queued_stop_replies): Declare.
279
280 2015-08-21  Pedro Alves  <palves@redhat.com>
281
282         * linux-low.c (wait_for_sigstop): Always switch to no thread
283         selected if the previously current thread dies.
284         * lynx-low.c (lynx_request_interrupt): Use the first thread's
285         process instead of the current thread's.
286         * remote-utils.c (input_interrupt): Don't check if there's no
287         current thread.
288         * server.c (gdb_read_memory, gdb_write_memory): If setting the
289         current thread to the general thread fails, error out.
290         (handle_qxfer_auxv, handle_qxfer_libraries)
291         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
292         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
293         (handle_query): Check if there's a thread selected instead of
294         checking whether there's any thread in the thread list.
295         (handle_qxfer_threads, handle_qxfer_btrace)
296         (handle_qxfer_btrace_conf): Don't error out early if there's no
297         thread in the thread list.
298         (handle_v_cont, myresume): Don't set the current thread to the
299         continue thread.
300         (process_serial_event) <Hg handling>: Also set thread_id if the
301         previous general thread is still alive.
302         (process_serial_event) <g/G handling>: If setting the current
303         thread to the general thread fails, error out.
304         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
305         thread's lwp instead of the current thread's.
306         * target.c (set_desired_thread): If the desired thread was not
307         found, leave the current thread pointing to NULL.  Return an int
308         (boolean) indicating success.
309         * target.h (set_desired_thread): Change return type to int.
310
311 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
312
313         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
314         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
315         #includes.
316         (ps_get_thread_area): New function.
317
318 2015-08-19  Gary Benson  <gbenson@redhat.com>
319
320         * hostio.c (handle_pread): Do not attempt to read more data
321         than hostio_reply_with_data can fit in a packet.
322
323 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
324
325         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
326
327 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
328
329         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
330
331 2015-08-06  Pedro Alves  <palves@redhat.com>
332
333         * tracepoint.c (expr_eval_result): Now an int.
334
335 2015-08-06  Pedro Alves  <palves@redhat.com>
336
337         * gdbthread.h (struct regcache): Forward declare.
338         (struct thread_info) <regcache_data>: Now a struct regcache
339         pointer.
340         * inferiors.c (inferior_regcache_data)
341         (set_inferior_regcache_data): Now work with struct regcache
342         pointers.
343         * inferiors.h (struct regcache): Forward declare.
344         (inferior_regcache_data, set_inferior_regcache_data): Now work
345         with struct regcache pointers.
346         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
347         (free_register_cache_thread): Remove struct regcache pointer
348         casts.
349
350 2015-08-06  Pedro Alves  <palves@redhat.com>
351
352         * server.c (captured_main): On error, print the exception message
353         to stderr, and if run_once is set, throw a quit.
354
355 2015-08-06  Pedro Alves  <palves@redhat.com>
356
357         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
358         the current thread.
359
360 2015-08-06  Pedro Alves  <palves@redhat.com>
361
362         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
363         reading beyond the passed in buffer length.
364
365 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
366
367         * tracepoint.c (symbol_list) <required>: Remove.
368
369 2015-08-06  Pedro Alves  <palves@redhat.com>
370
371         * linux-low.c (handle_extended_wait): Set the fork child's suspend
372         count if stopping and suspending threads.
373         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
374         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
375         (linux_detach): Complete an ongoing step-over.
376         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
377         throughout.
378         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
379         (linux_wait_1): If passing a signal to the inferior after
380         finishing a step-over, unsuspend and re-resume all lwps.  If we
381         see a single-step event but the thread should be continuing, don't
382         pass the trap to gdb.
383         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
384         internal_error instead of gdb_assert.
385         (enqueue_pending_signal): New function.
386         (check_ptrace_stopped_lwp_gone): Add debug output.
387         (start_step_over): Use internal_error instead of gdb_assert.
388         (complete_ongoing_step_over): New function.
389         (linux_resume_one_thread): Don't resume a suspended thread.
390         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
391         it stepping.
392
393 2015-08-06  Pedro Alves  <palves@redhat.com>
394
395         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
396         (linux_thread_alive): Use lwp_is_marked_dead.
397         (extended_event_reported): Delete.
398         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
399         instead of extended_event_reported.
400         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
401         as well.
402         (lwp_is_marked_dead): New function.
403         (lwp_running): Use lwp_is_marked_dead.
404         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
405         comment.
406
407 2015-08-06  Pedro Alves  <palves@redhat.com>
408
409         * linux-low.c (linux_wait_1): Move fork event output out of the
410         !report_to_gdb check.  Pass event_child->waitstatus to
411         target_waitstatus_to_string instead of ourstatus.
412
413 2015-08-04  Yao Qi  <yao.qi@linaro.org>
414
415         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
416         if current_thread is 32 bit.
417
418 2015-08-04  Yao Qi  <yao.qi@linaro.org>
419
420         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
421         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
422         * server.c (extended_protocol): Remove "static".
423         * server.h (extended_protocol): Declare it.
424
425 2015-08-04  Yao Qi  <yao.qi@linaro.org>
426
427         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
428         both aarch64 and aarch32.
429         (aarch64_set_pc): Likewise.
430
431 2015-08-04  Yao Qi  <yao.qi@linaro.org>
432
433         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
434         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
435         arm-with-neon.xml to srv_xmlfiles.
436         * linux-aarch64-low.c: Include linux-aarch32-low.h.
437         (is_64bit_tdesc): New function.
438         (aarch64_linux_read_description): New function.
439         (aarch64_arch_setup): Call aarch64_linux_read_description.
440         (regs_info): Rename to regs_info_aarch64.
441         (aarch64_regs_info): Return right regs_info.
442         (initialize_low_arch): Call initialize_low_arch_aarch32.
443
444 2015-08-04  Yao Qi  <yao.qi@linaro.org>
445
446         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
447         * linux-aarch32-low.c: New file.
448         * linux-aarch32-low.h: New file.
449         * linux-arm-low.c (arm_fill_gregset): Move it to
450         linux-aarch32-low.c.
451         (arm_store_gregset): Likewise.
452         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
453         (arm_store_vfpregset): Call arm_store_vfpregset_num.
454         (arm_arch_setup): Check if PTRACE_GETREGSET works.
455         (regs_info): Rename to regs_info_arm.
456         (arm_regs_info): Return regs_info_aarch32 if
457         have_ptrace_getregset is 1 and target description is
458         arm_with_neon or arm_with_vfpv3.
459         (initialize_low_arch): Don't call init_registers_arm_with_neon.
460         Call initialize_low_arch_aarch32 instead.
461
462 2015-08-04  Yao Qi  <yao.qi@linaro.org>
463
464         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
465         * linux-low.c: ... here.
466         * linux-low.h (have_ptrace_getregset): Declare it.
467
468 2015-08-04  Pedro Alves  <palves@redhat.com>
469
470         * thread-db.c (struct thread_db): Use new typedefs.
471         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
472         CHK calls.
473         (disable_thread_event_reporting): Cast result of dlsym to
474         destination function pointer type.
475         (thread_db_mourn): Use td_ta_delete_ftype.
476
477 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
478
479         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
480         arch variant.
481         (CDX_BREAKPOINT): Define for R2.
482         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
483         (the_low_target): Add comments.
484
485 2015-07-30  Yao Qi  <yao.qi@linaro.org>
486
487         * linux-arm-low.c (arm_hwcap): Remove it.
488         (arm_read_description): New local variable arm_hwcap.  Don't
489         set arm_hwcap to zero.
490
491 2015-07-30  Yao Qi  <yao.qi@linaro.org>
492
493         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
494         Use regcache->tdesc instead.
495         (arm_store_wmmxregset): Likewise.
496         (arm_fill_vfpregset): Likewise.
497         (arm_store_vfpregset): Likewise.
498
499 2015-07-30  Yao Qi  <yao.qi@linaro.org>
500
501         * linux-arm-low.c: Include arch/arm.h.
502         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
503         (arm_store_gregset): Likewise.
504
505 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
506
507         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
508         ptrace's 4th parameter.
509
510 2015-07-27  Yao Qi  <yao.qi@linaro.org>
511
512         * configure.srv (case aarch64*-*-linux*): Don't set
513         srv_linux_usrregs.
514
515 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
516
517         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
518         sys/ptrace.h.
519         * linux-arm-low.c: Likewise.
520         * linux-cris-low.c: Likewise.
521         * linux-crisv32-low.c: Likewise.
522         * linux-low.c: Likewise.
523         * linux-m68k-low.c: Likewise.
524         * linux-mips-low.c: Likewise.
525         * linux-nios2-low.c: Likewise.
526         * linux-s390-low.c: Likewise.
527         * linux-sparc-low.c: Likewise.
528         * linux-tic6x-low.c: Likewise.
529         * linux-tile-low.c: Likewise.
530         * linux-x86-low.c: Likewise.
531
532 2015-07-24  Pedro Alves  <palves@redhat.com>
533
534         * config.in: Regenerate.
535         * configure: Regenerate.
536
537 2015-07-24  Pedro Alves  <palves@redhat.com>
538
539         * acinclude.m4: Include ../ptrace.m4.
540         * configure.ac: Call GDB_AC_PTRACE.
541         * config.in, configure: Regenerate.
542
543 2015-07-24  Yao Qi  <yao.qi@linaro.org>
544
545         * linux-low.c (linux_create_inferior): Remove setting to
546         proc->priv->new_inferior.
547         (linux_attach): Likewise.
548         (linux_low_filter_event): Likewise.
549         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
550
551 2015-07-24  Yao Qi  <yao.qi@linaro.org>
552
553         * linux-low.c (linux_arch_setup): New function.
554         (linux_low_filter_event): If proc->tdesc is NULL and
555         proc->attached is true, call the_low_target.arch_setup.
556         Otherwise, keep status pending, and return.
557         (linux_resume_one_lwp_throw): Don't call get_pc if
558         thread->while_stepping isn't NULL.  Don't call
559         get_thread_regcache if proc->tdesc is NULL.
560         (need_step_over_p): Return 0 if proc->tdesc is NULL.
561         (linux_target_ops): Install arch_setup.
562         * server.c (start_inferior): Call the_target->arch_setup.
563         * target.h (struct target_ops) <arch_setup>: New field.
564         (target_arch_setup): New marco.
565         * lynx-low.c (lynx_target_ops): Update.
566         * nto-low.c (nto_target_ops): Update.
567         * spu-low.c (spu_target_ops): Update.
568         * win32-low.c (win32_target_ops): Update.
569
570 2015-07-24  Yao Qi  <yao.qi@linaro.org>
571
572         * linux-low.c (linux_add_process): Don't set
573         proc->priv->new_inferior.
574         (linux_create_inferior): Set proc->priv->new_inferior to 1.
575         (linux_attach): Likewise.
576
577 2015-07-24  Yao Qi  <yao.qi@linaro.org>
578
579         * server.c (start_inferior): Code refactor.
580
581 2015-07-24  Yao Qi  <yao.qi@linaro.org>
582
583         * server.c (process_serial_event): Set general_thread.
584
585 2015-07-21  Yao Qi  <yao.qi@linaro.org>
586
587         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
588         aarch64_linux_get_debug_reg_capacity.
589
590 2015-07-17  Yao Qi  <yao.qi@linaro.org>
591
592         * Makefile.in (aarch64-linux-hw-point.o): New rule.
593         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
594         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
595         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
596         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
597         (AARCH64_HWP_ALIGNMENT): Likewise.
598         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
599         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
600         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
601         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
602         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
603         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
604         (struct aarch64_debug_reg_state): Likewise.
605         (struct arch_lwp_info): Likewise.
606         (aarch64_align_watchpoint): Likewise.
607         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
608         (aarch64_watchpoint_length): Likewise.
609         (aarch64_point_encode_ctrl_reg): Likewise
610         (aarch64_point_is_aligned): Likewise.
611         (aarch64_align_watchpoint): Likewise.
612         (aarch64_linux_set_debug_regs):
613         (aarch64_dr_state_insert_one_point): Likewise.
614         (aarch64_dr_state_remove_one_point): Likewise.
615         (aarch64_handle_breakpoint): Likewise.
616         (aarch64_handle_aligned_watchpoint): Likewise.
617         (aarch64_handle_unaligned_watchpoint): Likewise.
618         (aarch64_handle_watchpoint): Likewise.
619
620 2015-07-17  Yao Qi  <yao.qi@linaro.org>
621
622         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
623         and don't aarch64_get_debug_reg_state.  All callers update.
624         (aarch64_handle_aligned_watchpoint): Likewise.
625         (aarch64_handle_unaligned_watchpoint): Likewise.
626         (aarch64_handle_watchpoint): Likewise.
627         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
628         (aarch64_remove_point): Likewise.
629
630 2015-07-17  Yao Qi  <yao.qi@linaro.org>
631
632         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
633         debug_printf.
634         (aarch64_handle_unaligned_watchpoint): Likewise.
635
636 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
637
638         Revert the previous 3 commits:
639         Move gdb_regex* to common/
640         Move linux_find_memory_regions_full & co.
641         gdbserver build-id attribute generator
642
643 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
644             Jan Kratochvil  <jan.kratochvil@redhat.com>
645
646         gdbserver build-id attribute generator.
647         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
648         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
649         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
650         (find_phdr): New.
651         (get_dynamic): Use find_pdhr to traverse program headers.
652         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
653         (compare_mapping_entry_range, struct find_memory_region_callback_data)
654         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
655         (get_hex_build_id): New.
656         (linux_qxfer_libraries_svr4): Add optional build-id attribute
657         to reply XML document.
658
659 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
660             Jan Kratochvil  <jan.kratochvil@redhat.com>
661
662         * target.c: Include target/target-utils.h and fcntl.h.
663         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
664         (target_fileio_read_stralloc): New functions.
665
666 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
667
668         * Makefile.in (OBS): Add gdb_regex.o.
669         (gdb_regex.o): New.
670         * config.in: Rebuilt.
671         * configure: Rebuilt.
672
673 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
674             Jan Kratochvil  <jan.kratochvil@redhat.com>
675
676         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
677         * Makefile.in (OBS): Add target-utils.o.
678         (linux-maps.o, target-utils.o): New.
679         * configure.srv (srv_linux_obj): Add linux-maps.o.
680
681 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
682
683         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
684         function, return 1.
685         (the_low_target): Install it.
686
687 2015-07-14  Pedro Alves  <palves@redhat.com>
688
689         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
690         Instead, ignore ECHILD, and throw an error for other errnos.
691
692 2015-07-10  Pedro Alves  <palves@redhat.com>
693
694         * event-loop.c (struct callback_event) <data>: Change type to
695         gdb_client_data instance instead of gdb_client_data pointer.
696         (append_callback_event): Adjust.
697
698 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
699
700         * linux-aarch64-low.c: Add comments for each linux_target_ops
701         method.  Remove comments already covered in target_ops and
702         linux_target_ops definitions.
703         (the_low_target): Add comments for each unimplemented method.
704
705 2015-07-09  Yao Qi  <yao.qi@linaro.org>
706
707         * linux-aarch64-low.c (aarch64_regmap): Remove.
708         (aarch64_usrregs_info): Remove.
709         (regs_info): Set field usrregs to NULL.
710
711 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
712
713         * linux-low.c: Include "rsp-low.h"
714         (linux_low_encode_pt_config, linux_low_encode_raw): New.
715         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
716         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
717         (handle_btrace_enable_pt): New.
718         (handle_btrace_general_set): Support "pt".
719         (handle_btrace_conf_general_set): Support "pt:size".
720
721 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
722
723         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
724         Z_PACKET_SW_BP.
725
726 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
727
728         * linux-aarch64-low.c: Remove comment about endianness.
729         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
730         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
731         memcmp.
732
733 2015-06-24  Gary Benson  <gbenson@redhat.com>
734
735         * linux-i386-ipa.c (stdint.h): Do not include.
736         * lynx-i386-low.c (stdint.h): Likewise.
737         * lynx-ppc-low.c (stdint.h): Likewise.
738         * mem-break.c (stdint.h): Likewise.
739         * thread-db.c (stdint.h): Likewise.
740         * tracepoint.c (stdint.h): Likewise.
741         * win32-low.c (stdint.h): Likewise.
742
743 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
744
745         * server.c (write_qxfer_response): Update call to
746         remote_escape_output.
747
748 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
749             Jan Kratochvil  <jan.kratochvil@redhat.com>
750
751         Merge multiple hex conversions.
752         * gdbreplay.c (tohex): Rename to 'fromhex'.
753         (logchar): Use fromhex.
754
755 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
756
757         * server.c (handle_qxfer_libraries): Set `version' attribute for
758         <library-list>.
759
760 2015-06-10  Gary Benson  <gbenson@redhat.com>
761
762         * target.h (struct target_ops) <multifs_open>: New field.
763         <multifs_unlink>: Likewise.
764         <multifs_readlink>: Likewise.
765         * linux-low.c (nat/linux-namespaces.h): New include.
766         (linux_target_ops): Initialize the_target->multifs_open,
767         the_target->multifs_unlink and the_target->multifs_readlink.
768         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
769         * hostio.c (hostio_fs_pid): New static variable.
770         (hostio_handle_new_gdb_connection): New function.
771         (handle_setfs): Likewise.
772         (handle_open): Use the_target->multifs_open as appropriate.
773         (handle_unlink): Use the_target->multifs_unlink as appropriate.
774         (handle_readlink): Use the_target->multifs_readlink as
775         appropriate.
776         (handle_vFile): Handle vFile:setfs packets.
777         * server.c (handle_query): Call hostio_handle_new_gdb_connection
778         after target_handle_new_gdb_connection.
779
780 2015-06-10  Gary Benson  <gbenson@redhat.com>
781
782         * configure.ac (AC_CHECK_FUNCS): Add setns.
783         * config.in: Regenerate.
784         * configure: Likewise.
785         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
786         (linux-namespaces.o): New rule.
787         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
788
789 2015-06-09  Gary Benson <gbenson@redhat.com>
790
791         * hostio.c (handle_open): Process mode argument with
792         fileio_to_host_mode.
793
794 2015-06-01  Yao Qi  <yao.qi@linaro.org>
795
796         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
797         * linux-x86-low.c: Likewise.
798
799 2015-05-28  Don Breazeal  <donb@codesourcery.com>
800
801         * linux-low.c (handle_extended_wait): Initialize
802         thread_info.last_resume_kind for new fork children.
803
804 2015-05-15  Pedro Alves  <palves@redhat.com>
805
806         * target.h (target_handle_new_gdb_connection): Rewrite using if
807         wrapped in do/while.
808
809 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
810
811         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
812         * configure, config.in: Regenerate.
813         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
814         Declare typedef.
815
816 2015-05-12  Don Breazeal  <donb@codesourcery.com>
817
818         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
819         PTRACE_EVENT_VFORK_DONE.
820         (linux_low_ptrace_options, extended_event_reported): Add vfork
821         events.
822         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
823         and "vforkdone" for RSP 'T' Stop Reply Packet.
824         * server.h (report_vfork_events): Declare
825         global variable.
826
827 2015-05-12  Don Breazeal  <donb@codesourcery.com>
828
829         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
830         (the_low_target) <new_fork>: Initialize new member.
831         * linux-arm-low.c (arm_new_fork): New function.
832         (the_low_target) <new_fork>: Initialize new member.
833         * linux-low.c (handle_extended_wait): Call new target function
834         new_fork.
835         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
836         * linux-mips-low.c (mips_add_watchpoint): New function
837         extracted from mips_insert_point.
838         (the_low_target) <new_fork>: Initialize new member.
839         (mips_linux_new_fork): New function.
840         (mips_insert_point): Call mips_add_watchpoint.
841         * linux-x86-low.c (x86_linux_new_fork): New function.
842         (the_low_target) <new_fork>: Initialize new member.
843
844 2015-05-12  Don Breazeal  <donb@codesourcery.com>
845
846         * linux-low.c (handle_extended_wait): Implement return value,
847         rename argument 'event_child' to 'event_lwp', handle
848         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
849         (linux_low_ptrace_options): New function.
850         (linux_low_filter_event): Call linux_low_ptrace_options,
851         use different argument fo linux_enable_event_reporting,
852         use return value from handle_extended_wait.
853         (extended_event_reported): New function.
854         (linux_wait_1): Call extended_event_reported and set
855         status to report fork events.
856         (linux_write_memory): Add pid to debug message.
857         (reset_lwp_ptrace_options_callback): New function.
858         (linux_handle_new_gdb_connection): New function.
859         (linux_target_ops): Initialize new structure member.
860         * linux-low.h (struct lwp_info) <waitstatus>: New member.
861         * lynx-low.c: Initialize new structure member.
862         * remote-utils.c (prepare_resume_reply): Implement stop reason
863         "fork" for "T" stop message.
864         * server.c (handle_query): Call handle_new_gdb_connection.
865         * server.h (report_fork_events): Declare global flag.
866         * target.h (struct target_ops) <handle_new_gdb_connection>:
867         New member.
868         (target_handle_new_gdb_connection): New macro.
869         * win32-low.c: Initialize new structure member.
870
871 2015-05-12  Don Breazeal  <donb@codesourcery.com>
872
873         * mem-break.c (APPEND_TO_LIST): Define macro.
874         (clone_agent_expr): New function.
875         (clone_one_breakpoint): New function.
876         (clone_all_breakpoints): New function.
877         * mem-break.h: Declare new functions.
878
879 2015-05-12  Don Breazeal  <donb@codesourcery.com>
880
881         * linux-low.c (linux_supports_fork_events): New function.
882         (linux_supports_vfork_events): New function.
883         (linux_target_ops): Initialize new structure members.
884         (initialize_low): Call linux_check_ptrace_features.
885         * lynx-low.c (lynx_target_ops): Initialize new structure
886         members.
887         * server.c (report_fork_events, report_vfork_events):
888         New global flags.
889         (handle_query): Add new features to qSupported packet and
890         response.
891         (captured_main): Initialize new global variables.
892         * target.h (struct target_ops) <supports_fork_events>:
893         New member.
894         <supports_vfork_events>: New member.
895         (target_supports_fork_events): New macro.
896         (target_supports_vfork_events): New macro.
897         * win32-low.c (win32_target_ops): Initialize new structure
898         members.
899
900 2015-05-12  Gary Benson <gbenson@redhat.com>
901
902         * server.c (handle_qxfer_exec_file): Use current process
903         if annex is empty.
904
905 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
906
907         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
908         Remove HAVE_PTRACE_GETREGS conditionals.
909         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
910         instead of PTRACE_GETREGS and PTRACE_SETREGS.
911
912 2015-05-08  Yao Qi  <yao.qi@linaro.org>
913
914         * linux-low.c (linux_supports_conditional_breakpoints): New
915         function.
916         (linux_target_ops): Install new target method.
917         * lynx-low.c (lynx_target_ops): Install NULL hook for
918         supports_conditional_breakpoints.
919         * nto-low.c (nto_target_ops): Likewise.
920         * spu-low.c (spu_target_ops): Likewise.
921         * win32-low.c (win32_target_ops): Likewise.
922         * server.c (handle_query): Check
923         target_supports_conditional_breakpoints.
924         * target.h (struct target_ops) <supports_conditional_breakpoints>:
925         New field.
926         (target_supports_conditional_breakpoints): New macro.
927
928 2015-05-06  Pedro Alves  <palves@redhat.com>
929
930         PR server/18081
931         * server.c (start_inferior): If the process exits, mourn it.
932
933 2015-04-21  Gary Benson <gbenson@redhat.com>
934
935         * hostio.c (fileio_open_flags_to_host): Factored out to
936         fileio_to_host_openflags in common/fileio.c.  Single use
937         updated.
938
939 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
940
941         * linux-xtensa-low.c (xtensa_fill_gregset)
942         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
943         XCHAL_HAVE_LOOP.
944
945 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
946
947         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
948         (regs_info): Replace usrregs pointer with NULL.
949
950 2015-04-17  Gary Benson  <gbenson@redhat.com>
951
952         * target.h (struct target_ops) <pid_to_exec_file>: New field.
953         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
954         * server.c (handle_qxfer_exec_file): New function.
955         (qxfer_packets): Add exec-file entry.
956         (handle_query): Report qXfer:exec-file:read as supported packet.
957
958 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
959
960         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
961
962 2015-04-09  Gary Benson <gbenson@redhat.com>
963
964         * hostio-errno.c (errno_to_fileio_error): Remove function.
965         Update caller to use remote_fileio_to_fio_error.
966
967 2015-04-09  Yao Qi  <yao.qi@linaro.org>
968
969         * linux-low.c (linux_insert_point): Call
970         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
971         (linux_remove_point): Call remove_memory_breakpoint if type is
972         raw_bkpt_type_sw.
973         * linux-x86-low.c (x86_insert_point): Don't call
974         insert_memory_breakpoint.
975         (x86_remove_point): Don't call remove_memory_breakpoint.
976
977 2015-04-01  Pedro Alves  <palves@redhat.com>
978             Cleber Rosa  <crosa@redhat.com>
979
980         * server.c (gdbserver_usage): Reorganize and extend the usage
981         message.
982
983 2015-03-24  Pedro Alves  <palves@redhat.com>
984
985         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
986         output.  Also dump TRAP_TRACE.
987         (linux_low_filter_event): In debug output, distinguish a
988         resume_stop SIGSTOP from a delayed SIGSTOP.
989
990 2015-03-24  Gary Benson  <gbenson@redhat.com>
991
992         * linux-x86-low.c (x86_linux_new_thread): Moved to
993         nat/x86-linux.c.
994         (x86_linux_prepare_to_resume): Likewise.
995
996 2015-03-24  Gary Benson  <gbenson@redhat.com>
997
998         * Makefile.in (x86-linux-dregs.o): New rule.
999         * configure.srv: Add x86-linux-dregs.o to relevant targets.
1000         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1001         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1002         (x86_linux_dr_get): Likewise.
1003         (x86_linux_dr_set): Likewise.
1004         (update_debug_registers_callback): Likewise.
1005         (x86_linux_dr_set_addr): Likewise.
1006         (x86_linux_dr_get_addr): Likewise.
1007         (x86_linux_dr_set_control): Likewise.
1008         (x86_linux_dr_get_control): Likewise.
1009         (x86_linux_dr_get_status): Likewise.
1010         (x86_linux_update_debug_registers): Likewise.
1011
1012 2015-03-24  Gary Benson  <gbenson@redhat.com>
1013
1014         * linux-x86-low.c (x86_linux_update_debug_registers):
1015         New function, factored out from...
1016         (x86_linux_prepare_to_resume): ...this.
1017
1018 2015-03-24  Gary Benson  <gbenson@redhat.com>
1019
1020         * linux-x86-low.c (x86_linux_dr_get): Update comments.
1021         (x86_linux_dr_set): Likewise.
1022         (update_debug_registers_callback): Likewise.
1023         (x86_linux_dr_set_addr): Likewise.
1024         (x86_linux_dr_get_addr): Likewise.
1025         (x86_linux_dr_set_control): Likewise.
1026         (x86_linux_dr_get_control): Likewise.
1027         (x86_linux_dr_get_status): Likewise.
1028         (x86_linux_prepare_to_resume): Likewise.
1029
1030 2015-03-24  Gary Benson  <gbenson@redhat.com>
1031
1032         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1033         Use perror_with_name.  Pass string through gettext.
1034         (x86_linux_dr_set): Likewise.
1035
1036 2015-03-24  Gary Benson  <gbenson@redhat.com>
1037
1038         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1039         (x86_linux_dr_set_addr): ...this.
1040         (x86_dr_low_get_addr): Rename to...
1041         (x86_linux_dr_get_addr): ...this.
1042         (x86_dr_low_set_control): Rename to...
1043         (x86_linux_dr_set_control): ...this.
1044         (x86_dr_low_get_control): Rename to...
1045         (x86_linux_dr_get_control): ...this.
1046         (x86_dr_low_get_status): Rename to...
1047         (x86_linux_dr_get_status): ...this.
1048         (x86_dr_low): Update with new function names.
1049
1050 2015-03-24  Gary Benson  <gbenson@redhat.com>
1051
1052         * Makefile.in (x86-linux.o): New rule.
1053         * configure.srv: Add x86-linux.o to relevant targets.
1054         * linux-low.c (lwp_set_arch_private_info): New function.
1055         (lwp_arch_private_info): Likewise.
1056         * linux-x86-low.c: Include nat/x86-linux.h.
1057         (arch_lwp_info): Removed structure.
1058         (update_debug_registers_callback):
1059         Use lwp_set_debug_registers_changed.
1060         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1061         and lwp_set_debug_registers_changed.
1062         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1063
1064 2015-03-24  Gary Benson  <gbenson@redhat.com>
1065
1066         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1067         * linux-arm-low.c (arm_new_thread): Likewise.
1068         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1069         * linux-mips-low.c (mips_linux_new_thread): Likewise.
1070         * linux-x86-low.c (x86_linux_new_thread): Likewise.
1071         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1072
1073 2015-03-24  Gary Benson  <gbenson@redhat.com>
1074
1075         * linux-low.c (ptid_of_lwp): New function.
1076         (lwp_is_stopped): Likewise.
1077         (lwp_stop_reason): Likewise.
1078         * linux-x86-low.c (update_debug_registers_callback):
1079         Use lwp_is_stopped.
1080         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1081         lwp_stop_reason.
1082
1083 2015-03-24  Gary Benson  <gbenson@redhat.com>
1084
1085         * linux-low.h (linux_stop_lwp): Remove declaration.
1086
1087 2015-03-24  Gary Benson  <gbenson@redhat.com>
1088
1089         * linux-low.h: Include nat/linux-nat.h.
1090         * linux-low.c (iterate_over_lwps_args): New structure.
1091         (iterate_over_lwps_filter): New function.
1092         (iterate_over_lwps): Likewise.
1093         * linux-x86-low.c (update_debug_registers_callback):
1094         Update signature to what iterate_over_lwps expects.
1095         Remove PID check that iterate_over_lwps now performs.
1096         (x86_dr_low_set_addr): Use iterate_over_lwps.
1097         (x86_dr_low_set_control): Likewise.
1098
1099 2015-03-24  Gary Benson  <gbenson@redhat.com>
1100
1101         * linux-x86-low.c (x86_debug_reg_state): New function.
1102         (x86_linux_prepare_to_resume): Use the above.
1103
1104 2015-03-24  Gary Benson  <gbenson@redhat.com>
1105
1106         * linux-low.c (current_lwp_ptid): New function.
1107         * linux-x86-low.c: Include nat/linux-nat.h.
1108         (x86_dr_low_get_addr): Use current_lwp_ptid.
1109         (x86_dr_low_get_control): Likewise.
1110         (x86_dr_low_get_status): Likewise.
1111
1112 2015-03-20  Pedro Alves  <palves@redhat.com>
1113
1114         * tracepoint.c (cmd_qtstatus): Make "str" const.
1115
1116 2015-03-20  Pedro Alves  <palves@redhat.com>
1117
1118         * server.c (handle_general_set): Make "req_str" const.
1119
1120 2015-03-19  Pedro Alves  <palves@redhat.com>
1121
1122         * linux-low.c (linux_resume_one_lwp): Rename to ...
1123         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
1124         instead call perror_with_name.
1125         (check_ptrace_stopped_lwp_gone): New function.
1126         (linux_resume_one_lwp): Reimplement as wrapper around
1127         linux_resume_one_lwp_throw that swallows errors if the LWP is
1128         gone.
1129
1130 2015-03-19  Pedro Alves  <palves@redhat.com>
1131
1132         * linux-low.c (count_events_callback, select_event_lwp_callback):
1133         No longer check whether the thread has resume_stop as last resume
1134         kind.
1135
1136 2015-03-19 Pedro Alves  <palves@redhat.com>
1137
1138         * linux-low.c (count_events_callback, select_event_lwp_callback):
1139         Use the lwp's status_pending_p field, not the thread's.
1140
1141 2015-03-19  Pedro Alves  <palves@redhat.com>
1142
1143         * linux-low.c (select_event_lwp_callback): Update comments to
1144         no longer mention SIGTRAP.
1145
1146 2015-03-18  Gary Benson  <gbenson@redhat.com>
1147
1148         * server.c (handle_query): Do not report vFile:fstat as supported.
1149
1150 2015-03-11  Gary Benson  <gbenson@redhat.com>
1151
1152         * hostio.c (sys/types.h): New include.
1153         (sys/stat.h): Likewise.
1154         (common-remote-fileio.h): Likewise.
1155         (handle_fstat): New function.
1156         (handle_vFile): Handle vFile:fstat packets.
1157
1158 2015-03-11  Gary Benson  <gbenson@redhat.com>
1159
1160         * configure.ac (AC_CHECK_MEMBERS): Add checks for
1161         struct stat.st_blocks and struct stat.st_blksize.
1162         * configure: Regenerate.
1163         * config.in: Likewise.
1164         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1165         (OBS): Add common-remote-fileio.o.
1166         (common-remote-fileio.o): New rule.
1167
1168 2015-03-09  Pedro Alves  <palves@redhat.com>
1169
1170         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1171         'struct sockaddr' pointer in 'accept' call.
1172
1173 2015-03-09  Pedro Alves  <palves@redhat.com>
1174
1175         Revert:
1176         2015-03-07  Pedro Alves  <palves@redhat.com>
1177         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1178         or <winsock2.h> here.  Instead include "gdb_socket.h".
1179         (remote_open): Use union gdb_sockaddr_u.
1180         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1181         or <winsock2.h> here.  Instead include "gdb_socket.h".
1182         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1183         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1184         or <sys/un.h>.
1185         (init_named_socket, gdb_agent_helper_thread): Use union
1186         gdb_sockaddr_u.
1187
1188 2015-03-07  Pedro Alves  <palves@redhat.com>
1189
1190         * configure.ac (build_warnings): Move
1191         -Wdeclaration-after-statement to the C-specific set.
1192         * configure: Regenerate.
1193
1194 2015-03-07  Pedro Alves  <palves@redhat.com>
1195
1196         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1197         or <winsock2.h> here.  Instead include "gdb_socket.h".
1198         (remote_open): Use union gdb_sockaddr_u.
1199         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1200         or <winsock2.h> here.  Instead include "gdb_socket.h".
1201         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1202         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1203         or <sys/un.h>.
1204         (init_named_socket, gdb_agent_helper_thread): Use union
1205         gdb_sockaddr_u.
1206
1207 2015-03-07  Pedro Alves  <palves@redhat.com>
1208
1209         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1210         instead.
1211
1212 2015-03-06  Yao Qi  <yao.qi@linaro.org>
1213
1214         * linux-aarch64-low.c (aarch64_insert_point): Use
1215         show_debug_regs as a boolean.
1216         (aarch64_remove_point): Likewise.
1217
1218 2015-03-05  Pedro Alves  <palves@redhat.com>
1219
1220         * lynx-low.c (lynx_target_ops): Install NULL hooks for
1221         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1222         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1223         * nto-low.c (nto_target_ops): Likewise.
1224         * spu-low.c (spu_target_ops): Likewise.
1225         * win32-low.c (win32_target_ops): Likewise.
1226
1227 2015-03-04  Pedro Alves  <palves@redhat.com>
1228
1229         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1230         Decide whether a breakpoint triggered based on the SIGTRAP's
1231         siginfo.si_code.
1232         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1233         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1234         (linux_low_filter_event): Check for breakpoints before checking
1235         watchpoints.
1236         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1237         siginfo.si_code.
1238         (linux_stopped_by_sw_breakpoint)
1239         (linux_supports_stopped_by_sw_breakpoint)
1240         (linux_stopped_by_hw_breakpoint)
1241         (linux_supports_stopped_by_hw_breakpoint): New functions.
1242         (linux_target_ops): Install new target methods.
1243
1244 2015-03-04  Pedro Alves  <palves@redhat.com>
1245
1246         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1247         * server.c (swbreak_feature, hwbreak_feature): New globals.
1248         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1249         (captured_main): Clear swbreak_feature and hwbreak_feature.
1250         * server.h (swbreak_feature, hwbreak_feature): Declare.
1251         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1252         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1253         supports_stopped_by_hw_breakpoint>: New fields.
1254         (target_supports_stopped_by_sw_breakpoint)
1255         (target_stopped_by_sw_breakpoint)
1256         (target_supports_stopped_by_hw_breakpoint)
1257         (target_stopped_by_hw_breakpoint): Declare.
1258
1259 2015-03-04  Pedro Alves  <palves@redhat.com>
1260
1261         enum lwp_stop_reason -> enum target_stop_reason
1262         * linux-low.c (check_stopped_by_breakpoint): Adjust.
1263         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1264         (linux_wait_1, stuck_in_jump_pad_callback)
1265         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1266         (linux_stopped_by_watchpoint):
1267         * linux-low.h (enum lwp_stop_reason): Delete.
1268         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1269         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1270
1271 2015-03-04  Yao Qi  <yao.qi@linaro.org>
1272
1273         * Makefile.in (SFILES): Add linux-aarch64-low.c.
1274
1275 2015-03-03  Gary Benson  <gbenson@redhat.com>
1276
1277         * hostio.c (handle_vFile): Fix prefix lengths.
1278
1279 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
1280
1281         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1282         ptr_bits.
1283
1284 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1285
1286         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1287         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1288         (clean): Add "rm -f" for above C files.
1289         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1290         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1291         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1292         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1293         * linux-s390-low.c (HWCAP_S390_VX): New macro.
1294         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1295         (init_registers_s390x_vx_linux64)
1296         (init_registers_s390x_tevx_linux64)
1297         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1298         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1299         declarations.
1300         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1301         (s390_store_vxrs_high): New functions.
1302         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1303         NT_S390_VXRS_HIGH.
1304         (s390_arch_setup): Add logic for selecting one of the new target
1305         descriptions.  Activate the new vector regsets if applicable.
1306         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1307         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1308         and init_registers_s390x_tevx_linux64.
1309
1310 2015-03-01  Pedro Alves  <palves@redhat.com>
1311
1312         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1313         parameter.
1314
1315 2015-02-27  Pedro Alves  <palves@redhat.com>
1316
1317         * linux-x86-low.c (u_debugreg_offset): New function.
1318         (x86_linux_dr_get, x86_linux_dr_set): Use it.
1319
1320 2015-02-27  Pedro Alves  <palves@redhat.com>
1321
1322         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1323         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1324         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1325         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1326         (ps_lsetfpregs, ps_getpid)
1327         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1328         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1329         (ps_lsetxregs, ps_plog): Declare.
1330
1331 2015-02-27  Pedro Alves  <palves@redhat.com>
1332
1333         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1334         IP_AGENT_EXPORT_FUNC.
1335         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1336         IP_AGENT_EXPORT_FUNC.
1337         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1338         (IP_AGENT_EXPORT): Delete.
1339         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1340         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1341         (gdb_trampoline_buffer_error, collecting, gdb_collect)
1342         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1343         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1344         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1345         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1346         (traceframe_read_count, traceframe_write_count)
1347         (traceframes_created, trace_state_variables, get_raw_reg)
1348         (get_trace_state_variable_value, set_trace_state_variable_value)
1349         (ust_loaded, helper_thread_id, cmd_buf): Use
1350         IPA_SYM_EXPORTED_NAME.
1351         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1352         (tracepoints) Use IP_AGENT_EXPORT_VAR.
1353         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1354         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1355         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1356         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1357         EXTERN_C_PUSH/EXTERN_C_POP.
1358         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1359         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1360         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1361         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1362         (traceframe_write_count, traceframe_read_count)
1363         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1364         (about_to_request_buffer_space, get_trace_state_variable_value)
1365         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1366         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1367         EXTERN_C_PUSH/EXTERN_C_POP.
1368         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1369         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1370         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1371         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1372         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1373         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1374         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1375         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1376         Define.
1377         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1378         (IP_AGENT_EXPORT_VAR_DECL): Define.
1379         (tracing): Declare.
1380         (gdb_agent_get_raw_reg): Declare.
1381
1382 2015-02-27  Tom Tromey  <tromey@redhat.com>
1383             Pedro Alves  <palves@redhat.com>
1384
1385         Rename symbols whose names are reserved C++ keywords throughout.
1386
1387 2015-02-27  Pedro Alves  <palves@redhat.com>
1388
1389         * Makefile.in (COMPILER): New, get it from autoconf.
1390         (CXX): Get from autoconf instead.
1391         (COMPILE.pre): Use COMPILER.
1392         (CC-LD): Rename to ...
1393         (CC_LD): ... this.  Use COMPILER.
1394         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1395         (CXX_FOR_TARGET): Default to g++ instead of gcc.
1396         * acinclude.m4: Include build-with-cxx.m4.
1397         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1398         Disable -Werror by default if building in C++ mode.
1399         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1400         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1401         the C++ compiler.  Save/restore CXXFLAGS too.
1402         * configure: Regenerate.
1403
1404 2015-02-27  Pedro Alves  <palves@redhat.com>
1405
1406         * acinclude.m4: Include libiberty.m4.
1407         * configure.ac: Call libiberty_INIT.
1408         * config.in, configure: Regenerate.
1409
1410 2015-02-26  Pedro Alves  <palves@redhat.com>
1411
1412         * linux-low.c (linux_wait_1): When incrementing the PC past a
1413         program breakpoint always use the_low_target.breakpoint_len as
1414         increment, rather than the maximum between that and
1415         the_low_target.decr_pc_after_break.
1416
1417 2015-02-23  Pedro Alves  <palves@redhat.com>
1418
1419         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1420         thread was doing a step-over; always adjust the PC if
1421         we stepped over a permanent breakpoint.
1422         (linux_wait_1): If we stepped over breakpoint that was on top of a
1423         permanent breakpoint, manually advance the PC past it.
1424
1425 2015-02-23  Pedro Alves  <palves@redhat.com>
1426
1427         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1428         modes.
1429         (x86_fill_gregset, x86_store_gregset): Use it when handling
1430         $orig_eax.
1431
1432 2015-02-20  Pedro Alves  <palves@redhat.com>
1433
1434         * thread-db.c: Include "nat/linux-procfs.h".
1435         (thread_db_init): Skip listing new threads if the kernel supports
1436         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1437
1438 2015-02-20  Pedro Alves  <palves@redhat.com>
1439
1440         * linux-low.c (status_pending_p_callback): Use ptid_match.
1441
1442 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1443
1444         PR breakpoints/16812
1445         * linux-low.c (wstatus_maybe_breakpoint): Remove.
1446         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1447         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1448
1449 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
1450
1451         PR breakpoints/15956
1452         * tracepoint.c (cmd_qtinit): Add check for current_thread.
1453
1454 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1455
1456         * linux-low.c (linux_low_btrace_conf): Print size.
1457         * server.c (handle_btrace_conf_general_set): New.
1458         (hanle_general_set): Call handle_btrace_conf_general_set.
1459         (handle_query): Report Qbtrace-conf:bts:size as supported.
1460
1461 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1462
1463         * linux-low.c (linux_low_enable_btrace): Update parameters.
1464         (linux_low_btrace_conf): New.
1465         (linux_target_ops)<to_btrace_conf>: Initialize.
1466         * server.c (current_btrace_conf): New.
1467         (handle_btrace_enable): Rename to ...
1468         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
1469         to target_enable_btrace.  Update comment.  Update users.
1470         (handle_qxfer_btrace_conf): New.
1471         (qxfer_packets): Add btrace-conf entry.
1472         (handle_query): Report qXfer:btrace-conf:read as supported packet.
1473         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1474         (target_ops)<read_btrace_conf>: New.
1475         (target_enable_btrace): Update parameters.
1476         (target_read_btrace_conf): New.
1477
1478 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1479
1480         * server.c (handle_btrace_general_set): Remove call to
1481         target_supports_btrace.
1482         (supported_btrace_packets): New.
1483         (handle_query): Call supported_btrace_packets.
1484         * target.h: include btrace-common.h.
1485         (btrace_target_info): Removed.
1486         (supports_btrace, target_supports_btrace): Update parameters.
1487
1488 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1489
1490         * Makefile.in (SFILES): Add common/btrace-common.c.
1491         (OBS): Add common/btrace-common.o.
1492         (btrace-common.o): Add build rules.
1493         * linux-low: Include btrace-common.h.
1494         (linux_low_read_btrace): Use struct btrace_data.  Call
1495         btrace_data_init and btrace_data_fini.
1496
1497 2015-02-06  Pedro Alves  <palves@redhat.com>
1498
1499         * thread-db.c (find_new_threads_callback): Add debug output.
1500
1501 2015-02-04  Pedro Alves  <palves@redhat.com>
1502
1503         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1504         (resume_stopped_resumed_lwps): New function.
1505         (linux_wait_for_event_filtered): Use it.
1506
1507 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1508
1509         * Makefile.in (SFILES): Add linux-personality.c.
1510         (linux-personality.o): New rule.
1511         * configure.srv (srv_linux_obj): Add linux-personality.o to the
1512         list of objects to be built.
1513         * linux-low.c: Include nat/linux-personality.h.
1514         (linux_create_inferior): Remove code to disable address space
1515         randomization (moved to ../nat/linux-personality.c).  Create
1516         cleanup to disable address space randomization.
1517
1518 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1519
1520         * Makefile.in (posix-strerror.o): New rule.
1521         (mingw-strerror.o): Likewise.
1522         * configure: Regenerated.
1523         * configure.ac: Source file ../common/common.host.  Initialize new
1524         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
1525
1526 2015-01-14  Yao Qi  <yao@codesourcery.com>
1527
1528         * Makefile.in (SFILES): Add nat/ppc-linux.c.
1529         (ppc-linux.o): New rule.
1530         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1531         * configure.ac: AC_CHECK_FUNCS(getauxval).
1532         * config.in: Re-generated.
1533         * configure: Re-generated.
1534         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1535         ppc64_64bit_inferior_p
1536
1537 2015-01-14  Yao Qi  <yao@codesourcery.com>
1538
1539         * linux-ppc-low.c: Include "nat/ppc-linux.h".
1540          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1541         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
1542         (PT_ORIG_R3, PT_TRAP): Likewise.
1543         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1544         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1545         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1546
1547 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
1548
1549         * i387-fp.c (i387_cache_to_xsave): In look over
1550         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1551         zmmh_low_space field by use of zmmh_high_space.
1552
1553 2015-01-09  Pedro Alves  <palves@redhat.com>
1554
1555         * linux-low.c (step_over_bkpt): Move higher up in the file.
1556         (handle_extended_wait): Don't store the stop_pc here.
1557         (get_stop_pc): Adjust comments and rename to ...
1558         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
1559         stopped for a software breakpoint or hardware breakpoint.
1560         (thread_still_has_status_pending_p): New function.
1561         (status_pending_p_callback): Use
1562         thread_still_has_status_pending_p.  If the event is no longer
1563         interesting, resume the LWP.
1564         (handle_tracepoints): Add assert.
1565         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1566         (wstatus_maybe_breakpoint): New function.
1567         (cancel_breakpoint): Delete function.
1568         (check_stopped_by_watchpoint): New function, factored out from
1569         linux_low_filter_event.
1570         (lp_status_maybe_breakpoint): Delete function.
1571         (linux_low_filter_event): Remove filter_ptid argument.
1572         Leave thread group exits pending here.  Store the LWP's stop PC.
1573         Always leave events pending.
1574         (linux_wait_for_event_filtered): Pull all events out of the
1575         kernel, and leave them all pending.
1576         (count_events_callback, select_event_lwp_callback): Consider all
1577         events.
1578         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1579         (select_event_lwp): Only give preference to the stepping LWP in
1580         all-stop mode.  Adjust comments.
1581         (ignore_event): New function.
1582         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
1583         references to cancel_breakpoints.  Adjust to renames.  Also give
1584         equal priority to all LWPs that have had events in non-stop mode.
1585         If reporting a software breakpoint event, unadjust the LWP's PC.
1586         (linux_wait): If linux_wait_1 returned an ignored event, retry.
1587         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1588         Adjust.
1589         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
1590         (resume_status_pending_p): Use thread_still_has_status_pending_p.
1591         (linux_stopped_by_watchpoint): Adjust.
1592         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1593         * linux-low.h (enum lwp_stop_reason): New.
1594         (struct lwp_info) <stop_pc>: Adjust comment.
1595         <stopped_by_watchpoint>: Delete field.
1596         <stop_reason>: New field.
1597         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1598         * mem-break.c (software_breakpoint_inserted_here)
1599         (hardware_breakpoint_inserted_here): New function.
1600         * mem-break.h (software_breakpoint_inserted_here)
1601         (hardware_breakpoint_inserted_here): Declare.
1602         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1603         (cancel_breakpoints): Delete.
1604         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1605         (upload_fast_traceframes): Remove references to
1606         cancel_breakpoints.
1607
1608 2015-01-09  Pedro Alves  <palves@redhat.com>
1609
1610         * thread-db.c (find_new_threads_callback): Ignore thread if the
1611         kernel thread ID is -1.
1612
1613 2015-01-09  Pedro Alves  <palves@redhat.com>
1614
1615         * linux-low.c (linux_attach_fail_reason_string): Move to
1616         nat/linux-ptrace.c, and rename.
1617         (linux_attach_lwp): Update comment.
1618         (attach_proc_task_lwp_callback): New function.
1619         (linux_attach): Adjust to rename and use
1620         linux_proc_attach_tgid_threads.
1621         (linux_attach_fail_reason_string): Delete declaration.
1622
1623 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
1624
1625         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1626         * server.c (gdbserver_version): Likewise.
1627
1628 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1629
1630         * remote-utils.c: Include ctype.h.
1631         (input_interrupt): Explicitly handle the case when the char
1632         received is the NUL byte.  Improve the printing of non-ASCII
1633         characters.
1634
1635 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
1636
1637         * linux-low.c (linux_low_filter_event): Update call to
1638         linux_enable_event_reporting following the addition of
1639         a new parameter to that function.
1640
1641 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
1642
1643         PR server/17457
1644         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1645         (AARCH64_FPCR_REGNO): Likewise.
1646         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1647         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1648         (aarch64_store_fpregset): Likewise.
1649
1650 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
1651
1652         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1653         Remove FIXME comment about assumption about N.
1654
1655 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
1656
1657         * configure.ac: If large-file support is disabled in GDBserver,
1658         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1659         * configure: Regenerate.
1660
1661 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1662
1663         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1664         warning upon ENODATA from ptrace.
1665         * linux-s390-low.c (s390_store_tdb): New.
1666         (s390_regsets): Add regset for NT_S390_TDB.
1667
1668 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1669
1670         * linux-low.c (regsets_store_inferior_registers): Skip regsets
1671         without a fill_function.
1672         * linux-s390-low.c (s390_fill_last_break): Remove.
1673         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1674         (s390_arch_setup): Use regset's size instead of fill_function for
1675         loop end condition.
1676
1677 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1678
1679         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1680         the regset's store function when ptrace returned an error.
1681         * regcache.c (get_thread_regcache): Invalidate register cache
1682         before fetching inferior's registers.
1683
1684 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1685
1686         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1687         while-loop as for-loop.
1688         (regsets_store_inferior_registers): Likewise.
1689
1690 2014-11-28  Yao Qi  <yao@codesourcery.com>
1691
1692         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1693         * config.in, configure: Re-generate.
1694         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1695         is defined.
1696
1697 2014-11-21  Yao Qi  <yao@codesourcery.com>
1698
1699         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1700         (AC_CHECK_HEADERS): Remove malloc.h.
1701         * configure: Re-generated.
1702         * config.in: Re-generated.
1703         * server.h: Don't include alloca.h and malloc.h.
1704         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1705         Don't include malloc.h.
1706
1707 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
1708
1709         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1710         corresponding ERRNO check in same block.
1711
1712 2014-11-12  Pedro Alves  <palves@redhat.com>
1713
1714         * server.c (cont_thread): Update comment.
1715         (start_inferior, attach_inferior): No longer clear cont_thread.
1716         (handle_v_cont): No longer set cont_thread.
1717         (captured_main): Clear cont_thread each time a GDB connects.
1718
1719 2014-11-12  Pedro Alves  <palves@redhat.com>
1720
1721         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1722         thread, and don't resume all threads if the Hc thread has exited.
1723
1724 2014-11-12  Pedro Alves  <palves@redhat.com>
1725
1726         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1727         the process group instead of to a specific LWP.
1728
1729 2014-10-15  Pedro Alves  <palves@redhat.com>
1730
1731         PR server/17487
1732         * win32-arm-low.c (arm_set_thread_context): Remove current_event
1733         parameter.
1734         (arm_set_thread_context): Delete.
1735         (the_low_target): Adjust.
1736         * win32-i386-low.c (debug_registers_changed)
1737         (debug_registers_used): Delete.
1738         (update_debug_registers_callback): New function.
1739         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1740         needing to update their debug registers.
1741         (win32_get_current_dr): New function.
1742         (x86_dr_low_get_addr, x86_dr_low_get_control)
1743         (x86_dr_low_get_status): Fetch the debug register from the thread
1744         record's context.
1745         (i386_initial_stuff): Adjust.
1746         (i386_get_thread_context): Remove current_event parameter.  Don't
1747         clear debug_registers_changed nor copy DR values to
1748         debug_reg_state.
1749         (i386_set_thread_context): Delete.
1750         (i386_prepare_to_resume): New function.
1751         (i386_thread_added): Mark the thread as needing to update irs
1752         debug registers.
1753         (the_low_target): Remove i386_set_thread_context and install
1754         i386_prepare_to_resume.
1755         * win32-low.c (win32_get_thread_context): Adjust.
1756         (win32_set_thread_context): Use SetThreadContext
1757         directly.
1758         (win32_prepare_to_resume): New function.
1759         (win32_require_context): New function, factored out from ...
1760         (thread_rec): ... this.
1761         (continue_one_thread): Call win32_prepare_to_resume on each thread
1762         we're about to continue.
1763         (win32_resume): Call win32_prepare_to_resume on the event thread.
1764         * win32-low.h (struct win32_thread_info)
1765         <debug_registers_changed>: New field.
1766         (struct win32_target_ops): Change prototype of set_thread_context,
1767         delete set_thread_context and add prepare_to_resume.
1768         (win32_require_context): New declaration.
1769
1770 2014-10-08  Gary Benson  <gbenson@redhat.com>
1771
1772         * server.h: Do not include common-exceptions.h.
1773
1774 2014-10-08  Gary Benson  <gbenson@redhat.com>
1775
1776         * server.h: Do not include cleanups.h.
1777
1778 2014-09-30  James Hogan  <james.hogan@imgtec.com>
1779
1780         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1781         mips64-dsp-linux.c.
1782
1783 2014-09-23  Yao Qi  <yao@codesourcery.com>
1784
1785         * linux-low.c (lp_status_maybe_breakpoint): New function.
1786         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1787         (count_events_callback): Likewise.
1788         (select_event_lwp_callback): Likewise.
1789         (cancel_breakpoints_callback): Likewise.
1790
1791 2014-09-19  Don Breazeal  <donb@codesourcery.com>
1792
1793         * linux-low.c (handle_extended_wait): Call
1794         linux_ptrace_get_extended_event.
1795         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1796         linux_is_extended_waitstatus.
1797
1798 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
1799
1800         * Makefile.in (CPPFLAGS): Define.
1801         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1802         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1803
1804 2014-09-16  Gary Benson  <gbenson@redhat.com>
1805
1806         * inferiors.h (current_inferior): Renamed as...
1807         (current_thread): New variable.  All uses updated.
1808         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1809         (maybe_move_out_of_jump_pad): Likewise.
1810         (cancel_breakpoint): Likewise.
1811         (linux_low_filter_event): Likewise.
1812         (wait_for_sigstop): Likewise.
1813         (linux_resume_one_lwp): Likewise.
1814         (need_step_over_p): Likewise.
1815         (start_step_over): Likewise.
1816         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1817         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1818         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1819         and save_inferior as saved_thread.
1820         * regcache.c (get_thread_regcache): Renamed saved_inferior as
1821         saved_thread.
1822         (regcache_invalidate_thread): Likewise.
1823         * remote-utils.c (prepare_resume_reply): Likewise.
1824         * thread-db.c (thread_db_get_tls_address): Likewise.
1825         (disable_thread_event_reporting): Likewise.
1826         (remove_thread_event_breakpoints): Likewise.
1827         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1828         as saved_thread.
1829         * target.h (set_desired_inferior): Renamed as...
1830         (set_desired_thread): New declaration.  All uses updated.
1831         * server.c (myresume): Updated comment to reference thread instead
1832         of inferior.
1833         (handle_serial_event): Likewise.
1834         (handle_target_event): Likewise.
1835
1836 2014-09-12  Tom Tromey  <tromey@redhat.com>
1837             Gary Benson  <gbenson@redhat.com>
1838
1839         * regcache.h: Include common-regcache.h.
1840         (regcache_read_pc): Don't declare.
1841         * regcache.c (get_thread_regcache_for_ptid): New function.
1842
1843 2014-09-11  Tom Tromey  <tromey@redhat.com>
1844             Gary Benson  <gbenson@redhat.com>
1845
1846         * symbol.c: New file.
1847         * Makefile.in (SFILES): Add symbol.c.
1848         (OBS): Add symbol.o.
1849
1850 2014-09-11  Gary Benson  <gbenson@redhat.com>
1851
1852         * target.c (target_stop_ptid, target_continue_ptid): New
1853         functions.
1854
1855 2014-09-11  Tom Tromey  <tromey@redhat.com>
1856             Gary Benson  <gbenson@redhat.com>
1857
1858         * target.h: Include target/target.h.
1859         * target.c (target_read_memory, target_read_uint32)
1860         (target_write_memory): New functions.
1861
1862 2014-09-11  Gary Benson  <gbenson@redhat.com>
1863
1864         * server.h (debug_hw_points): Don't declare.
1865         * server.c (debug_hw_points): Don't define.  Replace all uses
1866         with show_debug_regs.
1867         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
1868         all uses with show_debug_regs.
1869
1870 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1871
1872         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1873         endianness into account.
1874         (ppc_supply_ptrace_register): Likewise.
1875
1876 2014-09-03  James Hogan  <james.hogan@imgtec.com>
1877
1878         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1879         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1880
1881 2014-09-03  Gary Benson  <gbenson@redhat.com>
1882
1883         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1884         ALL_DEBUG_ADDRESS_REGISTERS.
1885
1886 2014-09-02  Gary Benson  <gbenson@redhat.com>
1887
1888         * i386-low.h: Renamed as...
1889         * x86-low.h: New file.  All type, function and variable name
1890         prefixes changed from "i386_" to "x86_".  All references updated.
1891         * i386-low.c: Renamed as...
1892         * x86-low.c: New file.  All type, function and variable name
1893         prefixes changed from "i386_" to "x86_".  All references updated.
1894
1895 2014-09-02  Gary Benson  <gbenson@redhat.com>
1896
1897         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1898         (x86_linux_new_thread): Likewise.
1899
1900 2014-08-29  Gary Benson  <gbenson@redhat.com>
1901
1902         * server.h (setjmp.h): Do not include.
1903         (toplevel): Do not declare.
1904         (common-exceptions.h): Include.
1905         (cleanups.h): Likewise.
1906         * server.c (toplevel): Do not define.
1907         (exit_code): New static global.
1908         (detach_or_kill_for_exit_cleanup): New function.
1909         (main): New function.  Original main renamed to...
1910         (captured_main): New function.
1911         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1912
1913 2014-08-29  Gary Benson  <gbenson@redhat.com>
1914
1915         * Makefile.in (SFILES): Add common/common-exceptions.c.
1916         (OBS): Add common-exceptions.o.
1917         (common-exceptions.o): New rule.
1918         * utils.c (prepare_to_throw_exception): New function.
1919
1920 2014-08-29  Gary Benson  <gbenson@redhat.com>
1921
1922         * config.in: Regenerate.
1923         * configure: Likewise.
1924
1925 2014-08-29  Gary Benson  <gbenson@redhat.com>
1926
1927         * Makefile.in (SFILES): Add common/cleanups.c.
1928         (OBS): cleanups.o.
1929         (cleanups.o): New rule.
1930
1931 2014-08-29  Gary Benson  <gbenson@redhat.com>
1932
1933         * utils.c (internal_vwarning): New function.
1934
1935 2014-08-28  Gary Benson  <gbenson@redhat.com>
1936
1937         * utils.h (fatal): Remove declaration.
1938         * utils.c (fatal): Remove function.
1939
1940 2014-08-28  Gary Benson  <gbenson@redhat.com>
1941
1942         * tracepoint.c (gdb_agent_init): Replace fatal with
1943         perror_with_name.
1944         (initialize_tracepoint): Likewise.
1945
1946 2014-08-28  Gary Benson  <gbenson@redhat.com>
1947
1948         * remote-utils.c (remote_prepare): Replace fatal with error.
1949
1950 2014-08-28  Gary Benson  <gbenson@redhat.com>
1951
1952         * linux-low.c (linux_async): Replace fatal with warning.
1953         Tidy up and return.
1954         (linux_start_non_stop): Return -1 if linux_async failed.
1955
1956 2014-08-28  Gary Benson  <gbenson@redhat.com>
1957
1958         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1959         gdb_assert.
1960         (i386_dr_low_get_addr): Remove vague comment.
1961         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1962         gdb_assert.
1963
1964 2014-08-28  Gary Benson  <gbenson@redhat.com>
1965
1966         * inferiors.c (get_thread_process): Replace check with gdb_assert.
1967         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1968         internal_error.
1969         (linux_resume_one_lwp): Likewise.
1970         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1971         gdb_assert.
1972         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1973         with internal_error.
1974         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1975         (init_register_cache): Replace fatal with gdb_assert_not_reached.
1976         (find_register_by_name): Replace fatal with internal_error.
1977         (find_regno): Likewise.
1978         * tdesc.c (init_target_desc): Replace check with gdb_assert.
1979         * thread-db.c (thread_db_create_event): Likewise.
1980         (thread_db_load_search): Likewise.
1981         (try_thread_db_load_1): Likewise.
1982         * tracepoint.c (get_jump_space_head): Replace fatal with
1983         internal_error.
1984         (claim_trampoline_space): Likewise.
1985         (have_fast_tracepoint_trampoline_buffer): Likewise.
1986         (cmd_qtstart): Likewise.
1987         (stop_tracing): Likewise.
1988         (fast_tracepoint_collecting): Likewise.
1989         (target_malloc): Likewise.
1990         (download_tracepoint): Likewise.
1991         (download_trace_state_variables): Replace check with gdb_assert.
1992         (upload_fast_traceframes): Replace fatal with internal_error.
1993
1994 2014-08-19  Tom Tromey  <tromey@redhat.com>
1995             Gary Benson  <gbenson@redhat.com>
1996
1997         * Makefile.in (SFILES): Add common/common-debug.c.
1998         (OBS): Add common-debug.o.
1999         (common-debug.o): New rule.
2000         * debug.h (debug_printf): Don't declare.
2001         * debug.c (debug_printf): Renamed and rewritten as...
2002         (debug_vprintf): New function.
2003
2004 2014-08-19  Gary Benson  <gbenson@redhat.com>
2005
2006         * utils.h: Do not include print-utils.h.
2007
2008 2014-08-19  Tom Tromey  <tromey@redhat.com>
2009             Gary Benson  <gbenson@redhat.com>
2010
2011         * server.h: Add static assertion.
2012         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2013
2014 2014-08-19  Tom Tromey  <tromey@redhat.com>
2015             Gary Benson  <gbenson@redhat.com>
2016
2017         * Makefile.in (SFILES): Add common/errors.c.
2018         (OBS): Add errors.o.
2019         (IPA_OBS): Add errors-ipa.o.
2020         (errors.o): New rule.
2021         (errors-ipa.o): Likewise.
2022         * utils.h (perror_with_name, error, warning): Don't declare.
2023         * utils.c (warning): Renamed and rewritten as...
2024         (vwarning): New function.
2025         (error): Renamed and rewritten as...
2026         (verror): New function.
2027         (internal_error): Renamed and rewritten as...
2028         (internal_verror): New function.
2029
2030 2014-08-07  Gary Benson  <gbenson@redhat.com>
2031
2032         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2033         * configure: Regenerate.
2034         * config.in: Likewise.
2035         * server.h: Do not include errno.h.
2036         * event-loop.c: Likewise.
2037         * hostio-errno.c: Likewise.
2038         * linux-low.c: Likewise.
2039         * remote-utils.c: Likewise.
2040         * spu-low.c: Likewise.
2041         * utils.c: Likewise.
2042         * gdbreplay.c: Unconditionally include errno.h.
2043
2044 2014-08-07  Gary Benson  <gbenson@redhat.com>
2045
2046         * server.h: Do not include string.h.
2047         * event-loop.c: Likewise.
2048         * linux-low.c: Likewise.
2049         * regcache.c: Likewise.
2050         * remote-utils.c: Likewise.
2051         * spu-low.c: Likewise.
2052         * utils.c: Likewise.
2053
2054 2014-08-07  Gary Benson  <gbenson@redhat.com>
2055
2056         * server.h: Do not include gdb_assert.h.
2057
2058 2014-08-07  Gary Benson  <gbenson@redhat.com>
2059
2060         * server.h: Do not include common-utils.h.
2061
2062 2014-08-07  Gary Benson  <gbenson@redhat.com>
2063
2064         * server.h: Do not include ptid.h.
2065         * notif.h: Likewise.
2066
2067 2014-08-07  Gary Benson  <gbenson@redhat.com>
2068
2069         * server.h: Do not include gdb_locale.h.
2070
2071 2014-08-07  Gary Benson  <gbenson@redhat.com>
2072
2073         * server.h: Do not include gdb/signals.h.
2074         * win32-low.c: Likewise.
2075
2076 2014-08-07  Gary Benson  <gbenson@redhat.com>
2077
2078         * server.h: Do not include pathmax.h.
2079
2080 2014-08-07  Gary Benson  <gbenson@redhat.com>
2081
2082         * server.h: Do not include libiberty.h.
2083         * linux-bfin-low.c: Likewise.
2084
2085 2014-08-07  Gary Benson  <gbenson@redhat.com>
2086
2087         * server.h: Do not include ansidecl.h.
2088
2089 2014-08-07  Gary Benson  <gbenson@redhat.com>
2090
2091         * linux-x86-low.c: Do not include stddef.h.
2092         * lynx-ppc-low.c: Likewise.
2093         * tracepoint.c: Likewise.
2094
2095 2014-08-07  Gary Benson  <gbenson@redhat.com>
2096
2097         * server.h: Do not include stdarg.h.
2098         * nto-low.c: Likewise.
2099
2100 2014-08-07  Gary Benson  <gbenson@redhat.com>
2101
2102         * server.h: Do not include stdlib.h.
2103         * inferiors.c: Likewise.
2104         * linux-low.c: Likewise.
2105         * regcache.c: Likewise.
2106         * spu-low.c: Likewise.
2107         * tracepoint.c: Likewise.
2108         * utils.c: Likewise.
2109
2110 2014-08-07  Gary Benson  <gbenson@redhat.com>
2111
2112         * server.h: Do not include stdio.h.
2113         * linux-low.c: Likewise.
2114         * remote-utils.c: Likewise.
2115         * spu-low.c: Likewise.
2116         * utils.c: Likewise.
2117         * wincecompat.c: Likewise.
2118
2119 2014-08-06  Gary Benson  <gbenson@redhat.com>
2120
2121         * regcache.c (init_register_cache): Move conditionals inside if.
2122
2123 2014-08-06  Gary Benson  <gbenson@redhat.com>
2124
2125         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2126
2127 2014-07-31  Gary Benson  <gbenson@redhat.com>
2128
2129         * ax.h: Do not include server.h.
2130         * gdbthread.h: Likewise.
2131         * lynx-low.h: Likewise.
2132         * notif.h: Likewise.
2133
2134 2014-07-30  Gary Benson  <gbenson@redhat.com>
2135
2136         * server.h: Include common-defs.h.
2137         Do not include config.h or build-gnulib-gdbserver/config.h.
2138
2139 2014-07-30  Gary Benson  <gbenson@redhat.com>
2140
2141         * hostio-errno.c: Move server.h to top of includes list.
2142         * inferiors.c: Likewise.
2143         * linux-x86-low.c: Likewise.
2144         * notif.c: Include server.h.
2145
2146 2014-07-24  Tom Tromey  <tromey@redhat.com>
2147             Gary Benson  <gbenson@redhat.com>
2148
2149         * server.h (CORE_ADDR): Now unsigned.
2150
2151 2014-07-16  Pedro Alves  <palves@redhat.com>
2152
2153         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2154
2155 2014-07-15  Pedro Alves  <palves@redhat.com>
2156
2157         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2158         copy.
2159
2160 2014-07-11  Pedro Alves  <palves@redhat.com>
2161
2162         * linux-low.c (kill_wait_lwp): New function, based on
2163         kill_one_lwp_callback, but use my_waitpid directly.
2164         (kill_one_lwp_callback, linux_kill): Use it.
2165
2166 2014-06-23  Pedro Alves  <palves@redhat.com>
2167
2168         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2169         before setting DR0..DR3.
2170
2171 2014-06-20  Gary Benson  <gbenson@redhat.com>
2172
2173         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2174         * configure: Regenerated.
2175         * config.in: Likewise.
2176
2177 2014-06-20  Gary Benson  <gbenson@redhat.com>
2178
2179         * Makefile.in (SFILES): Update locations for files moved
2180         from common to nat.
2181         (object file files): Reordered.
2182
2183 2014-06-20  Gary Benson  <gbenson@redhat.com>
2184
2185         * i386-low.h (i386_dr_low_can_set_addr): Removed.
2186         (i386_dr_low_set_addr): Likewise.
2187         (i386_dr_low_get_addr): Likewise.
2188         (i386_dr_low_can_set_control): Likewise.
2189         (i386_dr_low_set_control): Likewise.
2190         (i386_dr_low_get_control): Likewise.
2191         (i386_dr_low_get_status): Likewise.
2192         (i386_get_debug_register_length): Likewise.
2193         * linux-x86-low.c (i386_dr_low_set_addr):
2194         Changed signature.  Made static.
2195         (i386_dr_low_get_addr): Likewise.
2196         (i386_dr_low_set_control): Likewise.
2197         (i386_dr_low_get_control): Likewise.
2198         (i386_dr_low_get_status): Likewise.
2199         (i386_dr_low): New global variable.
2200         * win32-i386-low.c (i386_dr_low_set_addr):
2201         Changed signature.  Made static.
2202         (i386_dr_low_get_addr): Likewise.
2203         (i386_dr_low_set_control): Likewise.
2204         (i386_dr_low_get_control): Likewise.
2205         (i386_dr_low_get_status): Likewise.
2206         (i386_dr_low): New global variable.
2207
2208 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
2209
2210         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2211         * Makefile.in (AR, AR_FLAGS): Define.
2212         * configure: Regenerate.
2213
2214 2014-06-19  Gary Benson  <gbenson@redhat.com>
2215
2216         * Makefile.in (i386-dregs.o): New rule.
2217         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2218         * i386-low.c (target.h): Remove include.
2219         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2220         (DR_CONTROL_SHIFT): Likewise.
2221         (DR_CONTROL_SIZE): Likewise.
2222         (DR_RW_EXECUTE): Likewise.
2223         (DR_RW_WRITE): Likewise.
2224         (DR_RW_READ): Likewise.
2225         (DR_RW_IORW): Likewise.
2226         (DR_LEN_1): Likewise.
2227         (DR_LEN_2): Likewise.
2228         (DR_LEN_4): Likewise.
2229         (DR_LEN_8): Likewise.
2230         (DR_LOCAL_ENABLE_SHIFT): Likewise.
2231         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2232         (DR_ENABLE_SIZE): Likewise.
2233         (DR_LOCAL_SLOWDOWN): Likewise.
2234         (DR_GLOBAL_SLOWDOWN): Likewise.
2235         (DR_CONTROL_RESERVED): Likewise.
2236         (I386_DR_CONTROL_MASK): Likewise.
2237         (I386_DR_VACANT): Likewise.
2238         (I386_DR_LOCAL_ENABLE): Likewise.
2239         (I386_DR_GLOBAL_ENABLE): Likewise.
2240         (I386_DR_DISABLE): Likewise.
2241         (I386_DR_SET_RW_LEN): Likewise.
2242         (I386_DR_GET_RW_LEN): Likewise.
2243         (I386_DR_WATCH_HIT): Likewise.
2244         (i386_wp_op_t): Likewise.
2245         (i386_show_dr): Likewise.
2246         (i386_length_and_rw_bits): Likewise.
2247         (i386_insert_aligned_watchpoint): Likewise.
2248         (i386_remove_aligned_watchpoint): Likewise.
2249         (i386_handle_nonaligned_watchpoint): Likewise.
2250         i386_update_inferior_debug_regs(): Likewise.
2251         (i386_dr_insert_watchpoint): Likewise.
2252         (i386_dr_remove_watchpoint): Likewise.
2253         (i386_dr_region_ok_for_watchpoint): Likewise.
2254         (i386_dr_stopped_data_address): Likewise.
2255         (i386_dr_stopped_by_watchpoint): Likewise.
2256
2257 2014-06-19  Gary Benson  <gbenson@redhat.com>
2258
2259         * i386-low.c (i386_dr_show): Renamed to
2260         i386_show_dr and made static.  All uses updated.
2261         (i386_dr_length_and_rw_bits): Renamed to
2262         i386_length_and_rw_bits and made static.
2263         All uses updated.
2264         (i386_dr_insert_aligned_watchpoint): Renamed to
2265         i386_insert_aligned_watchpoint and made static.
2266         All uses updated.
2267         (i386_dr_remove_aligned_watchpoint): Renamed to
2268         i386_remove_aligned_watchpoint and made static.
2269         All uses updated.
2270         (i386_dr_update_inferior_debug_regs): Renamed to
2271         i386_update_inferior_debug_regs and made static.
2272         All uses updated.
2273
2274 2014-06-18  Gary Benson  <gbenson@redhat.com>
2275
2276         * i386-low.h (i386_dr_low_can_set_addr): New macro.
2277         (i386_dr_low_can_set_control): Likewise.
2278         (i386_get_debug_register_length): Likewise.
2279         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2280         (i386_dr_low_can_set_control): Likewise.
2281         (i386_get_debug_register_length): Likewise.
2282
2283 2014-06-17  Gary Benson  <gbenson@redhat.com>
2284
2285         * i386-low.h (i386-dregs.h): New include.
2286         (DR_FIRSTADDR): Now in i386-dregs.h.
2287         (DR_LASTADDR): Likewise.
2288         (DR_NADDR): Likewise.
2289         (DR_STATUS): Likewise.
2290         (DR_CONTROL): Likewise.
2291         (i386_debug_reg_state): Likewise.
2292         (i386_dr_insert_watchpoint): Likewise.
2293         (i386_dr_remove_watchpoint): Likewise.
2294         (i386_dr_region_ok_for_watchpoint): Likewise.
2295         (i386_dr_stopped_data_address): Likewise.
2296         (i386_dr_stopped_by_watchpoint): Likewise.
2297         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2298
2299 2014-06-18  Gary Benson  <gbenson@redhat.com>
2300
2301         * i386-low.h (i386_low_insert_watchpoint): Renamed to
2302         i386_dr_insert_watchpoint.
2303         (i386_low_remove_watchpoint): Renamed to
2304         i386_dr_remove_watchpoint.
2305         (i386_low_region_ok_for_watchpoint): Renamed to
2306         i386_dr_region_ok_for_watchpoint.
2307         (i386_low_stopped_data_address): Renamed to
2308         i386_dr_stopped_data_address.
2309         (i386_low_stopped_by_watchpoint): Renamed to
2310         i386_dr_stopped_by_watchpoint.
2311         * i386-low.c (i386_show_dr): Renamed to
2312         i386_dr_show and made nonstatic.  All uses updated.
2313         (i386_length_and_rw_bits): Renamed to
2314         i386_dr_length_and_rw_bits and made nonstatic.
2315         All uses updated.
2316         (i386_insert_aligned_watchpoint): Renamed to
2317         i386_dr_insert_aligned_watchpoint and made nonstatic.
2318         All uses updated.
2319         (i386_remove_aligned_watchpoint): Renamed to
2320         i386_dr_remove_aligned_watchpoint and made nonstatic.
2321         All uses updated.
2322         (i386_update_inferior_debug_regs): Renamed to
2323         i386_dr_update_inferior_debug_regs and made nonstatic.
2324         All uses updated.
2325         (i386_low_insert_watchpoint): Renamed to
2326         i386_dr_insert_watchpoint.  All uses updated.
2327         (i386_low_remove_watchpoint): Renamed to
2328         i386_dr_remove_watchpoint.  All uses updated.
2329         (i386_low_region_ok_for_watchpoint): Renamed to
2330         i386_dr_region_ok_for_watchpoint.  All uses updated.
2331         (i386_low_stopped_data_address): Renamed to
2332         i386_dr_stopped_data_address.  All uses updated.
2333         (i386_low_stopped_by_watchpoint): Renamed to
2334         i386_dr_stopped_by_watchpoint.  All uses updated.
2335
2336 2014-06-18  Gary Benson  <gbenson@redhat.com>
2337
2338         * i386-low.c (i386_dr_low_can_set_addr): New macro.
2339         (i386_dr_low_can_set_control): Likewise.
2340         (i386_insert_aligned_watchpoint): New check.
2341
2342 2014-06-18  Gary Benson  <gbenson@redhat.com>
2343
2344         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2345         Renamed to state.
2346
2347 2014-06-18  Gary Benson  <gbenson@redhat.com>
2348
2349         * i386-low.c (i386_length_and_rw_bits): Use internal_error
2350         instead of fatal and error.
2351         (i386_handle_nonaligned_watchpoint): Likewise.
2352
2353 2014-06-18  Gary Benson  <gbenson@redhat.com>
2354
2355         * i386-low.c (i386_get_debug_register_length): New macro.
2356         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
2357         (i386_show_dr): Use debug_printf instead of fprintf.  Use
2358         phex to format values.
2359
2360 2014-06-18  Gary Benson  <gbenson@redhat.com>
2361
2362         * i386-low.h: Comment changes.
2363         * i386-low.c: Likewise.
2364
2365 2014-06-18  Gary Benson  <gbenson@redhat.com>
2366
2367         * i386-low.c: Whitespace changes.
2368
2369 2014-06-12  Tom Tromey  <tromey@redhat.com>
2370
2371         * utils.c (freeargv): Remove.
2372
2373 2014-06-12  Tom Tromey  <tromey@redhat.com>
2374
2375         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2376         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2377         (parse_debug_format_options): Likewise.
2378         (gdbserver_usage): Likewise.
2379         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2380         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2381         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2382         against libiberty.
2383         ($(LIBGNU)): Depend on libiberty.
2384         (all-lib): Recurse into all subdirs.
2385         (install-only): Invoke "install" target in subdirs.
2386         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2387         targets.
2388         * configure: Rebuild.
2389         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
2390         for vasprintf, vsnprintf, or gettimeofday.
2391         * configure.srv: Don't add safe-ctype.o or lbasename.o to
2392         srv_tgtobj.
2393
2394 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
2395
2396         * development.sh: Delete.
2397         * Makefile.in (config.status): Adjust dependency on development.sh.
2398         * configure.ac: Adjust development.sh source call.
2399         * configure: Regenerate.
2400
2401 2014-06-02  Pedro Alves  <palves@redhat.com>
2402
2403         * ax.c (gdb_free_agent_expr): New function.
2404         * ax.h (gdb_free_agent_expr): New declaration.
2405         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2406         list.
2407         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2408         static.
2409         (clear_breakpoint_conditions_and_commands): New function.
2410         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2411         (clear_breakpoint_conditions_and_commands): New declaration.
2412
2413 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2414
2415         * linux-aarch64-low.c (asm/ptrace.h): Include.
2416
2417 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2418
2419         Fix TLS access for -static -pthread.
2420         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2421         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2422         (thread_db_load_search, try_thread_db_load_1): Initialize it.
2423
2424 2014-05-20  Pedro Alves  <palves@redhat.com>
2425
2426         * linux-aarch64-low.c (aarch64_insert_point)
2427         (aarch64_remove_point): No longer check whether the type is
2428         supported here.  Adjust to new interface.
2429         (the_low_target): Install aarch64_supports_z_point_type as
2430         supports_z_point_type method.
2431         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2432         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2433         instead of a Z packet char.  Adjust.
2434         (arm_supports_z_point_type): New function.
2435         (arm_insert_point, arm_remove_point): Adjust to new interface.
2436         (the_low_target): Install arm_supports_z_point_type.
2437         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2438         (cris_insert_point, cris_remove_point): Adjust to new interface.
2439         Don't check whether the type is supported here.
2440         (the_low_target): Install cris_supports_z_point_type.
2441         * linux-low.c (linux_supports_z_point_type): New function.
2442         (linux_insert_point, linux_remove_point): Adjust to new interface.
2443         * linux-low.h (struct linux_target_ops) <insert_point,
2444         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
2445         raw_breakpoint pointer parameter.
2446         <supports_z_point_type>: New method.
2447         * linux-mips-low.c (mips_supports_z_point_type): New function.
2448         (mips_insert_point, mips_remove_point): Adjust to new interface.
2449         Use mips_supports_z_point_type.
2450         (the_low_target): Install mips_supports_z_point_type.
2451         * linux-ppc-low.c (the_low_target): Install NULL as
2452         supports_z_point_type method.
2453         * linux-s390-low.c (the_low_target): Install NULL as
2454         supports_z_point_type method.
2455         * linux-sparc-low.c (the_low_target): Install NULL as
2456         supports_z_point_type method.
2457         * linux-x86-low.c (x86_supports_z_point_type): New function.
2458         (x86_insert_point): Adjust to new insert_point interface.  Use
2459         insert_memory_breakpoint.  Adjust to new
2460         i386_low_insert_watchpoint interface.
2461         (x86_remove_point): Adjust to remove_point interface.  Use
2462         remove_memory_breakpoint.  Adjust to new
2463         i386_low_remove_watchpoint interface.
2464         (the_low_target): Install x86_supports_z_point_type.
2465         * lynx-low.c (lynx_target_ops): Install NULL as
2466         supports_z_point_type callback.
2467         * nto-low.c (nto_supports_z_point_type): New.
2468         (nto_insert_point, nto_remove_point): Adjust to new interface.
2469         (nto_target_ops): Install nto_supports_z_point_type.
2470         * mem-break.c: Adjust intro comment.
2471         (struct raw_breakpoint) <raw_type, size>: New fields.
2472         <inserted>: Update comment.
2473         <shlib_disabled>: Delete field.
2474         (enum bkpt_type) <gdb_breakpoint>: Delete value.
2475         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2476         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2477         (raw_bkpt_type_to_target_hw_bp_type): New function.
2478         (find_enabled_raw_code_breakpoint_at): New function.
2479         (find_raw_breakpoint_at): New type and size parameters.  Use them.
2480         (insert_memory_breakpoint): New function, based off
2481         set_raw_breakpoint_at.
2482         (remove_memory_breakpoint): New function.
2483         (set_raw_breakpoint_at): Reimplement.
2484         (set_breakpoint): New, based on set_breakpoint_at.
2485         (set_breakpoint_at): Reimplement.
2486         (delete_raw_breakpoint): Go through the_target->remove_point
2487         instead of assuming memory breakpoints.
2488         (find_gdb_breakpoint_at): Delete.
2489         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2490         (find_gdb_breakpoint): New function.
2491         (set_gdb_breakpoint_at): Delete.
2492         (z_type_supported): New function.
2493         (set_gdb_breakpoint_1): New function, loosely based off
2494         set_gdb_breakpoint_at.
2495         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2496         (delete_gdb_breakpoint_at): Delete.
2497         (delete_gdb_breakpoint_1): New function, loosely based off
2498         delete_gdb_breakpoint_at.
2499         (delete_gdb_breakpoint): New function.
2500         (clear_gdb_breakpoint_conditions): Rename to ...
2501         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
2502         breakpoint.
2503         (add_condition_to_breakpoint): Make static.
2504         (add_breakpoint_condition): Take a struct breakpoint pointer
2505         instead of an address.  Adjust.
2506         (gdb_condition_true_at_breakpoint): Rename to ...
2507         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2508         z_type parameter.
2509         (gdb_condition_true_at_breakpoint): Reimplement.
2510         (add_breakpoint_commands): Take a struct breakpoint pointer
2511         instead of an address.  Adjust.
2512         (gdb_no_commands_at_breakpoint): Rename to ...
2513         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
2514         parameter.  Return true if no breakpoint was found.  Change debug
2515         output.
2516         (gdb_no_commands_at_breakpoint): Reimplement.
2517         (run_breakpoint_commands): Rename to ...
2518         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
2519         and change return type to boolean.
2520         (run_breakpoint_commands): New function.
2521         (gdb_breakpoint_here): Also check for Z1 breakpoints.
2522         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2523         breakpoint.  Go through the_target->remove_point instead of
2524         assuming memory breakpoint.
2525         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2526         software and hardware breakpoints.
2527         (reinsert_raw_breakpoint): Go through the_target->insert_point
2528         instead of assuming memory breakpoint.
2529         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2530         software and hardware breakpoints.
2531         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2532         Check both software and hardware breakpoints.
2533         (validate_inserted_breakpoint): Assert the breakpoint is a
2534         software breakpoint.  Set the inserted flag to -1 instead of
2535         setting shlib_disabled.
2536         (delete_disabled_breakpoints): Adjust.
2537         (validate_breakpoints): Only validate software breakpoints.
2538         Adjust to inserted flag change.
2539         (check_mem_read, check_mem_write): Skip breakpoint types other
2540         than software breakpoints.  Adjust to inserted flag change.
2541         * mem-break.h (enum raw_bkpt_type): New enum.
2542         (raw_breakpoint, struct process_info): Forward declare.
2543         (Z_packet_to_target_hw_bp_type): Delete declaration.
2544         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2545         (set_gdb_breakpoint, delete_gdb_breakpoint)
2546         (clear_breakpoint_conditions): New declarations.
2547         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2548         (breakpoint_inserted_here): Update comment.
2549         (add_breakpoint_condition, add_breakpoint_commands): Replace
2550         address parameter with a breakpoint pointer parameter.
2551         (gdb_breakpoint_here): Update comment.
2552         (delete_gdb_breakpoint_at): Delete.
2553         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2554         * server.c (process_point_options): Take a struct breakpoint
2555         pointer instead of an address.  Adjust.
2556         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2557         delete_gdb_breakpoint.
2558         * spu-low.c (spu_target_ops): Install NULL as
2559         supports_z_point_type method.
2560         * target.h: Include mem-break.h.
2561         (struct target_ops) <prepare_to_access_memory>: Update comment.
2562         <supports_z_point_type>: New field.
2563         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2564         instead of a char.  Also take a raw breakpoint pointer.
2565         * win32-arm-low.c (the_low_target): Install NULL as
2566         supports_z_point_type.
2567         * win32-i386-low.c (i386_supports_z_point_type): New function.
2568         (i386_insert_point, i386_remove_point): Adjust to new interface.
2569         (the_low_target): Install i386_supports_z_point_type.
2570         * win32-low.c (win32_supports_z_point_type): New function.
2571         (win32_insert_point, win32_remove_point): Adjust to new interface.
2572         (win32_target_ops): Install win32_supports_z_point_type.
2573         * win32-low.h (struct win32_target_ops):
2574         <supports_z_point_type>: New method.
2575         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2576         instead of a char.  Also take a raw breakpoint pointer.
2577
2578 2014-05-20  Pedro Alves  <palves@redhat.com>
2579
2580         * mem-break.h: Include break-common.h.
2581         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2582         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2583         (Z_packet_to_target_hw_bp_type): New declaration.
2584         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2585         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2586         (Z_PACKET_ACCESS_WP): Delete macros.
2587         (Z_packet_to_hw_type): Delete function.
2588         * i386-low.h: Don't include break-common.h here.
2589         (Z_packet_to_hw_type): Delete declaration.
2590         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2591         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2592         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2593         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2594         * linux-aarch64-low.c: Don't include break-common.h here.
2595         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2596         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2597         (Z_packet_to_target_hw_bp_type): Delete function.
2598         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2599         function.
2600         (mips_insert_point, mips_remove_point): Use
2601         Z_packet_to_target_hw_bp_type.
2602
2603 2014-05-20  Pedro Alves  <palves@redhat.com>
2604
2605         * linux-aarch64-low.c: Include break-common.h.
2606         (enum target_point_type): Delete.
2607         (Z_packet_to_point_type): Rename to ...
2608         (Z_packet_to_target_hw_bp_type): ... this, and return a
2609         target_hw_bp_type instead.
2610         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2611         instead of an enum target_point_type.
2612         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
2613         breakpoint type.
2614         (aarch64_dr_state_insert_one_point)
2615         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2616         (aarch64_handle_aligned_watchpoint)
2617         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2618         Take an enum target_hw_bp_type instead of an enum
2619         target_point_type.
2620         (aarch64_supports_z_point_type): New function.
2621         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
2622         use Z_packet_to_target_hw_bp_type.
2623
2624 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
2625
2626         * configure.ac: Only use -Werror by default when DEVELOPMENT
2627         is true.
2628         * configure: Regenerate.
2629
2630 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
2631
2632         Fix gdbserver qGetTLSAddr for x86_64 -m32.
2633         * linux-x86-low.c (X86_64_USER_REGS): New.
2634         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2635
2636 2014-04-28  Yao Qi  <yao@codesourcery.com>
2637
2638         * Makefile.in (i386-avx512.c): Fix the typo of generated file
2639         name.
2640
2641 2014-04-25  Pedro Alves  <palves@redhat.com>
2642
2643         PR server/16255
2644         * linux-low.c (linux_attach_fail_reason_string): New function.
2645         (linux_attach_lwp): Delete.
2646         (linux_attach_lwp_1): Rename to ...
2647         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
2648         argument.  Remove "initial" parameter.  Return int instead of
2649         void.  Don't error or warn here.
2650         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
2651         failure to attach to the tgid.  Call warning when failing to
2652         attach to an lwp.
2653         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2654         argument.  Remove "initial" parameter.  Return int instead of
2655         void.  Don't error or warn here.
2656         (linux_attach_fail_reason_string): New declaration.
2657         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2658         interface change.  Use linux_attach_fail_reason_string.
2659
2660 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
2661             Walfred Tedeschi  <walfred.tedeschi@intel.com>
2662
2663         * Makefile.in: Added rules to handle new files
2664         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2665         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2666         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2667         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2668         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2669         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2670         x32-avx512-linux.o.
2671         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2672         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2673         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2674         i386/x32-avx512.xml.
2675         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2676         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2677         i386/x32-avx512-linux.xml.
2678         * i387-fp.c (num_avx512_k_registers): New constant for number
2679         of K registers.
2680         (num_avx512_zmmh_low_registers): New constant for number of
2681         lower ZMM registers (0-15).
2682         (num_avx512_zmmh_high_registers): New constant for number of
2683         higher ZMM registers (16-31).
2684         (num_avx512_ymmh_registers): New contant for number of higher
2685         YMM registers (ymm16-31 added by avx521 on x86_64).
2686         (num_avx512_xmm_registers): New constant for number of higher
2687         XMM registers (xmm16-31 added by AVX512 on x86_64).
2688         (struct i387_xsave): Add space for AVX512 registers.
2689         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2690         Add code to handle AVX512 registers.
2691         (i387_xsave_to_cache): Add code to handle AVX512 registers.
2692         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2693         prototypei from generated file.
2694         (tdesc_amd64_avx512_linux): Likewise.
2695         (init_registers_x32_avx512_linux): Likewise.
2696         (tdesc_x32_avx512_linux): Likewise.
2697         (init_registers_i386_avx512_linux): Likewise.
2698         (tdesc_i386_avx512_linux): Likewise.
2699         (x86_64_regmap): Add AVX512 registers.
2700         (x86_linux_read_description): Add code to handle AVX512 XSTATE
2701         mask.
2702         (initialize_low_arch): Add code to initialize AVX512 registers.
2703
2704 2014-04-23  Pedro Alves  <palves@redhat.com>
2705
2706         * mem-break.c (find_gdb_breakpoint_at): Make static.
2707         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2708
2709 2014-04-23  Pedro Alves  <palves@redhat.com>
2710
2711         * i386-low.c: Don't include break-common.h here.
2712         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2713         prototype to take target_hw_bp_type as argument instead of a Z
2714         packet char.
2715         * i386-low.h: Include break-common.h here.
2716         (Z_packet_to_hw_type): Declare.
2717         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2718         prototypes.
2719         * linux-x86-low.c (x86_insert_point): Convert the packet number to
2720         a target_hw_bp_type before calling i386_low_insert_watchpoint.
2721         (x86_remove_point): Convert the packet number to a
2722         target_hw_bp_type before calling i386_low_remove_watchpoint.
2723         * win32-i386-low.c (i386_insert_point): Convert the packet number
2724         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2725         (i386_remove_point): Convert the packet number to a
2726         target_hw_bp_type before calling i386_low_remove_watchpoint.
2727
2728 2014-04-23  Pedro Alves  <palves@redhat.com>
2729
2730         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2731
2732 2014-04-10  Pedro Alves  <palves@redhat.com>
2733
2734         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2735         Check if the condition or command is NULL before checking if the
2736         breakpoint is known.  On success, return true.
2737         * mem-break.h (add_breakpoint_condition): Document return.
2738         (add_breakpoint_commands): Add describing comment.
2739         * server.c (skip_to_semicolon): New function.
2740         (process_point_options): Use it.
2741
2742 2014-04-09  Pedro Alves  <palves@redhat.com>
2743
2744         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2745         to lwpid_of.
2746
2747 2014-02-27  Pedro Alves  <palves@redhat.com>
2748
2749         PR 12702
2750         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2751         macros.
2752         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2753         output.
2754         (last_thread_of_process_p): Take a PID argument instead of a
2755         thread pointer.
2756         (linux_wait_for_lwp): Delete.
2757         (num_lwps, check_zombie_leaders, not_stopped_callback): New
2758         functions.
2759         (linux_low_filter_event): New function, party factored out from
2760         linux_wait_for_event.
2761         (linux_wait_for_event): Rename to ...
2762         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
2763         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
2764         sigsuspend.  Check for zombie leaders.
2765         (linux_wait_for_event): Reimplement as wrapper around
2766         linux_wait_for_event_filtered.
2767         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
2768         a normal or signal exit is seen, it's the whole process exiting.
2769         (wait_for_sigstop): No longer a for_each_inferior callback.
2770         Rewrite on top of linux_wait_for_event_filtered.
2771         (stop_all_lwps): Call wait_for_sigstop directly.
2772         * server.c (resume, handle_target_event): Handle
2773         TARGET_WAITKIND_NO_RESUMED.
2774
2775 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
2776
2777         * win32-low.c (psapi_get_dll_name,
2778         * win32_CreateToolhelp32Snapshot): Delete.
2779         (win32_CreateToolhelp32Snapshot, win32_Module32First)
2780         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2781         Delete.
2782         (handle_load_dll): Add function description.
2783         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2784
2785 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
2786
2787         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2788         Add comment.
2789         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2790         base address when calling win32_add_one_solib.
2791         (handle_load_dll): Delete local variable load_addr.
2792         Remove 0x1000 offset applied to DLL base address when calling
2793         win32_add_one_solib.
2794         (handle_unload_dll): Add comment.
2795
2796 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
2797
2798         * win32-low.c (win32_add_all_dlls): Renames
2799         win32_ensure_ntdll_loaded.  Rewrite function documentation.
2800         Adjust implementation to always load all DLLs.
2801         Add 0x1000 offset to DLL base address when calling
2802         win32_add_one_solib.
2803         (child_initialization_done): New static global.
2804         (do_initial_child_stuff): Set child_initialization_done to
2805         zero during child initialization, and 1 after.  Replace call
2806         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2807         Add comment.
2808         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2809         (handle_unload_dll): Add function documentation.
2810         (get_child_debug_event): Ignore load and unload DLL events
2811         during child initialization.
2812
2813 2014-02-20  Doug Evans  <dje@google.com>
2814
2815         Remove global all_lwps.
2816         * inferiors.h (ptid_of): Move here from linux-low.h.
2817         (pid_of, lwpid_of): Ditto.
2818         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2819         parameter is a struct thread_info * now.
2820         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2821         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
2822         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2823         directly.
2824         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2825         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2826         * linux-arm-low.c (update_registers_callback): Update, "entry"
2827         parameter is a struct thread_info * now.
2828         Fetch lwpid from current_inferior directly.
2829         (arm_insert_point): Pass &all_threads to find_inferior instead of
2830         &all_lwps.
2831         (arm_remove_point): Ditto.
2832         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2833         (arm_prepare_to_resume): Fetch pid from thread.
2834         (arm_read_description): Fetch lwpid from current_inferior directly.
2835         * linux-low.c (all_lwps): Delete.
2836         (delete_lwp): Delete call to remove_inferior.
2837         (handle_extended_wait): Fetch lwpid from thread.
2838         (add_lwp): Don't set lwp->entry.id.  Remove call to
2839         add_inferior_to_list.
2840         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2841         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2842         (kill_one_lwp_callback): Ditto.
2843         (linux_kill): Don't dereference NULL pointer.
2844         Fetch ptid,lwpid from thread.
2845         (get_detach_signal): Fetch ptid from thread.
2846         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2847         Simplify call to regcache_invalidate_thread.
2848         (delete_lwp_callback): Update, "entry" parameter is a
2849         struct thread_info * now.  Fetch pid from thread.
2850         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2851         (status_pending_p_callback): Update, "entry" parameter is a
2852         struct thread_info * now.  Fetch ptid from thread.
2853         (find_lwp_pid): Update, "entry" parameter is a
2854         struct thread_info * now.
2855         (linux_wait_for_lwp): Fetch pid from thread.
2856         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2857         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2858         (enqueue_one_deferred_signal): Fetch lwpid from thread.
2859         (dequeue_one_deferred_signal): Ditto.
2860         (cancel_breakpoint): Fetch ptid from current_inferior.
2861         (linux_wait_for_event): Pass &all_threads to find_inferior,
2862         not &all_lwps.  Fetch ptid, lwpid from thread.
2863         (count_events_callback): Update, "entry" parameter is a
2864         struct thread_info * now.
2865         (select_singlestep_lwp_callback): Ditto.
2866         (select_event_lwp_callback): Ditto.
2867         (cancel_breakpoints_callback): Ditto.
2868         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2869         not &all_lwps.
2870         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
2871         (unsuspend_one_lwp): Update, "entry" parameter is a
2872         struct thread_info * now.
2873         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2874         not &all_lwps.
2875         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
2876         Fetch lwpid from thread, not lwp.
2877         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2878         Pass &all_threads to find_inferior, not &all_lwps.
2879         (send_sigstop): Fetch lwpid from thread, not lwp.
2880         (send_sigstop_callback): Update, "entry" parameter is a
2881         struct thread_info * now.
2882         (suspend_and_send_sigstop_callback): Ditto.
2883         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
2884         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2885         struct thread_info * now.
2886         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
2887         from thread, lwp.
2888         (lwp_running): Update, "entry" parameter is a
2889         struct thread_info * now.
2890         (stop_all_lwps): Fetch ptid from thread.
2891         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2892         (linux_resume_one_lwp): Fetch lwpid from thread.
2893         (linux_set_resume_request): Update, "entry" parameter is a
2894         struct thread_info * now.  Fetch pid, lwpid from thread.
2895         (resume_status_pending_p): Update, "entry" parameter is a
2896         struct thread_info * now.
2897         (need_step_over_p): Ditto.  Fetch lwpid from thread.
2898         (start_step_over): Fetch lwpid from thread.
2899         (linux_resume_one_thread): Update, "entry" parameter is a
2900         struct thread_info * now.  Fetch lwpid from thread.
2901         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2902         (proceed_one_lwp): Update, "entry" parameter is a
2903         struct thread_info * now.  Fetch lwpid from thread.
2904         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2905         struct thread_info * now.
2906         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2907         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
2908         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2909         directly.
2910         (regsets_store_inferior_registers): Ditto.
2911         (fetch_register, store_register): Ditto.
2912         (linux_read_memory, linux_write_memory): Ditto.
2913         (linux_request_interrupt): Ditto.
2914         (linux_read_auxv): Ditto.
2915         (linux_xfer_siginfo): Ditto.
2916         (linux_qxfer_spu): Ditto.
2917         (linux_qxfer_libraries_svr4): Ditto.
2918         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2919         moved to inferiors.h.
2920         (get_lwp): Delete.
2921         (get_thread_lwp): Update.
2922         (struct lwp_info): Delete member "entry".  Simplify comment for
2923         member "thread".
2924         (all_lwps): Delete.
2925         * linux-mips-low.c (mips_read_description): Fetch lwpid from
2926         current_inferior directly.
2927         (update_watch_registers_callback): Update, "entry" parameter is a
2928         struct thread_info * now.  Fetch pid from thread.
2929         (mips_linux_prepare_to_resume): Fetch ptid from thread.
2930         (mips_insert_point): Fetch lwpid from current_inferior.
2931         Pass &all_threads to find_inferior, not &all_lwps.
2932         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2933         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2934         directly.
2935         (mips_stopped_data_address): Ditto.
2936         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2937         directly.
2938         * linux-tile-low.c (tile_arch_setup): Ditto.
2939         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2940         (update_debug_registers_callback): Update, "entry" parameter is a
2941         struct thread_info * now.  Fetch pid from thread.
2942         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2943         Pass &all_threads to find_inferior, not &all_lwps.
2944         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2945         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2946         Pass &all_threads to find_inferior, not &all_lwps.
2947         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2948         (i386_dr_low_get_status): Ditto.
2949         (x86_linux_prepare_to_resume): Fetch ptid from thread.
2950         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2951         (x86_linux_read_description): Ditto.
2952         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2953
2954 2014-02-20  Doug Evans  <dje@google.com>
2955
2956         * inferiors.c (get_first_inferior): Fix buglet.
2957
2958 2014-02-19  Doug Evans  <dje@google.com>
2959
2960         * gdbthread.h (add_thread): Change result type to struct thread_info *.
2961         * inferiors.c (add_thread): Change result type to struct thread_info *.
2962         All callers updated.
2963         (add_lwp): Call add_thread here instead of in callers.
2964         All callers updated.
2965         * linux-low.h (get_lwp_thread): Rewrite.
2966         (struct lwp_info): New member "thread".
2967
2968 2014-02-19  Doug Evans  <dje@google.com>
2969
2970         * linux-low.c (add_lwp): Change result to struct lwp_info *.
2971         All callers updated.
2972
2973 2014-02-19  Doug Evans  <dje@google.com>
2974
2975         * inferiors.c (add_thread): Fix whitespace.
2976
2977 2014-02-19  Doug Evans  <dje@google.com>
2978
2979         * dll.c (clear_dlls): Replace accessing list implemention details
2980         with API function.
2981         * gdbthread.h (get_first_thread): Declare.
2982         * inferiors.c (for_each_inferior_with_data): New function.
2983         (get_first_thread): New function.
2984         (find_thread_ptid): Simplify.
2985         (get_first_inferior): New function.
2986         (clear_list): Delete.
2987         (one_inferior_p): New function.
2988         (clear_inferior_list): New function.
2989         (clear_inferiors): Update.
2990         * inferiors.h (for_each_inferior_with_data): Declare.
2991         (clear_inferior_list): Declare.
2992         (one_inferior_p): Declare.
2993         (get_first_inferior): Declare.
2994         * linux-low.c (linux_wait_for_event): Replace accessing list
2995         implemention details with API function.
2996         * server.c (target_running): Ditto.
2997         (accumulate_file_name_length): New function.
2998         (emit_dll_description): New function.
2999         (handle_qxfer_libraries): Replace accessing list implemention
3000         details with API function.
3001         (handle_qxfer_threads_worker): New function.
3002         (handle_qxfer_threads_proper): Replace accessing list implemention
3003         details with API function.
3004         (handle_query): Ditto.
3005         (visit_actioned_threads_callback_ftype): New typedef.
3006         (visit_actioned_threads_data): New struct.
3007         (visit_actioned_threads): Rewrite to be find_inferior callback.
3008         (resume): Call find_inferior.
3009         (handle_status): Replace accessing list implemention
3010         details with API function.
3011         (process_serial_event): Replace accessing list implemention details
3012         with API function.
3013         * target.c (set_desired_inferior): Replace accessing list implemention
3014         details with API function.
3015         * tracepoint.c (same_process_p): New function.
3016         (gdb_agent_about_to_close): Replace accessing list implemention
3017         details with API function.
3018         * win32-low.c (child_delete_thread): Replace accessing list
3019         implemention details with API function.
3020         (match_dll_by_basename): New function.
3021         (dll_is_loaded_by_basename): New function.
3022         (win32_ensure_ntdll_loaded): Replace accessing list implemention
3023         details call to dll_is_loaded_by_basename.
3024
3025 2014-02-19  Doug Evans  <dje@google.com>
3026
3027         * dll.h (struct dll_info): Add comment.
3028         * gdbthread.h (struct thread_info): Add comment.
3029         (current_ptid): Simplify.
3030         * inferiors.c (add_process): Update.
3031         (remove_process): Update.
3032         * inferiors.h (struct process_info): Rename member "head" to "entry".
3033         * linux-low.c (delete_lwp): Update.
3034         (add_lwp): Update.
3035         (last_thread_of_process_p): Update.
3036         (kill_one_lwp_callback, linux_kill): Update.
3037         (status_pending_p_callback): Update.
3038         (wait_for_sigstop): Update.  Simplify read of ptid.
3039         (start_step_over): Update.
3040         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3041         (get_lwp_thread): Update.
3042         (struct lwp_info): Rename member "head" to "entry".
3043         * regcache.h (inferior_list_entry): Delete.
3044         * server.c (kill_inferior_callback): Update.
3045         (detach_or_kill_inferior_callback): Update.
3046         (print_started_pid): Update.
3047         (print_attached_pid): Update.
3048         (process_serial_event): Simplify read of ptid.
3049         * thread-db.c (thread_db_create_event): Update.
3050         (thread_db_get_tls_address): Update.
3051         * win32-low.c (current_inferior_ptid): Simplify.
3052
3053 2014-02-19  Tom Tromey  <tromey@redhat.com>
3054
3055         * target.h (struct target_ops) <supports_btrace>: Add target_ops
3056         argument.
3057         (target_supports_btrace): Update.
3058
3059 2014-02-14  Yao Qi  <yao@codesourcery.com>
3060
3061         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3062         (rsp-low-ipa.o): New target.
3063
3064 2014-02-12  Tom Tromey  <tromey@redhat.com>
3065
3066         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3067         convert_ascii_to_int.
3068         * regcache.c (registers_to_string): Likewise.
3069         * remote-utils.c (decode_M_packet): Likewise.
3070         * server.c (process_serial_event): Likewise.
3071
3072 2014-02-12  Tom Tromey  <tromey@redhat.com>
3073
3074         * server.c (handle_query, handle_v_run): Use hex2bin, not
3075         unhexify.
3076         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3077
3078 2014-02-12  Tom Tromey  <tromey@redhat.com>
3079
3080         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3081         convert_int_to_ascii.
3082         * regcache.c (registers_to_string, collect_register_as_string):
3083         Likewise.
3084         * remote-utils.c (look_up_one_symbol, relocate_instruction):
3085         Likewise.
3086         * server.c (process_serial_event): Likewise.
3087         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3088         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3089
3090 2014-02-12  Tom Tromey  <tromey@redhat.com>
3091
3092         * remote-utils.c (look_up_one_symbol, monitor_output): Use
3093         bin2hex, not hexify.
3094         * tracepoint.c (cmd_qtstatus): Likewise.
3095
3096 2014-02-12  Tom Tromey  <tromey@redhat.com>
3097
3098         * remote-utils.c (monitor_output): Pass explicit length to
3099         hexify.
3100
3101 2014-02-12  Tom Tromey  <tromey@redhat.com>
3102
3103         * tracepoint.c: Include rsp-low.h.
3104         * server.c: Include rsp-low.h.
3105         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3106         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3107         declare.
3108         * remote-utils.c: Include rsp-low.h.
3109         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3110         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3111         (convert_int_to_ascii, convert_ascii_to_int): Move to
3112         common/rsp-low.c.
3113         * regcache.c: Include rsp-low.h.
3114         * ax.c: Include rsp-low.h.
3115         * Makefile.in (SFILES): Add common/rsp-low.c.
3116         (OBS): Add rsp-low.o.
3117         (rsp-low.o): New target.
3118
3119 2014-02-12  Tom Tromey  <tromey@redhat.com>
3120
3121         * utils.h (pulongest, plongest, phex_nz): Don't declare.
3122         Include print-utils.h.
3123         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3124         (plongest, thirty_two, phex_nz): Remove.
3125         * Makefile.in (SFILES): Add common/print-utils.c.
3126         (OBS): Add print-utils.o.
3127         (print-utils-ipa.o): New target.
3128         (print-utils.o): New target.
3129         (IPA_OBJS): Add print-utils-ipa.o.
3130
3131 2014-02-06  Tom Tromey  <tromey@redhat.com>
3132
3133         * Makefile.in (SFILES): Fix indentation.
3134
3135 2014-02-05  Doug Evans  <dje@google.com>
3136
3137         * linux-low.c (linux_wait_for_event): Improve comment.
3138         (linux_wait_1): Keep current_inferior in sync with event_child.
3139
3140 2014-01-22  Doug Evans  <dje@google.com>
3141
3142         * gdbthread.h (gdb_id_to_thread): Delete, unused.
3143
3144 2014-01-22  Doug Evans  <dje@google.com>
3145
3146         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3147         * configure: Regenerate.
3148         * config.in: Regenerate.
3149         * Makefile.in (SFILES): Add debug.c.
3150         (OBS): Add debug.o.
3151         * debug.c: New file.
3152         * debug.h: New file.
3153         * linux-aarch64-low.c (*): Update all debugging printfs to use
3154         debug_printf instead of fprintf.
3155         * linux-arm-low.c (*): Ditto.
3156         * linux-cris-low.c (*): Ditto.
3157         * linux-crisv32-low.c (*): Ditto.
3158         * linux-m32r-low.c (*): Ditto.
3159         * linux-sparc-low.c (*): Ditto.
3160         * linux-x86.c (*): Ditto.
3161         * linux-low.c (*): Ditto.
3162         (linux_wait_1): Add calls to debug_enter, debug_exit.
3163         (linux_wait): Remove redundant debugging printf.
3164         (stop_all_lwps): Add calls to debug_enter, debug_exit.
3165         (linux_resume, unstop_all_lwps): Ditto.
3166         * mem-break.c (*): Update all debugging printfs to use
3167         debug_printf instead of fprintf.
3168         * remote-utils.c (*): Ditto.
3169         * thread-db.c (*): Ditto.
3170         * server.c #include <ctype.h>, "gdb_vecs.h".
3171         (debug_threads): Moved to debug.c.
3172         (*): Update all debugging printfs to use debug_printf instead of
3173         fprintf.
3174         (start_inferior): Replace call to fflush with call to debug_flush.
3175         (monitor_show_help): Mention set debug-format.
3176         (parse_debug_format_options): New function.
3177         (handle_monitor_command): Handle "monitor set debug-format".
3178         (gdbserver_usage): Mention --debug-format.
3179         (main): Parse --debug-format.
3180         * server.h (debug_threads): Declaration moved to debug.h.
3181         #include "debug.h".
3182         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3183         trace_debug_1 that uses debug_printf.
3184         (tracepoint_look_up_symbols): Update all debugging printfs to use
3185         debug_printf instead of fprintf.
3186
3187 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
3188
3189         * linux-xtensa-low.c: Include asm/ptrace.h instead of
3190         sys/ptrace.h.
3191
3192 2014-01-17  Pedro Alves  <palves@redhat.com>
3193
3194         PR build/16445
3195         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3196         defined after including gdb_proc_service.h.
3197
3198 2014-01-16  Doug Evans  <dje@google.com>
3199
3200         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3201         (match_dll): Use it.
3202
3203 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
3204
3205         * target.h (target_ops) <read_btrace>: Change parameters and
3206         return type to allow error reporting.
3207         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
3208         trace reading errors on.
3209         * linux-low.c (linux_low_read_btrace): Pass trace reading
3210         errors on.
3211         (linux_low_disable_btrace): New.
3212
3213 2014-01-15  Doug Evans  <dje@google.com>
3214
3215         * inferiors.c (thread_id_to_gdb_id): Delete.
3216         * inferiors.h (thread_id_to_gdb_id): Delete.
3217
3218 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
3219
3220         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3221         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
3222         versions.
3223
3224 2014-01-08  Pedro Alves  <palves@redhat.com>
3225
3226         * server.c (handle_status): Don't discard previous queued stop
3227         replies or thread's pending status here.
3228         (main) <disconnection>: Do it here instead.
3229
3230 2014-01-08  Pedro Alves  <palves@redhat.com>
3231
3232         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3233         * server.c (visit_actioned_threads, handle_pending_status): New
3234         function.
3235         (handle_v_cont): Factor out parts to ...
3236         (resume): ... this new function.  If in all-stop, and a thread
3237         being resumed has a pending status, report it without actually
3238         resuming.
3239         (myresume): Adjust to use the new 'resume' function.
3240         (clear_pending_status_callback, set_pending_status_callback)
3241         (find_status_pending_thread_callback): New functions.
3242         (handle_status): Handle the case of multiple threads having
3243         interesting statuses to report.  Report threads' real last signal
3244         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
3245         with an interesting thread to report the status for, instead of
3246         always reporting the status of the first thread.
3247
3248 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
3249
3250         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3251         * gdbreplay.c (gdbreplay_version): Likewise.
3252
3253 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
3254
3255         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3256         iov.iov_len with the real length in use.
3257
3258 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
3259
3260         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3261         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3262         for all targets that use win32-low.c.
3263         * win32-low.c (win32_ensure_ntdll_loaded): New function.
3264         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3265
3266 2013-12-13  Pedro Alves  <palves@redhat.com>
3267
3268         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3269         if equal to TARGET_WAITKIND_LOADED.
3270         * win32-low.c (cached_status): New static global.
3271         (win32_wait): Add declaration.
3272         (do_initial_child_stuff): Flush all initial pending debug events
3273         up to the initial breakpoint.
3274         (win32_wait): If CACHED_STATUS was set, return that instead
3275         of doing a real wait.  Remove the code resuming the execution
3276         of the inferior after receiving a TARGET_WAITKIND_LOADED event
3277         during the initial phase.  Also remove the code changing
3278         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3279         TARGET_WAITKIND_STOPPED.
3280
3281 2013-12-11  Yao Qi  <yao@codesourcery.com>
3282
3283         * notif.c (handle_notif_ack): Return 0 if no notification
3284         matches.
3285
3286 2013-11-20  Doug Evans  <dje@google.com>
3287
3288         * linux-low.c (linux_set_resume_request): Fix comment.
3289
3290 2013-11-20  Doug Evans  <dje@google.com>
3291
3292         * linux-low.c (resume_status_pending_p): Tweak comment.
3293
3294 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3295
3296         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3297         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3298         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3299         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3300         (srv_amd64_regobj): Add amd64-mpx.o.
3301         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3302         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3303         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3304         * i387-fp.c (num_pl_bnd_register) Added constant.
3305         (num_pl_bnd_cfg_registers) Added constant.
3306         (struct i387_xsave) Added reserved area and MPX fields.
3307         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3308         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3309         function.
3310         (tdesc_i386_mpx_linux): Add MPX amd64 target.
3311         (init_registers_amd64_mpx_linux): Declare new function.
3312         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3313         (x86_64_regmap): Add MPX registers.
3314         (x86_linux_read_description): Add MPX case.
3315         (initialize_low_arch): Initialize MPX targets.
3316
3317 2013-11-18  Tom Tromey  <tromey@redhat.com>
3318
3319         * configure: Rebuild.
3320         * configure.ac: Don't check for stdlib.h.
3321         * gdbreplay.c: Unconditionally include stdlib.h.
3322
3323 2013-11-18  Tom Tromey  <tromey@redhat.com>
3324
3325         * config.in: Rebuild.
3326         * configure: Rebuild.
3327         * configure.ac: Don't use AC_HEADER_DIRENT.
3328
3329 2013-11-18  Tom Tromey  <tromey@redhat.com>
3330
3331         * server.h: Don't check HAVE_STRING_H.
3332         * gdbreplay.c: Don't check HAVE_STRING_H.
3333         * configure: Rebuild.
3334
3335 2013-11-18  Tom Tromey  <tromey@redhat.com>
3336
3337         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3338         LIBGNU.
3339
3340 2013-11-08  Tom Tromey  <tromey@redhat.com>
3341
3342         * configure, config.in: Rebuild.
3343         * configure.ac: Remove unused configury.
3344
3345 2013-11-08  Tom Tromey  <tromey@redhat.com>
3346
3347         * acinclude.m4: Include common.m4, codeset.m4.
3348         * configure, config.in: Rebuild.
3349         * configure.ac: Use GDB_AC_COMMON.
3350
3351 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3352
3353         * linux-s390-low.c (HWCAP_S390_TE): New define.
3354         (s390_arch_setup): Consider the TE field in the HWCAP for
3355         determining 'have_regset_tdb'.
3356
3357 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
3358
3359         PR gdb/16014
3360         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3361         call to sizeof.
3362
3363 2013-10-02  Pedro Alves  <palves@redhat.com>
3364
3365         * server.c (process_serial_event): Don't output "GDBserver
3366         exiting" if GDB is connected through stdio.
3367         * target.c (mywait): Likewise, be silent if GDB is connected
3368         through stdio.
3369
3370 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
3371
3372         * lynx-low.c (lynx_add_threads_after_attach): New function.
3373         (lynx_attach): Remove call to add_thread.  Add call to
3374         lynx_add_threads_after_attach instead.
3375
3376 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
3377
3378         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3379         * config.in, configure: Regenerated.
3380
3381 2013-09-18  Yao Qi  <yao@codesourcery.com>
3382
3383         PR server/15959
3384         * server.c (start_inferior): Clear 'resume_info'.
3385
3386 2013-09-16  Jiong Wang  <jiwang@tilera.com>
3387
3388         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3389         for each register.
3390
3391 2013-09-16  Jiong Wang  <jiwang@tilera.com>
3392
3393         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3394         linux-tile-low.o to srv_tgtobj.
3395
3396 2013-09-16  Will Newton  <will.newton@linaro.org>
3397
3398         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3399         out regs.
3400
3401 2013-09-06  Pedro Alves  <palves@redhat.com>
3402
3403         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3404         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3405         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3406         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3407         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3408         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3409
3410 2013-09-06  Pedro Alves  <palves@redhat.com>
3411
3412         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3413         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3414
3415 2013-09-06  Pedro Alves  <palves@redhat.com>
3416
3417         * linux-amd64-ipa.c: Include tracepoint.h.
3418         * linux-i386-ipa.c: Include tracepoint.h.
3419
3420 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
3421
3422         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3423         (ps_get_thread_area): New function.
3424
3425 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
3426
3427         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3428         (initialize_low_arch): Call init_registers_crisv32 rather than
3429         init_register_crisv32.
3430
3431 2013-09-05  Pedro Alves  <palves@redhat.com>
3432
3433         * server.h (handle_vFile, hostio_last_error_from_errno): Move
3434         to ...
3435         * hostio.h: ... this new file.
3436         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3437         win32-low.c: Include hostio.h.
3438
3439 2013-09-05  Pedro Alves  <palves@redhat.com>
3440
3441         * server.h (gdb_client_data, handler_func, callback_handler_func)
3442         (delete_file_handler, add_file_handler, append_callback_event)
3443         (delete_callback_event, start_event_loop, initialize_event_loop):
3444         Move to event-loop.h and include it.
3445         * event-loop.h: New file.
3446
3447 2013-09-05  Pedro Alves  <palves@redhat.com>
3448
3449         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3450         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3451         (loaded_dll, unloaded_dll): Move to ...
3452         * dll.h: ... this new file.
3453         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3454
3455 2013-09-05  Pedro Alves  <palves@redhat.com>
3456
3457         * server.h (current_process, get_thread_process, all_processes)
3458         (add_inferior_to_list, for_each_inferior, current_inferior)
3459         (remove_inferior, add_process, remove_process, find_process_pid)
3460         (have_started_inferiors_p, have_attached_inferiors_p)
3461         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3462         (clear_inferiors, find_inferior, find_inferior_id)
3463         (inferior_target_data, set_inferior_target_data)
3464         (inferior_regcache_data, set_inferior_regcache_data): Move to
3465         inferiors.h, and include it.
3466         * inferiors.h: New file.
3467
3468 2013-09-05  Pedro Alves  <palves@redhat.com>
3469
3470         * server.h (struct emit_ops, current_insn_ptr, emit_error):
3471         Move ...
3472         * ax.h: ... here.
3473
3474 2013-09-05  Pedro Alves  <palves@redhat.com>
3475
3476         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3477         tracepoint.h.
3478         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3479         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3480         (handle_tracepoint_general_set, handle_tracepoint_query)
3481         (tracepoint_finished_step, tracepoint_was_hit)
3482         (release_while_stepping_state_list, current_traceframe)
3483         (in_readonly_region, traceframe_read_mem)
3484         (fetch_traceframe_registers, traceframe_read_sdata)
3485         (traceframe_read_info, struct fast_tpoint_collect_status)
3486         (fast_tracepoint_collecting, force_unlock_trace_buffer)
3487         (handle_tracepoit_bkpts, initialize_low_tracepoint)
3488         (supply_fast_tracepoint_registers)
3489         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3490         (ipa_tdesc, claim_trampoline_space)
3491         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3492         (agent_mem_read, agent_get_trace_state_variable_value)
3493         (agent_set_trace_state_variable_value, agent_tsv_read)
3494         (agent_mem_read_string, get_raw_reg_func_addr)
3495         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3496         * tracepoint.h: ... this new file.
3497
3498 2013-09-05  Pedro Alves  <palves@redhat.com>
3499
3500         * server.h (perror_with_name, error, fatal, warning, paddress)
3501         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3502         include it.
3503         * utils.h: New file.
3504
3505 2013-09-05  Pedro Alves  <palves@redhat.com>
3506
3507         * server.h (remote_debug, noack_mode, transport_is_reliable)
3508         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3509         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3510         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3511         (write_enn, initialize_async_io, enable_async_io)
3512         (disable_async_io, check_remote_input_interrupt_request)
3513         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3514         (dead_thread_notify, prepare_resume_reply)
3515         (decode_address_to_semicolon, decode_address, decode_m_packet)
3516         (decode_M_packet, decode_X_packet, decode_xfer_write)
3517         (decode_search_memory_packet, unhexify, hexify)
3518         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3519         (look_up_one_symbol, relocate_instruction)
3520         (monitor_output): Move to remote-utils.h, and include it.
3521         * remote-utils.h: New file.
3522
3523 2013-09-05  Pedro Alves  <palves@redhat.com>
3524
3525         * server.h (_): Delete.
3526
3527 2013-09-02  Pedro Alves  <palves@redhat.com>
3528
3529         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3530         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3531         allocated.
3532         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3533
3534 2013-09-02  Pierre Muller  <muller@sourceware.org>
3535
3536         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3537         or WriteProcessMemory complete successfully and handle
3538         ERROR_PARTIAL_COPY error.
3539
3540 2013-09-02  Pedro Alves  <palves@redhat.com>
3541
3542         * server.c (gdb_read_memory): Return -1 on traceframe memory read
3543         error instead of EIO.
3544
3545 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3546
3547         PR server/15604
3548         * linux-low.c: Include filestuff.h.
3549         (linux_create_inferior) <pid == 0>: Call close_most_fds.
3550         * lynx-low.c: Include filestuff.h.
3551         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3552         * server.c: Include filestuff.h.
3553         (main): Call notice_open_fds.
3554         * spu-low.c: Include filestuff.h.
3555         (spu_create_inferior) <pid == 0>: Call close_most_fds.
3556
3557 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
3558
3559         * Makefile.in: Explain why ../target and ../nat are not
3560         listed as include file search paths.
3561         (linux-waitpid.o): New object file rule.
3562         * configure.srv (srv_native_linux_obj): New variable.
3563         Replace all occurrences of linux native object files with
3564         $srv_native_linux_obj.
3565         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3566         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3567         (linux_enable_event_reporting): Remove declaration.
3568         (my_waitpid): Moved to common/linux-waitpid.c.
3569         (linux_wait_for_event): Pass ptid when calling
3570         linux_enable_event_reporting.
3571         (linux_supports_tracefork_flag): Remove.
3572         (linux_enable_event_reporting): Likewise.
3573         (linux_tracefork_grandchild): Remove.
3574         (STACK_SIZE): Moved to common/linux-ptrace.c.
3575         (linux_tracefork_child): Remove.
3576         (linux_test_for_tracefork): Remove.
3577         (linux_look_up_symbols): Call linux_supports_traceclone.
3578         (initialize_low): Remove call to linux_test_for_tracefork.
3579         * linux-low.h (PTRACE_TYPE_ARG3): Move to
3580         common/linux-ptrace.h.
3581         (PTRACE_TYPE_ARG4): Likewise.
3582         Include linux-ptrace.h.
3583
3584 2013-08-21  Pedro Alves  <palves@redhat.com>
3585
3586         * config.in: Renegerate.
3587
3588 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
3589
3590         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3591         (SFILES): Remove $(srcdir)/common/target-common.c and
3592         add $(srcdir)/target/waitstatus.c.
3593         (OBS): Remove target-common.o and add waitstatus.o.
3594         (server_h): Remove $(srcdir)/../common/target-common.h and
3595         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3596         and $(srcdir)/../target/waitstatus.h.
3597         (target-common.o): Remove.
3598         (waitstatus.o): New target object file.
3599         * target.h: Do not include target-common.h and
3600         include target/resume.h, target/wait.h and
3601         target/waitstatus.h.
3602
3603 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
3604
3605         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3606         to PTRACE_TYPE_ARG3.
3607         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3608         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3609         PTRACE_TYPE_ARG4.
3610         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3611         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3612
3613 2013-07-27  Jie Zhang  <jie@codesourcery.com>
3614             Daniel Jacobowitz  <dan@codesourcery.com>
3615             Yao Qi  <yao@codesourcery.com>
3616
3617         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3618         (mips-linux-watch.o): New rule.
3619         (mips_linux_watch_h): New variable.
3620         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3621         srv_tgtobj.
3622         * linux-mips-low.c: Include mips-linux-watch.h.
3623         (struct arch_process_info, struct arch_lwp_info): New.
3624         (update_watch_registers_callback): New function.
3625         (mips_linux_new_process, mips_linux_new_thread) New functions.
3626         (mips_linux_prepare_to_resume, mips_insert_point): New
3627         functions.
3628         (mips_remove_point, mips_stopped_by_watchpoint): New
3629         functions.
3630         (rsp_bp_type_to_target_hw_bp_type): New function.
3631         (mips_stopped_data_address): New function.
3632         (the_low_target): Add watchpoint support functions.
3633
3634 2013-07-27  Yao Qi  <yao@codesourcery.com>
3635
3636         * i386-low.c: Include break-common.h.
3637         (enum target_hw_bp_type): Remove.
3638
3639 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
3640
3641         * Makefile.in (SFILES): /common/target-common.c.
3642         (OBS): Add target-common.o.
3643         (server_h): Add $(srcdir)/../common/target-common.h.
3644         (target-common.o): New target.
3645         * server.c (queue_stop_reply_callback): Free
3646         status string after use.
3647         * target.c (target_waitstatus_to_string): Remove.
3648         * target.h: Include target-common.h.
3649         (resume_kind): Likewise.
3650         (target_waitkind): Likewise.
3651         (target_waitstatus): Likewise.
3652         (TARGET_WNOHANG): Likewise.
3653
3654 2013-07-04  Yao Qi  <yao@codesourcery.com>
3655
3656         * Makefile.in (host_alias): Use @host_noncanonical@.
3657         (target_alias): Use @target_noncanonical@.
3658         * configure.ac: Use ACX_NONCANONICAL_TARGET and
3659         ACX_NONCANONICAL_HOST.
3660         * configure: Regenerated.
3661
3662         Revert:
3663         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
3664
3665         * configure.ac (version_host, version_target): Set and AC_SUBST them.
3666         * configure: Rebuild.
3667         * Makefile.in (version_host, version_target): Get from configure.
3668         (version.c): Use $(version_host) and $(version_target).
3669
3670 2013-07-03  Pedro Alves  <palves@redhat.com>
3671
3672         * Makefile.in (config.status): Depend on development.sh.
3673         * acinclude.m4: Include libmcheck.m4.
3674         * configure: Regenerate.
3675
3676 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
3677
3678         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3679         attribute inside the parentheses.
3680         (winapi_DebugSetProcessKillOnExit): Ditto.
3681         (winapi_DebugBreakProcess): Ditto.
3682         (winapi_GenerateConsoleCtrlEvent): Ditto.
3683
3684 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
3685
3686         * notif.h (notif_event): Add a dummy member to avoid compiler
3687         errors.
3688
3689 2013-07-01  Pedro Alves  <palves@redhat.com>
3690
3691         * hostio.c (HOSTIO_PATH_MAX): Define.
3692         (require_filename, handle_open, handle_unlink, handle_readlink):
3693         Use it.
3694
3695 2013-07-01  Pedro Alves  <palves@redhat.com>
3696
3697         * server.h: Include "pathmax.h".
3698         * linux-low.c: Don't include sys/param.h.
3699         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3700         MAXPATHLEN.
3701         * win32-low.c: Don't include sys/param.h.
3702         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3703
3704 2013-07-01  Pedro Alves  <palves@redhat.com>
3705
3706         * event-loop.c: Don't check HAVE_UNISTD_H before including
3707         <unistd.h>.
3708         * gdbreplay.c: Likewise.
3709         * remote-utils.c: Likewise.
3710         * server.c: Likewise.
3711         * configure.ac: Don't check for unistd.h.
3712         * configure: Regenerate.
3713
3714 2013-06-28  Tom Tromey  <tromey@redhat.com>
3715
3716         * Makefile.in (version.c): Use version.in, not
3717         common/version.in.
3718
3719 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
3720
3721         * configure.ac (version_host, version_target): Set and AC_SUBST them.
3722         * configure: Rebuild.
3723         * Makefile.in (version_host, version_target): Get from configure.
3724         (version.c): Use $(version_host) and $(version_target).
3725
3726 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
3727
3728         Fix trace-status to output user name without trailing colon.
3729         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3730
3731 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
3732
3733         Fix trace-status to output proper start-time and stop-time.
3734         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3735         output start time and stop time in hex as gdb expects.
3736
3737 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
3738
3739         * tracepoint.c (build_traceframe_info_xml): Output trace state
3740         variables present in the trace buffer.
3741
3742 2013-06-24  Tom Tromey  <tromey@redhat.com>
3743
3744         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3745         create-version.sh.
3746         (version.o): Remove.
3747         * gdbreplay.c: Include version.h.
3748         (version, host_name): Don't declare.
3749         * server.h: Include version.h.
3750         (version, host_name): Don't declare.
3751
3752 2013-06-12  Pedro Alves  <palves@redhat.com>
3753
3754         * linux-x86-low.c (linux_is_elf64): Delete global.
3755         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3756         with local linux_pid_exe_is_elf_64_file use.
3757
3758 2013-06-11  Pedro Alves  <palves@redhat.com>
3759
3760         * linux-low.c (regset_disabled, disable_regset): New functions.
3761         (regsets_fetch_inferior_registers)
3762         (regsets_store_inferior_registers): Use them.
3763         (initialize_regsets_info); Don't allocate the disabled_regsets
3764         array here.
3765         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3766         comment.
3767
3768 2013-06-11  Pedro Alves  <palves@redhat.com>
3769
3770         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3771         xmalloc.
3772
3773 2013-06-11  Pedro Alves  <palves@redhat.com>
3774
3775         * linux-x86-low.c (initialize_low_arch): Call
3776         init_registers_x32_avx_linux.
3777
3778 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
3779
3780         Fix compatibility with Android Bionic.
3781         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3782         it is not empty.
3783
3784 2013-06-07  Pedro Alves  <palves@redhat.com>
3785
3786         PR server/14823
3787         * Makefile.in (OBS): Add tdesc.o.
3788         (IPA_OBJS): Add tdesc-ipa.o.
3789         (tdesc-ipa.o): New rule.
3790         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3791         interface.
3792         * linux-low.c (new_inferior): Delete.
3793         (disabled_regsets, num_regsets): Delete.
3794         (linux_add_process): Adjust to set the new per-process
3795         new_inferior flag.
3796         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3797         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
3798         was a stop.  When calling arch_setup, switch the current inferior
3799         to the thread that got an event.
3800         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3801         (regsets_fetch_inferior_registers)
3802         (regsets_store_inferior_registers): New regsets_info parameter.
3803         Adjust to use it.
3804         (linux_register_in_regsets): New regs_info parameter.  Adjust to
3805         use it.
3806         (register_addr, fetch_register, store_register): New usrregs_info
3807         parameter.  Adjust to use it.
3808         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3809         parameter regs_info.  Adjust to use it.
3810         (linux_fetch_registers): Get the current inferior's regs_info, and
3811         adjust to use it.
3812         (linux_store_registers): Ditto.
3813         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3814         (initialize_low): Don't initialize the target_regsets here.  Call
3815         initialize_low_arch.
3816         * linux-low.h (target_regsets): Delete declaration.
3817         (struct regsets_info): New.
3818         (struct usrregs_info): New.
3819         (struct regs_info): New.
3820         (struct process_info_private) <new_inferior>: New field.
3821         (struct linux_target_ops): Delete the num_regs, regmap, and
3822         regset_bitmap fields.  New field regs_info.
3823         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3824         * i387-fp.c (num_xmm_registers): Delete.
3825         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3826         calls to new interface.
3827         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3828         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3829         Infer the number of xmm registers from the regcache's target
3830         description.
3831         * i387-fp.h (num_xmm_registers): Delete.
3832         * inferiors.c (add_thread): Don't install the thread's regcache
3833         here.
3834         * proc-service.c (gregset_info): Fetch the current inferior's
3835         regs_info.  Adjust to use it.
3836         * regcache.c: Include tdesc.h.
3837         (register_bytes, reg_defs, num_registers)
3838         (gdbserver_expedite_regs): Delete.
3839         (get_thread_regcache): If the thread doesn't have a regcache yet,
3840         create one, instead of aborting gdbserver.
3841         (regcache_invalidate_one): Rename to ...
3842         (regcache_invalidate_thread): ... this.
3843         (regcache_invalidate_one): New.
3844         (regcache_invalidate): Only invalidate registers of the current
3845         process.
3846         (init_register_cache): Add target_desc parameter, and use it.
3847         (new_register_cache): Ditto.  Assert the target description has a
3848         non zero registers_size.
3849         (regcache_cpy): Add assertions.  Adjust.
3850         (realloc_register_cache, set_register_cache): Delete.
3851         (registers_to_string, registers_from_string): Adjust.
3852         (find_register_by_name, find_regno, find_register_by_number)
3853         (register_cache_size): Add target_desc parameter, and use it.
3854         (free_register_cache_thread, free_register_cache_thread_one)
3855         (regcache_release, register_cache_size): New.
3856         (register_size): Add target_desc parameter, and use it.
3857         (register_data, supply_register, supply_register_zeroed)
3858         (supply_regblock, supply_register_by_name, collect_register)
3859         (collect_register_as_string, collect_register_by_name): Adjust.
3860         * regcache.h (struct target_desc): Forward declare.
3861         (struct regcache) <tdesc>: New field.
3862         (init_register_cache, new_register_cache): Add target_desc
3863         parameter.
3864         (regcache_invalidate_thread): Declare.
3865         (regcache_invalidate_one): Delete declaration.
3866         (regcache_release): Declare.
3867         (find_register_by_number, register_cache_size, register_size)
3868         (find_regno): Add target_desc parameter.
3869         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3870         declarations.
3871         * remote-utils.c: Include tdesc.h.
3872         (outreg, prepare_resume_reply): Adjust.
3873         * server.c: Include tdesc.h.
3874         (gdbserver_xmltarget): Delete declaration.
3875         (get_features_xml, process_serial_event): Adjust.
3876         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3877         declare.
3878         (struct process_info) <tdesc>: New field.
3879         (ipa_tdesc): Declare.
3880         * tdesc.c: New file.
3881         * tdesc.h: New file.
3882         * tracepoint.c: Include tdesc.h.
3883         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3884         (get_context_regcache): Adjust to pass ipa_tdesc down.
3885         (do_action_at_tracepoint): Adjust to get the register cache size
3886         from the context regcache's description.
3887         (traceframe_walk_blocks): Adjust to get the register cache size
3888         from the current trace frame's description.
3889         (traceframe_get_pc): Adjust to get current trace frame's
3890         description and pass it down.
3891         (gdb_collect): Adjust to get the register cache size from the
3892         IPA's description.
3893         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3894         (gdbserver_xmltarget): Delete.
3895         (initialize_low_tracepoint): Set the ipa's target description.
3896         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3897         (initialize_low_tracepoint): Set the ipa's target description.
3898         * linux-x86-low.c: Include tdesc.h.
3899         [__x86_64__] (is_64bit_tdesc): New.
3900         (ps_get_thread_area, x86_get_thread_area): Use it.
3901         (i386_cannot_store_register): Rename to ...
3902         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
3903         (i386_cannot_fetch_register): Rename to ...
3904         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
3905         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3906         to new interface.
3907         (target_regsets): Rename to ...
3908         (x86_regsets): ... this.
3909         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3910         interface.
3911         (x86_siginfo_fixup): Use is_64bit_tdesc.
3912         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3913         (tdesc_x32_avx_linux, tdesc_x32_linux)
3914         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3915         Declare.
3916         (x86_linux_update_xmltarget): Delete.
3917         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3918         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3919         (AMD64_LINUX_USER64_CS): New.
3920         (x86_linux_read_description): New, based on
3921         x86_linux_update_xmltarget.
3922         (same_process_callback): New.
3923         (x86_arch_setup_process_callback): New.
3924         (x86_linux_update_xmltarget): New.
3925         (x86_regsets_info): New.
3926         (amd64_linux_regs_info): New.
3927         (i386_linux_usrregs_info): New.
3928         (i386_linux_regs_info): New.
3929         (x86_linux_regs_info): New.
3930         (x86_arch_setup): Reimplement.
3931         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3932         (x86_emit_ops): Ditto.
3933         (the_low_target): Adjust.  Install x86_linux_regs_info,
3934         x86_cannot_fetch_register, and x86_cannot_store_register.
3935         (initialize_low_arch): New.
3936         * linux-ia64-low.c (tdesc_ia64): Declare.
3937         (ia64_fetch_register): Adjust.
3938         (ia64_usrregs_info, regs_info): New globals.
3939         (ia64_regs_info): New function.
3940         (the_low_target): Adjust.
3941         (initialize_low_arch): New function.
3942         * linux-sparc-low.c (tdesc_sparc64): Declare.
3943         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3944         Adjust.
3945         (sparc_arch_setup): New function.
3946         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3947         (the_low_target): Adjust.
3948         (initialize_low_arch): New function.
3949         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3950         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3951         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3952         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3953         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3954         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3955         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3956         (tdesc_powerpc_isa205_vsx64l): Declare.
3957         (ppc_cannot_store_register, ppc_collect_ptrace_register)
3958         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3959         (ppc_set_pc, ppc_get_hwcap): Adjust.
3960         (ppc_usrregs_info): Forward declare.
3961         (!__powerpc64__) ppc_regmap_adjusted: New global.
3962         (ppc_arch_setup): Adjust to the current process'es target
3963         description.
3964         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3965         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3966         (ppc_store_evrregset): Adjust.
3967         (target_regsets): Rename to ...
3968         (ppc_regsets): ... this, and make static.
3969         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3970         (ppc_regs_info): New function.
3971         (the_low_target): Adjust.
3972         (initialize_low_arch): New function.
3973         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3974         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3975         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3976         (tdesc_s390x_linux64v2): Declare.
3977         (s390_collect_ptrace_register, s390_supply_ptrace_register)
3978         (s390_fill_gregset, s390_store_last_break): Adjust.
3979         (target_regsets): Rename to ...
3980         (s390_regsets): ... this, and make static.
3981         (s390_get_pc, s390_set_pc): Adjust.
3982         (s390_get_hwcap): New target_desc parameter, and use it.
3983         [__s390x__] (have_hwcap_s390_high_gprs): New global.
3984         (s390_arch_setup): Adjust to set the current process'es target
3985         description.  Don't adjust the regmap.
3986         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3987         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3988         (regs_info_3264): New globals.
3989         (s390_regs_info): New function.
3990         (the_low_target): Adjust.
3991         (initialize_low_arch): New function.
3992         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3993         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3994         [__mips64] (init_registers_mips_linux)
3995         (init_registers_mips_dsp_linux): Delete defines.
3996         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3997         (have_dsp): New global.
3998         (mips_read_description): New, based on mips_arch_setup.
3999         (mips_arch_setup): Reimplement.
4000         (get_usrregs_info): New function.
4001         (mips_cannot_fetch_register, mips_cannot_store_register)
4002         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4003         (mips_fill_fpregset, mips_store_fpregset): Adjust.
4004         (target_regsets): Rename to ...
4005         (mips_regsets): ... this, and make static.
4006         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4007         (dsp_regs_info, regs_info): New globals.
4008         (mips_regs_info): New function.
4009         (the_low_target): Adjust.
4010         (initialize_low_arch): New function.
4011         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4012         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4013         Declare.
4014         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4015         (arm_read_description): New, with bits factored from
4016         arm_arch_setup.
4017         (arm_arch_setup): Reimplement.
4018         (target_regsets): Rename to ...
4019         (arm_regsets): ... this, and make static.
4020         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4021         (arm_regs_info): New function.
4022         (the_low_target): Adjust.
4023         (initialize_low_arch): New function.
4024         * linux-m68k-low.c (tdesc_m68k): Declare.
4025         (target_regsets): Rename to ...
4026         (m68k_regsets): ... this, and make static.
4027         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4028         (m68k_regs_info): New function.
4029         (m68k_arch_setup): New function.
4030         (the_low_target): Adjust.
4031         (initialize_low_arch): New function.
4032         * linux-sh-low.c (tdesc_sharch): Declare.
4033         (target_regsets): Rename to ...
4034         (sh_regsets): ... this, and make static.
4035         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4036         (sh_regs_info, sh_arch_setup): New functions.
4037         (the_low_target): Adjust.
4038         (initialize_low_arch): New function.
4039         * linux-bfin-low.c (tdesc_bfin): Declare.
4040         (bfin_arch_setup): New function.
4041         (bfin_usrregs_info, regs_info): New globals.
4042         (bfin_regs_info): New function.
4043         (the_low_target): Adjust.
4044         (initialize_low_arch): New function.
4045         * linux-cris-low.c (tdesc_cris): Declare.
4046         (cris_arch_setup): New function.
4047         (cris_usrregs_info, regs_info): New globals.
4048         (cris_regs_info): New function.
4049         (the_low_target): Adjust.
4050         (initialize_low_arch): New function.
4051         * linux-cris-low.c (tdesc_crisv32): Declare.
4052         (cris_arch_setup): New function.
4053         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4054         (cris_regs_info): New function.
4055         (the_low_target): Adjust.
4056         (initialize_low_arch): New function.
4057         * linux-m32r-low.c (tdesc_m32r): Declare.
4058         (m32r_arch_setup): New function.
4059         (m32r_usrregs_info, regs_info): New globals.
4060         (m32r_regs_info): Adjust.
4061         (initialize_low_arch): New function.
4062         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4063         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4064         (tic6x_usrregs_info): Forward declare.
4065         (tic6x_read_description): New function, based on ...
4066         (tic6x_arch_setup): ... this.  Reimplement.
4067         (target_regsets): Rename to ...
4068         (tic6x_regsets): ... this, and make static.
4069         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4070         (tic6x_regs_info): New function.
4071         (the_low_target): Adjust.
4072         (initialize_low_arch): New function.
4073         * linux-xtensa-low.c (tdesc_xtensa): Declare.
4074         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4075         (target_regsets): Rename to ...
4076         (xtensa_regsets): ... this, and make static.
4077         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4078         globals.
4079         (xtensa_arch_setup, xtensa_regs_info): New functions.
4080         (the_low_target): Adjust.
4081         (initialize_low_arch): New function.
4082         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4083         (nios2_arch_setup): Set the current process'es tdesc.
4084         (target_regsets): Rename to ...
4085         (nios2_regsets): ... this.
4086         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4087         (nios2_regs_info): New function.
4088         (the_low_target): Adjust.
4089         (initialize_low_arch): New function.
4090         * linux-aarch64-low.c (tdesc_aarch64): Declare.
4091         (aarch64_arch_setup): Set the current process'es tdesc.
4092         (target_regsets): Rename to ...
4093         (aarch64_regsets): ... this.
4094         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4095         (aarch64_regs_info): New function.
4096         (the_low_target): Adjust.
4097         (initialize_low_arch): New function.
4098         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4099         globals.
4100         (target_regsets): Rename to ...
4101         (tile_regsets): ... this.
4102         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4103         (tile_regs_info): New function.
4104         (tile_arch_setup): Set the current process'es tdesc.
4105         (the_low_target): Adjust.
4106         (initialize_low_arch): New function.
4107         * spu-low.c (tdesc_spu): Declare.
4108         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4109         * win32-arm-low.c (tdesc_arm): Declare.
4110         (arm_arch_setup): New function.
4111         (the_low_target): Install arm_arch_setup instead of
4112         init_registers_arm.
4113         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4114         (init_windows_x86): Rename to ...
4115         (i386_arch_setup): ... this.  Set `win32_tdesc'.
4116         (the_low_target): Adjust.
4117         * win32-low.c (win32_tdesc): New global.
4118         (child_add_thread): Don't create the thread cache here.
4119         (do_initial_child_stuff): Set the new process'es tdesc.
4120         * win32-low.h (struct target_desc): Forward declare.
4121         (win32_tdesc): Declare.
4122         * lynx-i386-low.c (tdesc_i386): Declare global.
4123         (lynx_i386_arch_setup): Set `lynx_tdesc'.
4124         * lynx-low.c (lynx_tdesc): New global.
4125         (lynx_add_process): Set the new process'es tdesc.
4126         * lynx-low.h (struct target_desc): Forward declare.
4127         (lynx_tdesc): Declare global.
4128         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4129         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4130         * nto-low.c (nto_tdesc): New global.
4131         (do_attach): Set the new process'es tdesc.
4132         * nto-low.h (struct target_desc): Forward declare.
4133         (nto_tdesc): Declare.
4134         * nto-x86-low.c (tdesc_i386): Declare.
4135         (nto_x86_arch_setup): Set `nto_tdesc'.
4136
4137 2013-06-04  Gary Benson  <gbenson@redhat.com>
4138
4139         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4140         to qSupported response when appropriate.
4141         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4142         with nonzero-length annex.
4143         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4144         arguments supplied in annex.
4145
4146 2013-05-31  Doug Evans  <dje@google.com>
4147
4148         PR server/15594
4149         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4150         64 bits in 64-cross-32 environment.
4151
4152 2013-05-28  Pedro Alves  <palves@redhat.com>
4153
4154         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4155         (aarch64-without-fpu.c): Delete rule.
4156         * configure.srv (aarch64*-*-linux*): Remove references to
4157         aarch64-without-fpu.o and aarch64-without-fpu.xml.
4158         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4159         declaration.
4160
4161 2013-05-24  Pedro Alves  <palves@redhat.com>
4162
4163         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4164         instead of strchr/decode_address.  Error if the range isn't split
4165         with a ','.  Don't assume there's be a ':' in the action.
4166
4167 2013-05-23  Yao Qi  <yao@codesourcery.com>
4168             Pedro Alves  <palves@redhat.com>
4169
4170         * linux-low.c (lwp_in_step_range): New function.
4171         (linux_wait_1): If the thread was range stepping and stopped
4172         outside the stepping range, report the stop to GDB.  Otherwise,
4173         continue stepping.  Add range stepping debug output.
4174         (linux_set_resume_request): Copy the step range from the resume
4175         request to the lwp.
4176         (linux_supports_range_stepping): New.
4177         (linux_target_ops) <supports_range_stepping>: Set to
4178         linux_supports_range_stepping.
4179         * linux-low.h (struct linux_target_ops)
4180         <supports_range_stepping>: New field.
4181         (struct lwp_info) <step_range_start, step_range_end>: New fields.
4182         * linux-x86-low.c (x86_supports_range_stepping): New.
4183         (the_low_target) <supports_range_stepping>: Set to
4184         x86_supports_range_stepping.
4185         * server.c (handle_v_cont): Handle 'r' action.
4186         (handle_v_requests): Append ";r" if the target supports range
4187         stepping.
4188         * target.h (struct thread_resume) <step_range_start,
4189         step_range_end>: New fields.
4190         (struct target_ops) <supports_range_stepping>:
4191         New field.
4192         (target_supports_range_stepping): New macro.
4193
4194 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
4195
4196         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4197         confusion in comment.
4198
4199 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
4200
4201         * lynx-low.c (struct process_info_private): New type.
4202         (lynx_add_process): New function.
4203         (lynx_create_inferior, lynx_attach): Replace calls to
4204         add_process by calls to lynx_add_process.
4205         (lynx_resume): If PTID is null, then try using
4206         current_process()->private->last_wait_event_ptid.
4207         Add comments.
4208         (lynx_clear_inferiors): Delete.  The contents of that function
4209         has been inlined in lynx_mourn;
4210         (lynx_wait_1): Save the ptid in the process's private data.
4211         (lynx_mourn): Free the process' private data.  Replace call
4212         to lynx_clear_inferiors by call to clear_inferiors.
4213
4214 2013-05-17  Yao Qi  <yao@codesourcery.com>
4215
4216         * i386-low.c (i386_length_and_rw_bits): Move the comment to
4217         the right place.
4218
4219 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
4220
4221         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4222         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
4223         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4224         PT_TEXT_END_ADDR guards.  Update comments.
4225         (linux_target_op) <read_offsets>: Conditionally define to
4226         linux_read_offsets if the target is UCLIBC and if it defines
4227         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4228
4229 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
4230             Andrew Jenner  <andrew@codesourcery.com>
4231
4232         * Makefile.in (SFILES): Add linux-nios2-low.c.
4233         (clean): Add action to delete nios2-linux.c.
4234         (nios2-linux.c): New rule.
4235         * configure.srv: Add nios2*-*-linux*.
4236         * linux-nios2-low.c: New.
4237
4238 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4239
4240         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4241
4242 2013-04-25  Hui Zhu  <hui@codesourcery.com>
4243
4244         PR gdb/15186
4245         * ax.c (ax_printf): Add fflush.
4246
4247 2013-04-22  Tom Tromey  <tromey@redhat.com>
4248
4249         * Makefile.in (SFILES): Add filestuff.c.
4250         (OBS): Add filestuff.o.
4251         (filestuff.o): New target.
4252         * config.in, configure: Rebuild.
4253         * configure.ac: Check for fdwalk, pipe2.
4254
4255 2013-04-17  Pedro Alves  <palves@redhat.com>
4256
4257         * configure.ac (USE_THREAD_DB): Delete variable.
4258         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4259         Don't AC_SUBST USE_THREAD_DB.
4260         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4261         * config.in, configure: Regenerate.
4262
4263 2013-04-16  Pedro Alves  <palves@redhat.com>
4264
4265         * linux-low.h (struct lwp_info) <thread_known>: Move under
4266         the USE_THREAD_DB #ifdef.
4267
4268 2013-04-16  Pedro Alves  <palves@redhat.com>
4269
4270         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4271         (linux-low.o): Delete rule.
4272         * linux-low.h: Always include "gdb_thread_db.h" instead of
4273         conditionally including thread_db.h.
4274         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4275         HAVE_THREAD_DB_H.
4276
4277 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4278
4279         * Makefile.in (install-only): Fix make install regression.
4280
4281 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
4282
4283         Convert man pages to texinfo, new gdbinit.5 texinfo page.
4284         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4285         installation.
4286         * gdbserver.1: Remove.
4287
4288 2013-03-22  Pedro Alves  <palves@redhat.com>
4289
4290         * linux-low.c (handle_extended_wait): Don't call
4291         linux_enable_event_reporting.
4292
4293 2013-03-15  Tony Theodore  <tonyt@logyst.com>
4294
4295         PR build/9098:
4296         * Makefile.in (SHELL): Use @SHELL@.
4297
4298 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
4299
4300         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4301         compiler warning.
4302
4303 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
4304
4305         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4306         Remove extraneous NULL element.
4307
4308 2013-03-13  Yao Qi  <yao@codesourcery.com>
4309
4310         * tracepoint.c (traceframe_read_tsv): Look for the last matched
4311         'V' block in trace frame.
4312
4313 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
4314
4315         * target.h (struct target_ops): Add btrace ops.
4316         (target_supports_btrace): New macro.
4317         (target_enable_btrace): New macro.
4318         (target_disable_btrace): New macro.
4319         (target_read_btrace): New macro.
4320         * gdbthread.h (struct thread_info): Add btrace field.
4321         * server.c: Include btrace-common.h.
4322         (handle_btrace_general_set): New function.
4323         (handle_btrace_enable): New function.
4324         (handle_btrace_disable): New function.
4325         (handle_general_set): Call handle_btrace_general_set.
4326         (handle_qxfer_btrace): New function.
4327         (struct qxfer qxfer_packets[]): Add btrace entry.
4328         * inferiors.c (remove_thread): Disable btrace.
4329         * linux-low: Include linux-btrace.h.
4330         (linux_low_enable_btrace): New function.
4331         (linux_low_read_btrace): New function.
4332         (linux_target_ops): Add btrace ops.
4333         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4334         Add srv_linux_btrace=yes.
4335         (x86_64-*-linux*): Add linux-btrace.o.
4336         Add srv_linux_btrace=yes.
4337         * configure.ac: Define HAVE_LINUX_BTRACE.
4338         * config.in: Regenerated.
4339         * configure: Regenerated.
4340
4341 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
4342
4343         * server.c (handle_qxfer): Preserve error message if -3 is
4344         returned.
4345         (qxfer): Document the -3 return value.
4346
4347 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
4348
4349         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4350         (linux_btrace_h): New variable.
4351         (linux-btrace.o): New rule.
4352
4353 2013-03-08  Stan Shebs  <stan@codesourcery.com>
4354             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4355
4356         * tracepoint.c (trace_buffer_size): New global.
4357         (DEFAULT_TRACE_BUFFER_SIZE): New define.
4358         (init_trace_buffer): Change to one-argument function. Allocate
4359         trace buffer memory.
4360         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4361         handle QTBuffer:size packet.
4362         (cmd_bigqtbuffer_size): New function.
4363         (initialize_tracepoint): Call init_trace_buffer with
4364         DEFAULT_TRACE_BUFFER_SIZE.
4365         * server.c (handle_query): Add QTBuffer:size in the
4366         supported packets.
4367
4368 2013-03-07  Yao Qi  <yao@codesourcery.com>
4369
4370         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4371         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4372         of -1.
4373         (cmd_qtsp): Adjust condition.  Do post increment.
4374         Set cur_action and cur_step_action back to 0.
4375
4376 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
4377
4378         PR server/15236
4379         * linux-low.c (linux_write_memory): Return early success if LEN is
4380         zero.
4381
4382 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
4383
4384         * configure.srv: Add x86_64-*-cygwin* as target.
4385
4386 2013-02-28  Tom Tromey  <tromey@redhat.com>
4387
4388         * configure.ac: Invoke AC_SYS_LARGEFILE.
4389         * configure, config.in: Rebuild.
4390
4391 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
4392
4393         * win32-low.c: Throughout, fix format strings and casts of
4394         printf-like functions to avoid type related warnings on all
4395         platforms.
4396         (get_child_debug_event): Print dwDebugEventCode as hex since
4397         that's how it's usually documented.
4398
4399 2013-02-28  Yao Qi  <yao@codesourcery.com>
4400
4401         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4402         pulongest.
4403
4404 2013-02-27  Jiong Wang  <jiwang@tilera.com>
4405
4406         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4407         (reg-tilegx32.c): New rule.
4408         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4409         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
4410         different register info initializer according to elf class.
4411         (init_registers_tilgx32): New function.  The tilegx32 register info
4412         initializer.
4413         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4414         (tile_store_gregset): Likewise.
4415
4416 2013-02-27  Yao Qi  <yao@codesourcery.com>
4417
4418         * server.c (process_point_options): Print debug message when
4419         debug_threads is true.
4420
4421 2013-02-26  Yao Qi  <yao@codesourcery.com>
4422
4423         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4424
4425 2013-02-19  Pedro Alves  <palves@redhat.com>
4426             Kai Tietz <ktietz@redhat.com>
4427
4428         PR gdb/15161
4429
4430         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4431         instead of strtoul to extract address from packet.
4432         (process_serial_event) <'z'>: Likewise.
4433
4434 2013-02-18  Yao Qi  <yao@codesourcery.com>
4435
4436         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4437
4438 2013-02-14  Pedro Alves  <palves@redhat.com>
4439
4440         Plug memory leak.
4441
4442         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4443         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4444
4445 2013-02-14  Pedro Alves  <palves@redhat.com>
4446
4447         * tracepoint.c (cmd_qtdpsrc): Use savestring.
4448
4449 2013-02-14  Pedro Alves  <palves@redhat.com>
4450
4451         * tracepoint.c (save_string): Delete.
4452         (add_tracepoint_action): Use savestring instead of save_string.
4453
4454 2013-02-12  Pedro Alves  <palves@redhat.com>
4455
4456         * linux-xtensa-low.c: Ditto.
4457         * xtensa-xtregs.c: Ditto.
4458
4459 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
4460
4461         * thread-db.c (thread_db_get_tls_address): NULL pointer check
4462         thread_db.
4463
4464 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4465
4466         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4467         aarch64_num_wp_regs and aarch64_num_bp_regs to
4468         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4469
4470 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4471
4472         * linux-aarch64-low.c (ps_get_thread_area): Replace
4473         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4474
4475 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
4476             Marcus Shawcroft  <marcus.shawcroft@arm.com>
4477             Nigel Stephens  <nigel.stephens@arm.com>
4478             Yufeng Zhang  <yufeng.zhang@arm.com>
4479
4480         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4481         (aarch64.c, aarch64-without-fpu.c): New targets.
4482         * configure.srv (aarch64*-*-linux*): New.
4483         * linux-aarch64-low.c: New file.
4484
4485 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4486
4487         * linux-low.c (handle_extended_wait, linux_create_inferior)
4488         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4489         (dequeue_one_deferred_signal, linux_resume_one_thread)
4490         (fetch_register, linux_write_memory, linux_enable_event_reporting)
4491         (linux_tracefork_grandchild, linux_test_for_tracefork)
4492         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4493         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4494         where the argument is 0.
4495
4496 2013-01-25  Yao Qi  <yao@codesourcery.com>
4497
4498         * event-loop.c: Include "queue.h".
4499         (gdb_event_p): New typedef.
4500         (struct gdb_event) <next_event>: Remove.
4501         (event_queue): Change to QUEUE(gdb_event_p).
4502         (async_queue_event): Remove.
4503         (gdb_event_xfree): New.
4504         (initialize_event_loop): New.
4505         (process_event): Use API from QUEUE.
4506         (wait_for_event): Likewise.
4507         * server.c (main): Call initialize_event_loop.
4508         * server.h (initialize_event_loop): Declare.
4509
4510 2013-01-18  Yao Qi  <yao@codesourcery.com>
4511
4512         * ax.h (struct eval_agent_expr_context): New.
4513         (gdb_eval_agent_expr): Update declaration.
4514         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4515         TFRAME.  Add new argument CTX.
4516         * server.h (struct eval_agent_expr_context): Declare.
4517         (agent_mem_read, agent_tsv_read): Update declaration.
4518         (agent_mem_read_string): Likewise.
4519         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4520         (add_traceframe_block): Add new argument TPOINT.
4521         Increase TPOINT->traceframe_usage.
4522         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4523         eval_tracepoint_agent_expr.
4524         (condition_true_at_tracepoint): Likewise.
4525         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
4526         (agent_mem_read_string, agent_tsv_read): Likewise.
4527
4528 2013-01-16  Yao Qi  <yao@codesourcery.com>
4529
4530         * linux-low.c (linux_resume_one_lwp): Don't check
4531         'lwp->bp_reinsert != 0'.
4532
4533 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4534             Pedro Alves  <palves@redhat.com>
4535
4536         * lynx-low.c (ptrace_request_to_str): Define a temporary
4537         macro and use it to simplify this function's implementation.
4538
4539 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4540
4541         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4542         sets errno.
4543
4544 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4545
4546         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4547
4548 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4549
4550         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4551
4552 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4553
4554         * lynx-low.c (lynx_resume): Use the resume_info parameter
4555         to determine the ptid for the lynx_ptrace call, unless
4556         it is equal to minus_one_ptid, in which case we use the
4557         ptid of the current_inferior.
4558         (lynx_wait_1): After having received a thread create/exit
4559         event, resume the inferior's execution using the signaling
4560         thread's ptid, rather than the old ptid.
4561
4562 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4563
4564         * lynx-low.c (lynx_resume): Delete variable ret.
4565
4566 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
4567
4568         * gdbreplay.c (gdbreplay_version): Update copyright year.
4569         * server.c (gdbserver_version): Likewise.
4570
4571 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4572
4573         * lynx-low.c (lynx_wait_1): Add debug trace before adding
4574         new thread.
4575
4576 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4577
4578         * lynx-low.c (ptrace_request_to_str): Add handling for
4579         PTRACE_GETTRACESIG.
4580
4581 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4582
4583         * lynx-low.c (lynx_attach): Delete variable new_process.
4584
4585 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4586
4587         * lynx-low.c (lynx_create_inferior): Delete variable
4588         new_process.
4589
4590 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4591
4592         * lynx-low.c (ptrace_request_to_str): Do not handle
4593         PTRACE_GETTHREADLIST if this macro does not exist.
4594
4595 2012-12-15  Yao Qi  <yao@codesourcery.com>
4596
4597         * Makefile.in (OBS): Add notif.o.
4598         * notif.c, notif.h: New.
4599         * server.c: Include "notif.h".
4600         (struct vstop_notif) <next>: Remove.
4601         <base>: New field.
4602         (queue_stop_reply): Update.
4603         (push_event, send_next_stop_reply): Remove.
4604         (discard_queued_stop_replies): Update.
4605         (notif_stop): New variable.
4606         (handle_v_stopped): Remove.
4607         (handle_v_requests): Don't call handle_v_stopped.  Call
4608         handle_ack_notif instead.
4609         (queue_stop_reply_callback): Call notif_event_enque instead
4610         of queue_stop_reply.
4611         (handle_status): Don't call send_next_stop_reply, call
4612         notif_write_event instead.
4613         (kill_inferior_callback): Likewise.
4614         (detach_or_kill_inferior_callback): Likewise.
4615         (main): Call initialize_notif.
4616         (process_serial_event): Call QUEUE_is_empty.
4617         (handle_target_event): Call notif_push instead of push event.
4618         * server.h (push_event): Remove declaration.
4619
4620 2012-12-10  Tom Tromey  <tromey@redhat.com>
4621
4622         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4623         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4624         macros.
4625         (.c.o): Rewrite.
4626         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4627         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4628         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4629         (amd64-linux-ipa.o, ax.o): Rewrite.
4630         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4631         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4632         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4633         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4634         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4635         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4636         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4637         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4638         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4639         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4640         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4641         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4642         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4643         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4644         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4645         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4646         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4647         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4648         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4649         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4650         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4651         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4652         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4653         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4654         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4655         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4656         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4657         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4658         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4659         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4660         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4661         (reg-tilegx.o): Remove.
4662         (all_object_files): New macro.
4663         Include .deps files.
4664         * aclocal.m4, configure: Rebuild.
4665         * acinclude.m4: Include depstand.m4, lead-dot.m4.
4666         * configure.ac: Invoke ZW_CREATE_DEPDIR,
4667         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
4668
4669 2012-12-05  Tom Tromey  <tromey@redhat.com>
4670
4671         PR gdb/14917:
4672         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4673
4674 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
4675
4676         * configure.ac: Check for linux/perf_event.h.
4677         * config.in: Regenerated.
4678         * configure: Regenerated.
4679
4680 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
4681
4682         * hostio.c (handle_readlink): Decrease buffer size
4683         parameter passed to readlink by one byte.
4684
4685 2012-11-26  Yao Qi  <yao@codesourcery.com>
4686
4687         * configure.ac (build_warnings): Append '-Wempty-body'.
4688         * configure: Regenerated.
4689         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4690         body.
4691
4692 2012-11-15  Pierre Muller  <muller@sourceware.org>
4693
4694         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4695         * config.in: Regenerate.
4696         * configure: Regenerate.
4697         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4698         Use "gdb_wait.h" header instead of <sys/wait.h> header.
4699         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4700         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4701         header.
4702         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
4703         instead of <sys/wait.h> header.
4704         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4705
4706 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
4707
4708         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4709         (various make rules): Remove -DGDBSERVER
4710
4711 2012-11-09  Yao Qi  <yao@codesourcery.com>
4712
4713         * spu-low.c (current_ptid): Move it to ..
4714         * gdbthread.h: ... here.  New.
4715         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4716         * server.c (myresume, process_serial_event): Likewise.
4717         * thread-db.c (thread_db_find_new_threads): Likewise.
4718         * tracepoint.c (run_inferior_command): Likewise.
4719
4720 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
4721
4722         * server.c (handle_search_memory_1): Include access length in
4723         warning message.
4724
4725 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
4726
4727         * linux-crisv32-low.c: Fix compile errors.
4728
4729 2012-09-04  Yao Qi  <yao@codesourcery.com>
4730
4731         * tracepoint.c (cmd_qtsv): Adjust debug message.
4732         Don't check CUR_TPOINT.
4733
4734 2012-08-28  Yao Qi  <yao@codesourcery.com>
4735
4736         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4737         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4738         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4739         Remove declarations of xmalloc, xreallloc, xstrdup and
4740         freeargv.
4741         * Makefile.in (libiberty_h): New.
4742         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4743         (linux-bfin-low.o): Append dependency 'libiberty.h'.
4744
4745 2012-08-23  Yao Qi  <yao@codesourcery.com>
4746
4747         * server.h: Remove declaration of 'xsnprintf'.
4748
4749 2012-08-22  Keith Seitz  <keiths@redhat.com>
4750
4751         * server.h: Include build-gnulib-gbserver/config.h.
4752         * gdbreplay.c: Likewise.
4753
4754 2012-08-08  Doug Evans  <dje@google.com>
4755
4756         * Makefile.in (SFILES): Add gdb_vecs.c.
4757         (OBS): Add gdb_vecs.o.
4758         (gdb_vecs_h, host_defs_h): New variables.
4759         (thread-db.o): Add $(gdb_vecs_h) dependency.
4760         (gdb_vecs.o): New rule.
4761         * thread-db.c: #include "gdb_vecs.h".
4762         (thread_db_load_search): Use a vector to iterate over path elements.
4763         Handle text appearing after "$pdir".
4764
4765         * configure.ac: Add check for strstr.
4766         * config.in: Regenerate.
4767         * configure: Regenerate.
4768
4769 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
4770
4771         * hostio.c (handle_pread): If pread fails, fall back to attempting
4772         lseek/read.
4773         (handle_pwrite): Likewise for pwrite.
4774
4775 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
4776
4777         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4778         between unsupported TYPE and unimplementable ADDR/LEN combination.
4779         (arm_insert_point): Act on new return value.
4780
4781 2012-07-31  Pedro Alves  <palves@redhat.com>
4782
4783         * server.c (process_point_options): Only skip tokens if we find
4784         one that is unrecognized.  Don't treat 'X' specially while
4785         skipping unrecognized tokens.
4786
4787 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
4788
4789         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4790         to 4-byte-align HW breakpoint addresses for Thumb.
4791
4792 2012-07-27  Yao Qi  <yao@codesourcery.com>
4793
4794         PR remote/14161.
4795
4796         * server.h: Declare gdb_agent_about_to_close.
4797         * target.c (kill_inferior): Include "agent.h".
4798         New.  Send command 'kill'.
4799         * target.h (kill_inferior): Removed macro.
4800         * tracepoint.c (gdb_agent_about_to_close): New.
4801         (gdb_agent_helper_thread): Handle command 'close'.
4802         Wait endlessly until the inferior stops.
4803         Install gdb_agent_remove_socket to atexit hook.
4804         (agent_socket_name): New static variable.
4805         (gdb_agent_socket_init): Replace local variable 'name' with
4806         'agent_socket_name'.
4807         (gdb_agent_remove_socket): New.
4808
4809 2012-07-27  Yao Qi  <yao@codesourcery.com>
4810
4811         * server.c (process_point_options): Stop at 'X' when parsing.
4812
4813 2012-07-19  Michael Eager  <eager@eagercon.com>
4814
4815         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4816         to hw_execute.
4817         * linux-x86-low.c (x86_insert_point, x86_remove_point):
4818         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4819         hardware breakpoint.
4820
4821 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4822
4823         * gdbserver/linux-low.c (initialize_low): Call
4824         linux_ptrace_init_warnings.
4825
4826 2012-07-02  Doug Evans  <dje@google.com>
4827
4828         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4829         pointer to int.
4830
4831 2012-07-02  Stan Shebs  <stan@codesourcery.com>
4832
4833         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4834         (ax.o): Add it to build rule.
4835         (ax-ipa.o): Ditto.
4836         (OBS): Add format.o.
4837         (IPA_OBS): Add format.o.
4838         * server.c (handle_query): Claim support for breakpoint commands.
4839         (process_point_options): Add command case.
4840         (process_serial_event): Leave running if there are printfs in
4841         effect.
4842         * mem-break.h (any_persistent_commands): Declare.
4843         (add_breakpoint_commands): Declare.
4844         (gdb_no_commands_at_breakpoint): Declare.
4845         (run_breakpoint_commands): Declare.
4846         * mem-break.c (struct point_command_list): New struct.
4847         (struct breakpoint): New field command_list.
4848         (any_persistent_commands): New function.
4849         (add_commands_to_breakpoint): New function.
4850         (add_breakpoint_commands): New function.
4851         (gdb_no_commands_at_breakpoint): New function.
4852         (run_breakpoint_commands): New function.
4853         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4854         locally.
4855         * ax.c: Include format.h.
4856         (ax_printf): New function.
4857         (gdb_eval_agent_expr): Add printf opcode.
4858
4859 2012-06-13  Yao Qi  <yao@codesourcery.com>
4860
4861         * server.c (start_inferior): Remove duplicated writes to fields
4862         'last_resume_kind' and 'last_status' of 'current_inferior'.
4863
4864 2012-06-12  Yao Qi  <yao@codesourcery.com>
4865             Pedro Alves  <palves@redhat.com>
4866
4867         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
4868         comment.
4869         * server.c (handle_v_cont): Extend comment.
4870
4871 2012-06-11  Yao Qi  <yao@codesourcery.com>
4872
4873         * linux-low.c (linux_attach): Add 'static'.
4874
4875 2012-06-06  Yao Qi  <yao@codesourcery.com>
4876
4877         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4878
4879 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4880
4881         Fix gcc -flto compilation warning.
4882         * server.c (main): Make variable multi_mode and attach volatile.
4883
4884 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
4885
4886         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4887         if the platform doesn't know about it.
4888
4889 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
4890
4891         * Makefile.in (SFILES): Add linux-tile-low.c.
4892         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4893         * configure.srv: Handle tilegx-*-linux*.
4894         * linux-tile-low.c: New file.
4895
4896 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4897
4898         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4899
4900 2012-05-24  Pedro Alves  <palves@redhat.com>
4901
4902         PR gdb/7205
4903
4904         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4905
4906 2012-05-24  Pedro Alves  <palves@redhat.com>
4907
4908         PR gdb/7205
4909
4910         Replace target_signal with gdb_signal throughout.
4911
4912 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
4913
4914         * linux-low.c (linux_store_registers): Avoid the copying sequence
4915         when no data has been retrieved by ptrace.
4916
4917 2012-05-22  Will Deacon  <will.deacon@arm.com>
4918
4919         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4920         Include asm/ptrace.h.
4921         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4922         already defined.
4923
4924 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
4925
4926         * linux-low.c (linux_store_registers): Don't re-retrieve data
4927         with ptrace that has already been obtained from /proc.  Always
4928         copy any data retrieved with ptrace to the buffer supplied.
4929
4930 2012-05-11  Yao Qi  <yao@codesourcery.com>
4931             Pedro Alves  <palves@redhat.com>
4932
4933         * linux-low.c (enum stopping_threads_kind): New.
4934         (stopping_threads): Change type to `enum stopping_threads_kind'.
4935         (handle_extended_wait): If stopping and suspending threads, leave
4936         the new_lwp suspended too.
4937         (linux_wait_for_event): Adjust.
4938         (stop_all_lwps): Set `stopping_threads' to
4939         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4940         whether we're suspending threads or just stopping them.  Assert no
4941         recursion happens.
4942
4943 2012-04-29  Yao Qi  <yao@codesourcery.com>
4944
4945         * server.h: Move some code to ...
4946         * gdbthread.h: ... here.  New.
4947         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4948         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4949         (nto-low.o, win32-low.o): Likewise.
4950         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4951         * regcache.c, remote-utils.c, server.c: Likewise.
4952         * target.c, tracepoint.c, win32-low.c: Likewise.
4953
4954 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
4955
4956         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4957         (PTRACE_ARG4_TYPE): Likewise.
4958         (PTRACE_XFER_TYPE): Likewise.
4959         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4960         ptrace to PTRACE_ARG3_TYPE.
4961         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4962         (PTRACE_ARG4_TYPE): Likewise.
4963         (PTRACE_XFER_TYPE): Likewise.
4964         (linux_detach_one_lwp): Cast fourth argument of
4965         ptrace to long then PTRACE_ARG4_TYPE.
4966         (regsets_fetch_inferior_registers): Cast third argument of
4967         ptrace to long then PTRACE_ARG3_TYPE.
4968         (regsets_store_inferior_registers): Likewise.
4969
4970 2012-04-20  Pedro Alves  <palves@redhat.com>
4971
4972         * configure: Regenerate.
4973
4974 2012-04-19  Pedro Alves  <palves@redhat.com>
4975
4976         * Makefile.in (GNULIB_BUILDDIR): New.
4977         (LIBGNU, INCGNU, GNULIB_H): Adjust.
4978         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4979         (all, install-only, uninstall, clean-info, all-lib, clean): No
4980         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
4981         (maintainer-clean realclean distclean): Use subdir_do.
4982         (subdir_do): New.
4983         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
4984         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
4985         * acinclude.m4: Include acx_configure_dir.m4.
4986         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4987         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
4988         ACX_CONFIGURE_DIR.
4989         (GNULIB): New.
4990         (GNULIB_STDINT_H): Adjust.
4991         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4992         * gdbreplay.c: Include build-gnulib/config.h.
4993         * server.h: Likewise.
4994         * aclocal.m4: Regenerate.
4995         * config.in: Regenerate.
4996         * configure: Regenerate.
4997
4998 2012-04-19  Pedro Alves  <palves@redhat.com>
4999
5000         * Makefile.in (LIBGNU, INCGNU): Adjust.
5001         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5002         (all, install-only, uninstall, clean-info, all-lib, clean)
5003         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5004         * configure.ac: Adjust AC_OUTPUT output.
5005         * aclocal.m4: Regenerate.
5006         * configure: Regenerate.
5007
5008 2012-04-19  Pedro Alves  <palves@redhat.com>
5009
5010         * Makefile.in (generated_files): New.
5011         (server_h): Remove the explicit dependency on config.h, and depend
5012         on $generated_files.
5013
5014 2012-04-19  Pedro Alves  <palves@redhat.com>
5015
5016         * Makefile.in (INCGNU): Add -Ignulib.
5017
5018 2012-04-19  Pedro Alves  <palves@redhat.com>
5019
5020         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5021         (INCGNU): ... this, and spell out -I here.
5022         (GNULIB_LIB): Rename to ...
5023         (LIBGNU): ... this.
5024         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5025
5026 2012-04-19  Pedro Alves  <palves@redhat.com>
5027
5028         * config.in: Regenerate.
5029
5030 2012-04-19  Pedro Alves  <palves@redhat.com>
5031
5032         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5033         * server.h (memmem): Remove declaration.
5034         * config.in: Regenerate.
5035         * configure: Regenerate.
5036
5037 2012-04-19  Yao Qi  <yao@codesourcery.com>
5038
5039         * Makefile.in (SFILES): Add common/vec.c.
5040         (OBS): Add vec.o.
5041         (vec.o): New rule.
5042
5043 2012-04-19  Yao Qi  <yao@codesourcery.com>
5044
5045         * remote-utils.c (prepare_resume_reply): Replace with macro
5046         target_core_of_thread.
5047         * server.c (handle_qxfer_threads_proper): Likewise.
5048         * target.h (traget_core_of_thread): New macro.
5049
5050 2012-04-18  Pedro Alves  <palves@redhat.com>
5051
5052         * aclocal.m4: Regenerate.
5053         * configure: Regenerate.
5054
5055 2012-04-16  Yao Qi  <yao@codesourcery.com>
5056
5057         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5058         duplicated on address.
5059
5060 2012-04-16  Yao Qi  <yao@codesourcery.com>
5061
5062         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5063         (struct tracepoint_action_ops) <send>: New field.
5064         (m_tracepoint_action_send, r_tracepoint_action_send): New.
5065         (agent_expr_send, x_tracepoint_action_send): New.
5066         (l_tracepoint_action_send): New.
5067         (cmd_qtdp): Download and install tracepoint
5068         according to `use_agent'.
5069         (run_inferior_command): Add one more parameter `len'.
5070         Update callers.
5071         (tracepoint_send_agent): New.
5072         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5073
5074 2012-04-16  Yao Qi  <yao@codesourcery.com>
5075
5076         * tracepoint.c (download_tracepoints): Moved to ...
5077         (cmd_qtstart): ... here.
5078
5079 2012-04-14  Yao Qi  <yao@codesourcery.com>
5080
5081         * tracepoint.c: Include inttypes.h.
5082         (struct collect_memory_action): Use sized types.
5083         (struct tracepoint): Likewise.
5084         (cmd_qtdp, stop_tracing): Update print specifiers.
5085         (cmd_qtp, response_tracepoint): Likewise.
5086         (collect_data_at_tracepoint): Likewise.
5087         (collect_data_at_step): Likewise.
5088
5089 2012-04-14  Yao Qi  <yao@codesourcery.com>
5090
5091         Import gnulib module inttypes.
5092         * aclocal.m4, config.in, configure: Regenerated.
5093
5094 2012-04-14  Yao Qi  <yao@codesourcery.com>
5095
5096         * Makefile.in (maintainer-clean, realclean, distclean): Remove
5097         Makefile and config.status at last.
5098
5099 2012-04-13  Yao Qi  <yao@codesourcery.com>
5100
5101         * tracepoint.c: Include stdint.h unconditionally.
5102
5103 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5104
5105         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5106         on BFD_HAVE_SYS_PROCFS_TYPE.
5107         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5108         * configure: Regenerate.
5109         * config.in: Likewise.
5110
5111 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
5112
5113         * Makefile.in (clean): Also remove x32.c x32-linux.c
5114         x32-avx.c x32-avx-linux.c.
5115         (x32.o): New target.
5116         (x32.c): Likewise.
5117         (x32-linux.o): Likewise.
5118         (x32-linux.c): Likewise.
5119         (x32-avx.o): Likewise.
5120         (x32-avx.c): Likewise.
5121         (x32-avx-linux.o): Likewise.
5122         (x32-avx-linux.c): Likewise.
5123
5124         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5125         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5126         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5127         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5128         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5129         i386/x32-avx-linux.xml.
5130
5131         * linux-x86-low.c (init_registers_x32_linux): New prototype.
5132         (init_registers_x32_avx_linux): Likwise.
5133         (x86_linux_update_xmltarget): Call init_registers_x32_linux
5134         or init_registers_x32_avx_linux if linux_is_elf64 is false.
5135
5136 2012-04-13  Pedro Alves  <palves@redhat.com>
5137
5138         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5139         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5140         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5141         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5142         the sub-make.
5143
5144 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
5145
5146         * linux-x86-low.c (compat_x32_clock_t): New.
5147         (compat_x32_siginfo_t): Likewise.
5148         (compat_x32_siginfo_from_siginfo): Likewise.
5149         (siginfo_from_compat_x32_siginfo): Likewise.
5150         (linux_is_elf64): Likewise.
5151         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5152         and siginfo_from_compat_x32_siginfo for x32.
5153         (x86_arch_setup): Set linux_is_elf64.
5154
5155 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
5156
5157         PR gdb/13969
5158         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5159         e_machine field.
5160         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5161         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5162         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5163         compatible with process.
5164
5165 2012-04-12  Yao Qi  <yao@codesourcery.com>
5166
5167         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5168         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5169         (install-only, install-info, clean): Handle sub dir gnulib.
5170         (all-lib, am--refresh): New targets.
5171         (memmem.o): Remove target.
5172         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5173         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
5174         (AC_REPLACE_FUNCS): Remove memmem.
5175         Invoke gl_INIT and AM_INIT_AUTOMAKE.
5176         (AC_OUTPUT): Generate Makefile in gnulib/.
5177         * aclocal.m4, config.in, configure: Regenerated.
5178
5179 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
5180
5181         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5182
5183 2012-04-05  Pedro Alves  <palves@redhat.com>
5184
5185         -Werror=strict-aliasing
5186
5187         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5188         pointer.
5189
5190 2012-04-04  Pedro Alves  <palves@redhat.com>
5191
5192         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5193         (sparc_store_gregset_from_stack, sparc_store_gregset)
5194         (sparc_breakpoint_at): Fix formatting.
5195
5196 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5197
5198         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5199         are available.
5200         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5201         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5202         * config.in: Regenerate.
5203         * configure: Likewise.
5204
5205 2012-03-29  Pedro Alves  <palves@redhat.com>
5206
5207         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5208         Correct ptrace arguments.
5209
5210 2012-03-28  Pedro Alves  <palves@redhat.com>
5211
5212         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5213         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5214         (IA64_FR1_REGNUM): New defines.
5215         (ia64_fetch_register): New.
5216         (the_low_target): Install it.
5217         * linux-low.h (struct linux_target_ops) <fetch_register>: New
5218         field.
5219         * linux-low.c (linux_fetch_registers): Try the
5220         the_low_target.fetch_register hook first.
5221
5222         * linux-arm-low.c (the_low_target): Adjust.
5223         * linux-bfin-low.c (the_low_target): Adjust.
5224         * linux-cris-low.c (the_low_target): Adjust.
5225         * linux-crisv32-low.c (the_low_target): Adjust.
5226         * linux-m32r-low.c (the_low_target): Adjust.
5227         * linux-m68k-low.c (the_low_target): Adjust.
5228         * linux-mips-low.c (the_low_target): Adjust.
5229         * linux-ppc-low.c (the_low_target): Adjust.
5230         * linux-s390-low.c (the_low_target): Adjust.
5231         * linux-sh-low.c (the_low_target): Adjust.
5232         * linux-sparc-low.c (the_low_target): Adjust.
5233         * linux-tic6x-low.c (the_low_target): Adjust.
5234         * linux-x86-low.c (the_low_target): Adjust.
5235         * linux-xtensa-low.c (the_low_target): Adjust.
5236
5237 2012-03-26  Pedro Alves  <palves@redhat.com>
5238
5239         * server.c (handle_qxfer_libraries): Don't bail early if
5240         the_target->qxfer_libraries_svr4 is not NULL.
5241
5242 2012-03-26  Pedro Alves  <palves@redhat.com>
5243
5244         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5245
5246 2012-03-23  Pedro Alves  <palves@redhat.com>
5247
5248         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5249         "library-list-svr4" element's start tag when the the DSO list is
5250         empty.
5251
5252 2012-03-23  Pedro Alves  <palves@redhat.com>
5253
5254         * linux-low.c (read_one_ptr): Read the inferior's pointer through
5255         a variable whose type size is the same as the inferior's pointer
5256         size.
5257
5258 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
5259
5260         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5261         struct siginfo.
5262         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5263         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5264         * linux-low.h: Include <signal.h>.
5265         (struct siginfo): Remove forward declaration.
5266         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5267         struct siginfo.
5268
5269 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
5270
5271         * .gitignore: Ignore more files.
5272
5273 2012-03-19  Pedro Alves  <palves@redhat.com>
5274             Jan Kratochvil  <jan.kratochvil@redhat.com>
5275
5276         * server.c (cont_thread, general_thread): Add describing comments.
5277         (start_inferior): Clear `cont_thread'.
5278         (handle_v_cont): Don't set `cont_thread' if resuming all threads
5279         of a process.
5280
5281 2012-03-15  Yao Qi  <yao@codesourcery.com>
5282
5283         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5284         handling to ...
5285         (cmd_qtdp): ... here.
5286
5287 2012-03-15  Yao Qi  <yao@codesourcery.com>
5288
5289         * tracepoint.c (struct tracepoint_action_ops): New.
5290         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5291         (m_tracepoint_action_download): New.
5292         (r_tracepoint_action_download): New.
5293         (x_tracepoint_action_download): New.
5294         (l_tracepoint_action_download): New.
5295         (add_tracepoint_action): Install `action->ops' according type.
5296         (download_tracepoint_1): Move code `download' function pointer
5297         of various tracepoint_action_ops.
5298
5299 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
5300
5301         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
5302         linux_ptrace_attach_warnings.
5303
5304 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
5305
5306         * Makefile.in (linux-ptrace.o): New.
5307         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5308         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5309         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5310         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5311         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5312         of these targets.
5313         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5314
5315 2012-03-08  Yao Qi  <yao@codesourcery.com>
5316             Pedro Alves  <palves@redhat.com>
5317
5318         Fix PR server/13392.
5319         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5320         offset of JMP insn.
5321         * tracepoint.c (remove_tracepoint): New.
5322         (cmd_qtdp): Call remove_tracepoint when failed to install.
5323
5324 2012-03-07  Pedro Alves  <palves@redhat.com>
5325
5326         * linux-low.c (get_detach_signal): New.
5327         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5328         Pass on pending signals to PTRACE_DETACH.  Check the result of the
5329         ptrace call.
5330         * server.c (program_signals, program_signals_p): New.
5331         (handle_general_set): Handle QProgramSignals.
5332         * server.h (program_signals, program_signals_p): Declare.
5333
5334 2012-03-05  Pedro Alves  <palves@redhat.com>
5335             Jan Kratochvil  <jan.kratochvil@redhat.com>
5336
5337         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5338         New comment why.
5339
5340 2012-03-03  Yao Qi  <yao@codesourcery.com>
5341
5342         * tracepoint.c (tracepoint_look_up_symbols): Update call to
5343         agent_look_up_symbols.
5344
5345 2012-03-03  Yao Qi  <yao@codesourcery.com>
5346
5347         * Makefile.in (linux-low.o): Keep dependence on agent.h.
5348         (linux-x86-low.o): Likewise.
5349         * server.h: Remove in_process_agent_loaded.
5350         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
5351         common/agent.c.
5352         Update callers.
5353
5354 2012-03-03  Yao Qi  <yao@codesourcery.com>
5355
5356         * tracepoint.c (gdb_agent_capability): New global.
5357         (in_process_agent_loaded_ust): Renamed to
5358         `in_process_agent_supports_ust'.
5359         Update callers.
5360         (in_process_agent_supports_ust): Call agent_capability_check.
5361         (clear_installed_tracepoints): Assert that agent supports
5362         agent.
5363
5364 2012-03-03  Yao Qi  <yao@codesourcery.com>
5365
5366         * linux-low.c (linux_supports_agent): New.
5367         (linux_target_ops): Initialize field `supports_agent' with
5368         linux_supports_agent.
5369         * target.h (struct target_ops) <supports_agent>: New.
5370         (target_supports_agent): New macro.
5371         * server.c (handle_general_set): Handle packet 'QAgent'.
5372         (handle_query): Send `QAgent+'.
5373         * Makefile.in (server.o): Depends on agent.h.
5374
5375 2012-03-03  Yao Qi  <yao@codesourcery.com>
5376
5377         * Makefile.in (OBS): Add agent.o.
5378         Add new rule for agent.o.
5379         Track dependence of tracepoint.c on agent.h.
5380         * tracepoint.c (run_inferior_command_1):
5381         (run_inferior_command): Call agent_run_command.
5382         (gdb_ust_connect_sync_socket): Deleted.  Move it to
5383         common/agent.c.
5384         (resume_thread, stop_thread): Likewise.
5385         (gdb_ust_socket_init): Renamed to ...
5386         (gdb_agent_socket_init): ... New.
5387         (gdb_ust_thread): Renamed to ...
5388         (gdb_agent_helper_thread): ... New.
5389         (gdb_ust_init): Move some code to ...
5390         (gdb_agent_init): ... here.  New.
5391         [HAVE_UST]: Call gdb_ust_init.
5392         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
5393         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5394         * config.in, configure: Regenerated.
5395
5396 2012-03-02  Pedro Alves  <palves@redhat.com>
5397
5398         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5399         * linux-low.c (struct simple_pid_list): New.
5400         (stopped_pids): New a struct simple_pid_list pointer.
5401         (add_to_pid_list, pull_pid_from_list): New.
5402         (handle_extended_wait): Don't assume the first signal new children
5403         report is SIGSTOP.  Adjust call to pull_pid_from_list.
5404         (linux_wait_for_lwp): Adjust.
5405
5406 2012-03-02  Yao Qi  <yao@codesourcery.com>
5407
5408         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5409         debug log.
5410
5411 2012-03-02  Yao Qi  <yao@codesourcery.com>
5412
5413         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5414         `stop_pc' and `tpoint'.  Update caller.
5415
5416 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
5417
5418         * linux-low.h (linux_target_ops): Add regset_bitmap member.
5419         * linux-low.c (use_linux_regsets): New macro.
5420         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5421         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5422         (linux_register_in_regsets): New function.
5423         (usr_fetch_inferior_registers): Skip registers covered by
5424         regsets.
5425         (usr_store_inferior_registers): Likewise.
5426         (usr_fetch_inferior_registers): New macro.
5427         (usr_store_inferior_registers): Likewise.
5428         (linux_fetch_registers): Handle mixed regset/non-regset targets.
5429         (linux_store_registers): Likewise.
5430         * linux-mips-low.c (init_registers_mips_dsp_linux): New
5431         prototype.
5432         (init_registers_mips64_dsp_linux): Likewise.
5433         (init_registers_mips_linux): New macro.
5434         (init_registers_mips_dsp_linux): Likewise.
5435         (mips_dsp_num_regs): Likewise.
5436         (DSP_BASE, DSP_CONTROL): New fallback macros.
5437         (mips_base_regs): New macro.
5438         (mips_regmap): Use it.  Fix the size.
5439         (mips_dsp_regmap): New variable.
5440         (mips_dsp_regset_bitmap): Likewise.
5441         (mips_arch_setup): New function.
5442         (mips_cannot_fetch_register): Use the_low_target.regmap rather
5443         than mips_regmap.
5444         (mips_cannot_store_register): Likewise.
5445         (the_low_target): Update .arch_setup, .num_regs and .regmap
5446         initializers.  Add .regset_bitmap initializer.
5447         * linux-arm-low.c (the_low_target): Add .regset_bitmap
5448         initializer.
5449         * linux-bfin-low.c (the_low_target): Likewise.
5450         * linux-cris-low.c (the_low_target): Likewise.
5451         * linux-crisv32-low.c (the_low_target): Likewise.
5452         * linux-ia64-low.c (the_low_target): Likewise.
5453         * linux-m32r-low.c (the_low_target): Likewise.
5454         * linux-m68k-low.c (the_low_target): Likewise.
5455         * linux-ppc-low.c (the_low_target): Likewise.
5456         * linux-s390-low.c (the_low_target): Likewise.
5457         * linux-sh-low.c (the_low_target): Likewise.
5458         * linux-sparc-low.c (the_low_target): Likewise.
5459         * linux-tic6x-low.c (the_low_target): Likewise.
5460         * linux-x86-low.c (the_low_target): Likewise.
5461         * linux-xtensa-low.c (the_low_target): Likewise.
5462         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5463         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
5464         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5465         srv_xmlfiles.
5466         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5467         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5468
5469 2012-02-29  Yao Qi  <yao@codesourcery.com>
5470             Pedro Alves  <palves@redhat.com>
5471
5472         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5473         `step_over_finished' is true.
5474
5475 2012-02-27  Pedro Alves  <palves@redhat.com>
5476
5477         * linux-low.c (pid_is_stopped): Delete, moved to common/.
5478         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5479
5480 2012-02-27  Pedro Alves  <palves@redhat.com>
5481
5482         PR server/9684
5483         * linux-low.c (pid_is_stopped): New.
5484         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5485
5486 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
5487
5488         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5489         of conditions.
5490
5491 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
5492
5493         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5494
5495 2012-02-24  Luis Machado  <lgustavo@codesourcery>
5496
5497         * server.c (handle_query): Advertise support for target-side
5498         breakpoint condition evaluation.
5499         (process_point_options): New function.
5500         (process_serial_event): When inserting a breakpoint, check for
5501         a target-side condition that should be evaluated.
5502
5503         * mem-break.c: Include regcache.h and ax.h.
5504         (point_cond_list_t): New data structure.
5505         (breakpoint) <cond_list>: New field.
5506         (find_gdb_breakpoint_at): Make non-static.
5507         (delete_gdb_breakpoint_at): Clear any target-side
5508         conditions.
5509         (clear_gdb_breakpoint_conditions): New function.
5510         (add_condition_to_breakpoint): Likewise.
5511         (add_breakpoint_condition): Likewise.
5512         (gdb_condition_true_at_breakpoint): Likewise.
5513         (gdb_breakpoint_here): Return result directly instead
5514         of going through a local variable.
5515
5516         * mem-break.h (find_gdb_breakpoint_at): New prototype.
5517         (clear_gdb_breakpoint_conditions): Likewise.
5518         (add_breakpoint_condition): Likewise.
5519         (gdb_condition_true_at_breakpoint): Likewise.
5520
5521         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5522         (need_step_over_p): Take target-side breakpoint condition into
5523         consideration.
5524
5525 2012-02-24  Luis Machado  <lgustavo@codesourcery>
5526
5527         * server.h: Include tracepoint.h.
5528         (agent_mem_read, agent_get_trace_state_variable_value,
5529         agent_set_trace_state_variable_value,
5530         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5531         get_set_tsv_func_addr): New prototypes.
5532
5533         * ax.h: New include file.
5534         * ax.c: New source file.
5535
5536         * tracepoint.c: Include ax.h.
5537         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5538         agent_expr, eval_result_type): Move to ax.h.
5539         (parse_agent_expr): Rename to ...
5540         (gdb_parse_agent_expr): ... this, make it non-static and move
5541         to ax.h.
5542         (unparse_agent_expr) Rename to ...
5543         (gdb_unparse_agent_expr): ... this, make it non-static and move
5544         to ax.h.
5545         (eval_agent_expr): Rename to ...
5546         (eval_tracepoint_agent_expr): ... this.
5547         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5548         forward declarations.
5549         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5550         (agent_get_trace_state_variable_value): New function.
5551         (agent_set_trace_state_variable_value): New function.
5552         (cmd_qtdp): Call gdb_parse_agent_expr (...).
5553         (response_tracepoint): Call gdb_unparse_agent_expr (...).
5554         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5555         (condition_true_at_tracepoint): Likewise.
5556         (parse_agent_expr): Rename to ...
5557         (gdb_parse_agent_expr): ... this and move to ax.c.
5558         (unparse_agent_expr): Rename to ...
5559         (gdb_unparse_agent_expr): ... this and move to ax.c.
5560         (gdb_agent_op_name): Move to ax.c.
5561         (eval_agent_expr): Rename to ...
5562         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5563         and move to ax.c.
5564         (eval_tracepoint_agent_expr): New function.
5565         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5566         non-static.
5567         (current_insn_ptr, emit_error, struct bytecode_address): Move to
5568         ax.c.
5569         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5570         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5571         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5572         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5573         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5574         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5575         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5576         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5577         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5578         (compile_bytecodes): Remove forward declaration.
5579         (is_goto_target): Move to ax.c.
5580         (compile_bytecodes): Move to ax.c and call
5581         agent_get_trace_state_variable_value (...) and
5582         agent_set_trace_state_variable_value (...).
5583
5584         * Makefile.in: Update ax.c and IPA dependencies.
5585
5586 2012-02-24  Pedro Alves  <palves@redhat.com>
5587
5588         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5589         (cmd_bigqtbuffer_circular): ... this.  Only handle
5590         'QTBuffer:circular:'.
5591         (handle_tracepoint_general_set): Adjust.
5592
5593 2012-02-16  Yao Qi  <yao@codesourcery.com>
5594
5595         * inferiors.c: Move code to ...
5596         * dll.c: .... here.  New.
5597         * server.h: Declare clear_dlls.
5598         * Makefile.in (SFILES): Add dll.c.
5599         (OBS): Add dll.o
5600         (dll.o): New rule.
5601
5602 2012-02-11  Yao Qi  <yao@codesourcery.com>
5603
5604         * server.c: (handle_monitor_command): Add a new parameter
5605         `own_buf'.
5606         (handle_query): Update caller.
5607
5608 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
5609
5610         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5611         * configure, config.in: Regenerate.
5612         * hostio.c: Provide an alternate implementation if HAVE_READLINK
5613         is not defined.
5614
5615 2012-02-02  Pedro Alves  <palves@redhat.com>
5616
5617         Try SIGKILL first, then PTRACE_KILL.
5618         * linux-low.c (linux_kill_one_lwp): New.
5619         (linux_kill_one_lwp): Rename to ...
5620         (kill_one_lwp_callback): ... this.  Use the new
5621         linux_kill_one_lwp.
5622
5623 2012-02-02  Pedro Alves  <palves@redhat.com>
5624
5625         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5626         inferior.
5627
5628 2012-01-27  Pedro Alves  <palves@redhat.com>
5629
5630         * linux-low.c (linux_child_pid_to_exec_file): Delete.
5631         (elf_64_file_p): Make static.
5632         (linux_pid_exe_is_elf_64_file): New.
5633         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5634         Delete declarations.
5635         (linux_pid_exe_is_elf_64_file): Declare.
5636         * linux-x86-low.c (x86_arch_setup): Use
5637         linux_pid_exe_is_elf_64_file.
5638
5639 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
5640
5641         * linux-low.c (linux_wait_for_event_1): Rename to ...
5642         (linux_wait_for_event): ... here and merge it with former
5643         linux_wait_for_event - new variable wait_ptid, use it.
5644         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5645
5646 2012-01-23  Pedro Alves  <palves@redhat.com>
5647
5648         * server.c (main): Avoid yet another case of infinite loop while
5649         detaching/killing after a longjmp.
5650
5651 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5652
5653         Code cleanup.
5654         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5655
5656 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
5657
5658         * hostio.c (handle_readlink): New function.
5659         (handle_vFile): Call it to handle "vFile:readlink" packets.
5660
5661 2012-01-20  Pedro Alves  <palves@redhat.com>
5662             Ulrich Weigand  <ulrich.weigand@linaro.org>
5663
5664         * server.c (handle_v_requests): Only support vAttach and vRun to
5665         start multiple processes when in extended protocol mode.
5666
5667 2012-01-17  Pedro Alves  <palves@redhat.com>
5668
5669         * tracepoint.c (initialize_tracepoint): Use mmap instead of
5670         memalign plus mprotect to allocate the scratch buffer.
5671
5672 2012-01-13  Pedro Alves  <palves@redhat.com>
5673
5674         * server.c (attach_inferior): Clear `cont_thread'.
5675
5676 2012-01-13  Pedro Alves  <palves@redhat.com>
5677
5678         * server.c (main): Avoid infinite loop while detaching/killing
5679         after a longjmp.
5680
5681 2012-01-09  Doug Evans  <dje@google.com>
5682
5683         * server.c (start_inferior): Set last_ptid in --wrapper case.
5684
5685 2012-01-06  Yao Qi  <yao@codesourcery.com>
5686
5687         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5688         defined.
5689         [IN_PROCESS_AGENT] (debug_agent): New global variable.
5690
5691 2012-01-04  Yao Qi  <yao@codesourcery.com>
5692
5693         * tracepoint.c (cmd_qtdp): Print debug message
5694         for static tracepoint.
5695
5696 2012-01-04  Yao Qi  <yao@codesourcery.com>
5697
5698         * tracepoint.c (trace_vdebug): Differentiate debug message
5699         between gdbserver and IPA.
5700
5701 2012-01-03  Yao Qi  <yao@codesourcery.com>
5702
5703         * tracepoint.c (tracepoint_was_hit): Don't collect for
5704         static tracepoint.
5705
5706 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
5707
5708         * terminal.h: Reformat copyright header.
5709
5710 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
5711
5712         * server.c (gdbserver_version): Update copyright year.
5713         * gdbreplay.c (gdbreplay_version): Likewise.
5714
5715 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
5716
5717         * linux-low.c (linux_create_inferior): Put empty if clause for write.
5718
5719         Revert:
5720         2011-12-18  Hui Zhu  <teawater@gmail.com>
5721         * linux-low.c (linux_create_inferior): Save return value to ret.
5722
5723 2011-12-18  Hui Zhu  <teawater@gmail.com>
5724
5725         * linux-low.c (linux_create_inferior): Save return value to ret.
5726
5727 2011-12-16  Doug Evans  <dje@google.com>
5728
5729         * linux-low.c (linux_create_inferior): If stdio connection,
5730         redirect stdin from /dev/null, stdout to stderr.
5731         * remote-utils.c (remote_is_stdio): New static global.
5732         (remote_connection_is_stdio): New function.
5733         (remote_prepare): Handle stdio connection.
5734         (remote_open): Ditto.
5735         (remote_close): Don't close stdin for stdio connections.
5736         (read_prim,write_prim): New functions.  Replace all calls to
5737         read/write to these.
5738         * server.c (main): Watch for "-" argument.  Move call to
5739         remote_prepare before start_inferior.
5740         * server.h (STDIO_CONNECTION_NAME): New macro.
5741         (remote_connection_is_stdio): Declare.
5742
5743         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5744         in debugging output.
5745
5746 2011-12-15  Yao Qi  <yao@codesourcery.com>
5747
5748         * tracepoint.c: Include sys/syscall.h.
5749         (gdb_ust_thread): Remove preprocessor conditional.
5750
5751 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
5752
5753         * linux-low.c (linux_detach_one_lwp): Call
5754         the_low_target.prepare_to_resume before detaching.
5755
5756 2011-12-14  Yao Qi  <yao@codesourcery.com>
5757
5758         * tracepoint.c (gdb_ust_thread): Don't ignore return value
5759         of write.
5760
5761 2011-12-14  Yao Qi  <yao@codesourcery.com>
5762
5763         * i386-low.c (i386_low_stopped_data_address): Initialize local
5764         variable `control'.
5765
5766 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
5767
5768         PR remote/13492
5769
5770         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5771         DR_CONTROL unless necessary.  Extend comments.
5772         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5773         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
5774
5775 2011-12-13  Yao Qi  <yao@codesourcery.com>
5776
5777         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5778         macros.
5779         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5780
5781 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
5782
5783         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5784         Print new debug message for such case.
5785
5786 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5787
5788         Fix overlapping memcpy.
5789         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
5790         the read_inferior_memory transfer.
5791         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
5792         write_inferior_memory transfer.
5793         (set_fast_tracepoint_jump): New variable buf.  Use it for the
5794         read_inferior_memory and write_inferior_memory transfers.
5795         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5796         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5797         Use it for the write_inferior_memory transfer.
5798         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5799         buffers.
5800
5801 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
5802
5803         * linux-low.c (fetch_register, store_register): Make code
5804         consistent, fix formatting.
5805
5806 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
5807
5808         * linux-low.c (usr_store_inferior_registers): Factor out code
5809         to handle individual registers into...
5810         (store_register): ... this new function.
5811
5812 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
5813
5814         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5815         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5816         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5817         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5818         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5819         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5820         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5821         (srv_xmlfiles): Add new XML files.
5822
5823         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5824         and <sys/uio.h>.
5825         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5826         (init_registers_s390_linux32v1): Add prototype.
5827         (init_registers_s390_linux32v2): Likewise.
5828         (init_registers_s390_linux64v1): Likewise.
5829         (init_registers_s390_linux64v2): Likewise.
5830         (init_registers_s390x_linux64v1): Likewise.
5831         (init_registers_s390x_linux64v2): Likewise.
5832         (s390_num_regs): Increment to 52.
5833         (s390_regmap): Add orig_r2 register.
5834         (s390_num_regs_3264): Increment to 68.
5835         (s390_regmap_3264): Add orig_r2 register.
5836         (s390_collect_ptrace_register): Handle orig_r2 register.
5837         (s390_supply_ptrace_register): Likewise.
5838         (s390_fill_last_break): New function.
5839         (s390_store_last_break): Likewise.
5840         (s390_fill_system_call): New function.
5841         (s390_store_system_call): Likewise.
5842         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5843         register sets.
5844         (s390_check_regset): New function.
5845         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5846         NT_S390_SYSTEM_CALL regsets and use appropriate description.
5847         Update target_regsets for available register sets.
5848
5849 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
5850             Jan Kratochvil  <jan.kratochvil@redhat.com>
5851
5852         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5853         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5854         New.
5855         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5856         * linux-low.h (struct process_info_private): New member r_debug.
5857         * server.c (handle_qxfer_libraries): Call
5858         the_target->qxfer_libraries_svr4.
5859         (handle_qxfer_libraries_svr4): New function.
5860         (qxfer_packets): New entry "libraries-svr4".
5861         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5862         * target.h (struct target_ops): New member qxfer_libraries_svr4.
5863         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5864         PACKET_qXfer_libraries_svr4.
5865
5866 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
5867
5868         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5869         PSW address/mask between 8-byte and 16-byte formats.
5870         (s390_supply_ptrace_register): Likewise.
5871         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5872         basic addressing mode bit.
5873
5874 2011-11-24  Stan Shebs  <stan@codesourcery.com>
5875
5876         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5877
5878 2011-11-17  Stan Shebs  <stan@codesourcery.com>
5879
5880         * tracepoint.c (struct tracepoint): New field traceframe_usage.
5881         (tracing_start_time): New global.
5882         (tracing_stop_time): New global.
5883         (tracing_user_name): New global.
5884         (tracing_notes): New global.
5885         (tracing_stop_note): New global.
5886         (cmd_qtstart): Set traceframe_usage, start_time.
5887         (stop_tracing): Set stop_time.
5888         (cmd_qtstatus): Report additional status.
5889         (cmd_qtp): New function.
5890         (handle_tracepoint_query): Call it.
5891         (cmd_qtnotes): New function.
5892         (handle_tracepoint_general_set): Call it.
5893         (get_timestamp): Rename from tsv_get_timestamp.
5894
5895 2011-11-14  Stan Shebs  <stan@codesourcery.com>
5896             Kwok Cheung Yeung  <kcy@codesourcery.com>
5897
5898         * linux-x86-low.c (small_jump_insn): New.
5899         (i386_install_fast_tracepoint_jump_pad): Add arguments for
5900         trampoline and error message, build a trampoline and issue a small
5901         jump instruction to it.
5902         (x86_install_fast_tracepoint_jump_pad): Add arguments for
5903         trampoline and error message.
5904         (x86_get_min_fast_tracepoint_insn_len): New.
5905         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5906         * linux-low.h (struct linux_target_ops): Add arguments to
5907         install_fast_tracepoint_jump_pad operation, add new operation.
5908         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5909         arguments.
5910         (linux_get_min_fast_tracepoint_insn_len): New function.
5911         (linux_target_op): Add new operation.
5912         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5913         (gdb_trampoline_buffer_end): Ditto.
5914         (gdb_trampoline_buffer_error): Ditto.
5915         (struct ipa_sym_addresses): Add fields for new IPA variables.
5916         (symbol_list): Add entries for new IPA variables.
5917         (struct tracepoint): Add fields to hold the address range of the
5918         trampoline used by the tracepoint.
5919         (trampoline_buffer_head): New static variable.
5920         (trampoline_buffer_tail): Ditto.
5921         (claim_trampoline_space): New function.
5922         (have_fast_tracepoint_trampoline_buffer): New function.
5923         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5924         structure.
5925         (install_fast_tracepoint): Ditto, also add error buffer argument.
5926         (cmd_qtminftpilen): New function.
5927         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5928         (fast_tracepoint_from_trampoline_address): New function.
5929         (fast_tracepoint_collecting): Handle trampoline as part of jump
5930         pad space.
5931         (set_trampoline_buffer_space): New function.
5932         (initialize_tracepoint): Initialize new IPA variables.
5933         * target.h (struct target_ops): Add arguments to
5934         install_fast_tracepoint_jump_pad operation, add new
5935         get_min_fast_tracepoint_insn_len operation.
5936         (target_get_min_fast_tracepoint_insn_len): New.
5937         (install_fast_tracepoint_jump_pad): Add arguments.
5938         * server.h (IPA_BUFSIZ): Define.
5939         * linux-i386-ipa.c: Include extra header files.
5940         (initialize_fast_tracepoint_trampoline_buffer): New function.
5941         (initialize_low_tracepoint): Call it.
5942         * server.h (set_trampoline_buffer_space): Declare.
5943         (claim_trampoline_space): Ditto.
5944         (have_fast_tracepoint_trampoline_buffer): Ditto.
5945
5946 2011-11-14  Yao Qi  <yao@codesourcery.com>
5947
5948         * server.c (handle_query): Handle InstallInTrace for qSupported.
5949         * tracepoint.c (add_tracepoint): Sort list.
5950         (install_tracepoint, download_tracepoint): New.
5951         (cmd_qtdp): Call them to install and download tracepoints.
5952         (sort_tracepoints): Removed.
5953         (cmd_qtstart): Update.
5954
5955 2011-11-14  Yao Qi  <yao@codesourcery.com>
5956
5957         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5958         * mem-break.h: Declare.
5959         * tracepoint.c (cmd_qtstart): Move some code to ...
5960         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5961         New.
5962         (download_tracepoints): Move some code to ...
5963         (download_tracepoint_1): ... here.  New.
5964
5965 2011-11-08  Yao Qi  <yao@codesourcery.com>
5966
5967         * remote-utils.c (relocate_instruction): A comment fix.
5968
5969 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
5970
5971         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5972         (i386_dr_low_get_control, i386_dr_low_get_status): Use
5973         dr_status_mirror and dr_control_mirror from debug_reg_state.
5974         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5975         (i386_initial_stuff): Remove use of deleted globals.
5976         (i386_get_thread_context, i386_set_thread_context,
5977         i386_thread_added): Use dr_status_mirror and dr_control_mirror
5978         from debug_reg_state.
5979
5980 2011-11-05  Yao Qi  <yao@codesourcery.com>
5981
5982         * tracepoint.c (gdb_collect): Loop over tracepoints of same
5983         address as TPOINT's.
5984
5985 2011-11-02  Stan Shebs  <stan@codesourcery.com>
5986
5987         * tracepoint.c (agent_mem_read_string): New function.
5988         (eval_agent_expr): Call it for tracenz.
5989         * server.c (handle_query): Report support for tracenz.
5990
5991 2011-11-02  Yao Qi  <yao@codesourcery.com>
5992
5993         * tracepoint.c (cmd_qtstart): Remove unused local variables.
5994
5995 2011-11-02  Yao Qi  <yao@codesourcery.com>
5996
5997         * target.h: Fix a typo in comment.
5998
5999 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
6000
6001         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
6002         clobber the breakpoints' shadows with fast tracepoint jumps.
6003         * mem-break.h (check_mem_write): Add `myaddr' parameter.
6004         * target.c (write_inferior_memory): Also pass MYADDR down to
6005         check_mem_write.
6006
6007 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
6008
6009         * configure.ac: Check support for personality routine.
6010         * configure: Regenerate.
6011         * config.in: Likewise.
6012         * linux-low.c: Include <sys/personality.h>.
6013         Define ADDR_NO_RANDOMIZE if necessary.
6014         (linux_create_inferior): Disable address space randomization when
6015         forking inferior, if requested.
6016         (linux_supports_disable_randomization): New function.
6017         (linux_target_ops): Install it.
6018         * server.h (disable_randomization): Declare.
6019         * server.c (disable_randomization): New global variable.
6020         (handle_general_set): Handle QDisableRandomization.
6021         (handle_query): Likewise for qSupported.
6022         (main): Support --disable-randomization and --no-disable-randomization
6023         command line arguments.
6024         * target.h (struct target_ops): Add supports_disable_randomization.
6025         (target_supports_disable_randomization): New macro.
6026
6027 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
6028
6029         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6030         ifdef check.
6031         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6032         [!PT_GETDSBT] (target_loadmap): New definition.
6033         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6034         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6035         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6036         and PT_GETDSBT to LINUX_LOADMAP.
6037         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6038         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6039
6040 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
6041
6042         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6043         (arm_linux_hwbp_cap): New static variable.
6044         (arm_linux_get_hwbp_cap): Replace by ...
6045         (arm_linux_init_hwbp_cap): ... this new function.
6046         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6047         (arm_linux_get_hw_watchpoint_count): Likewise.
6048         (arm_linux_get_hw_watchpoint_max_length): Likewise.
6049         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6050         (arm_prepare_to_resume): Use perror_with_name instead of error.
6051
6052 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
6053
6054         * linux-arm-low.c: Include <signal.h>.
6055         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6056         (struct arm_linux_hwbp_cap): New data type.
6057         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6058         (struct arm_linux_hw_breakpoint): New data type.
6059         (MAX_BPTS, MAX_WPTS): Define.
6060         (struct arch_process_info, struct arch_lwp_info): New data types.
6061         (arm_linux_get_hwbp_cap): New function.
6062         (arm_linux_get_hw_breakpoint_count): Likewise.
6063         (arm_linux_get_hw_watchpoint_count): Likewise.
6064         (arm_linux_get_hw_watchpoint_max_length): Likewise.
6065         (arm_hwbp_control_initialize): Likewise.
6066         (arm_hwbp_control_is_enabled): Likewise.
6067         (arm_hwbp_control_is_initialized): Likewise.
6068         (arm_hwbp_control_disable): Likewise.
6069         (arm_linux_hw_breakpoint_equal): Likewise.
6070         (arm_linux_hw_point_initialize): Likewise.
6071         (struct update_registers_data): New data structure.
6072         (update_registers_callback: New function.
6073         (arm_insert_point): Likewise.
6074         (arm_remove_point): Likewise.
6075         (arm_stopped_by_watchpoint): Likewise.
6076         (arm_stopped_data_address): Likewise.
6077         (arm_new_process): Likewise.
6078         (arm_new_thread): Likewise.
6079         (arm_prepare_to_resume): Likewise.
6080         (the_low_target): Register arm_insert_point, arm_remove_point,
6081         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6082         arm_new_thread, and arm_prepare_to_resume.
6083
6084 2011-09-15  Stan Shebs  <stan@codesourcery.com>
6085
6086         * server.h (struct emit_ops): Add compare-goto fields.
6087         * tracepoint.c (gdb_agent_op_sizes): New table.
6088         (emit_eq_goto): New function.
6089         (emit_ne_goto): New function.
6090         (emit_lt_goto): New function.
6091         (emit_le_goto): New function.
6092         (emit_gt_goto): New function.
6093         (emit_ge_goto): New function.
6094         (is_goto_target): New function.
6095         (compile_bytecodes): Recognize special cases of compare-goto
6096         combinations and call specialized emitters for them.
6097         * linux-x86-low.c (amd64_emit_eq_goto): New function.
6098         (amd64_emit_ne_goto): New function.
6099         (amd64_emit_lt_goto): New function.
6100         (amd64_emit_le_goto): New function.
6101         (amd64_emit_gt_goto): New function.
6102         (amd64_emit_ge_goto): New function.
6103         (amd64_emit_ops): Add the new functions.
6104         (i386_emit_eq_goto): New function.
6105         (i386_emit_ne_goto): New function.
6106         (i386_emit_lt_goto): New function.
6107         (i386_emit_le_goto): New function.
6108         (i386_emit_gt_goto): New function.
6109         (i386_emit_ge_goto): New function.
6110         (i386_emit_ops): Add the new functions.
6111
6112 2011-09-08  Stan Shebs  <stan@codesourcery.com>
6113
6114         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6115         (i386_emit_epilogue): Restore %ebx.
6116
6117 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
6118
6119         * server.c (step_thread): Remove definition.
6120         (process_serial_event): Don't handle Hs.
6121         * server.h (step_thread): Remove declaration.
6122         * target.c (set_desired_inferior): Remove use of step_thread.
6123
6124 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
6125
6126         * linux-low.c: Include linux-procfs.h.
6127         (linux_attach_lwp_1): Update comments.
6128         (linux_attach): Scan for existing threads when attaching to a
6129         process that is the tgid.
6130         * Makefile.in: Update dependencies.
6131
6132 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
6133
6134         * configure.srv: Add linux-procfs.o dependencies.
6135
6136 2011-08-14  Yao Qi  <yao@codesourcery.com>
6137
6138         * target.h (struct target_ops): Fix indent.
6139         * win32-low.c (win32_target_ops): Fix comment.
6140
6141 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
6142             Yao Qi  <yao@codesourcery.com>
6143
6144         * Makefile.in (clean): Remove tic6x-*.c files.
6145         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6146         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6147         (tic6x-c64xp-linux.c): Likewise.
6148         * configure.srv: Add support for tic6x-*-uclinux.
6149         * linux-tic6x-low.c: New.
6150         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6151
6152 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
6153             Yao Qi  <yao@codesourcery.com>
6154
6155         * target.h (struct target_ops): Add read_loadmap.
6156         * linux-low.c (struct target_loadseg): New type.
6157         (struct target_loadmap): New type.
6158         (linux_read_loadmap): New function.
6159         (linux_target_ops): Add linux_read_loadmap.
6160         * server.c (handle_query): Support qXfer:fdpic:read packet.
6161         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6162         to NULL.
6163
6164 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
6165
6166         * win32-low.c: Include <stdint.h>.
6167
6168 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
6169
6170         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6171         to the inferior here.
6172         (i386_remove_aligned_watchpoint): Ditto.
6173         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6174         fit part of the watchpoint in the debug registers.
6175         (i386_update_inferior_debug_regs): New.
6176         (i386_low_insert_watchpoint): Work on a local mirror of the debug
6177         registers, and only update the inferior on success.
6178         (i386_low_remove_watchpoint): Ditto.
6179
6180 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
6181
6182         * linux-low.c (compare_ints, unique, list_threads, show_process,
6183         linux_core_of_thread): Delete.
6184         (linux_target_ops): Change linux_core_of_thread to
6185         linux_common_core_of_thread.
6186         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6187         * utils.c (malloc_failure): Change type of argument.
6188         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6189         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6190         common/linux-osdata.c, common/ptid.c and common/buffer.c.
6191         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6192         (IPA_OBJS): Add common-utils-ipa.o.
6193         (ptid_h, linux_osdata_h): New macros.
6194         (server_h): Add common/common-utils.h, common/xml-utils.h,
6195         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6196         common/ptid.h.
6197         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6198         ptid.o, buffer.o): New rules.
6199         (linux-low.o): Add common/linux-osdata.h as a dependency.
6200         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6201         * configure.ac: Add AC_HEADER_DIRENT check.
6202         * config.in: Regenerate.
6203         * configure: Regenerate.
6204         * remote-utils.c (xml_escape_text): Delete.
6205         (buffer_grow, buffer_free, buffer_init, buffer_finish,
6206         buffer_xml_printf): Move to common/buffer.c.
6207         * server.c (main): Remove call to initialize_inferiors.
6208         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6209         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6210         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6211         internal_error, gdb_assert, gdb_assert_fail): Delete.
6212         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6213         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6214         common/buffer.h.
6215         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6216         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6217         initialize_inferiors): Delete.
6218
6219 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
6220
6221         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6222         symbol error.
6223
6224 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
6225
6226         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6227         assertion.
6228         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6229
6230 2011-05-26  Yao Qi  <yao@codesourcery.com>
6231
6232         * Makefile.in (thread-db.o): Track dependence to
6233         common/gdb_thread_db.h.
6234         * thread-db.c: include gdb_thread_db.h from right place.
6235
6236 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
6237
6238         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6239         __FILE__ and __LINE__ to internal_error.
6240
6241 2011-05-13  Doug Evans  <dje@google.com>
6242
6243         * thread-db.c (try_thread_db_load_from_sdir): New function.
6244         (try_thread_db_load_from_dir): New function.
6245         (thread_db_load_search): Handle $sdir, ignore $pdir.
6246         Remove trying of system directories if search of
6247         libthread-db-search-path fails, that is now done via $sdir.
6248
6249 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
6250
6251         * server.c (handle_query): Add EnableDisableTracepoints to the list
6252         of supported features.
6253         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6254         tracepoints.
6255         (cmd_qtenable_disable): New.
6256         (cmd_qtstart): Install tracepoints even if disabled.
6257         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6258         receiving a QTEnable or QTDisable packet.
6259         (gdb_collect): Skip data collection if fast tracepoint is disabled.
6260         (ust_marker_to_static_tracepoint): Do not ignore disabled static
6261         tracepoints.
6262         (gdb_probe): Skip data collection if static tracepoint is disabled.
6263
6264 2011-05-10  Doug Evans  <dje@google.com>
6265
6266         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6267
6268 2011-05-04  Doug Evans  <dje@google.com>
6269
6270         * linux-low.c (linux_join): Skip process lookup.
6271         * spu-low.c (spu_join): Ditto.
6272         * server.c (join_inferiors_callback): Delete.
6273         (process_serial_event): For 'D' packet (detach) call join_inferior
6274         directly.
6275
6276 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
6277
6278         * README: Don't mention xscale*-*-linux*.
6279         * configure.srv (xscale*-*-linux*): Don't handle target.
6280
6281 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
6282
6283         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6284         casting pointers.
6285         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6286         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6287         (i386_emit_void_call_2): Likewise.
6288
6289 2011-04-26  Yao Qi  <yao@codesourcery.com>
6290
6291         * linux-low.c: Move common macros to linux-ptrace.h.
6292         Include linux-ptrace.h.
6293         * Makefile.in (linux_ptrace_h): New.
6294         (linux-low.o): Depends on linux-ptrace.h.
6295
6296 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6297
6298         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6299         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
6300         (remote_prepare): New function with most of the TCP code from ...
6301         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
6302         setting transport_is_reliable.
6303         * server.c (run_once): New variable.
6304         (gdbserver_usage): Document it.
6305         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
6306         the first run if RUN_ONCE.
6307         * server.h (run_once, remote_prepare): New declarations.
6308
6309 2011-04-19  Tom Tromey  <tromey@redhat.com>
6310
6311         * win32-low.c (handle_load_dll): Remove duplicate "the".
6312
6313 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
6314
6315         Remove support for old Cygwin 1.5 versions.
6316         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6317         function to avoid warning.
6318         (win32_add_one_solib): Use cygwin_conv_path function to avoid
6319         warning.
6320
6321 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
6322
6323         * gdbserver/server.h (Macro _): Define it if not available.
6324
6325 2011-03-14  Michael Snyder  <msnyder@vmware.com>
6326
6327         * hostio.c (handle_close): Remove unnecessary null test.
6328
6329 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
6330
6331         * Makefile.in (maintainer-clean realclean distclean): Remove
6332         "make ...  subdir_do" command.
6333
6334 2011-03-10  Michael Snyder  <msnyder@vmware.com>
6335
6336         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6337
6338         * server.c (handle_v_run): Free alloced buffer on early return.
6339
6340 2011-03-09  Yao Qi  <yao@codesourcery.com>
6341
6342         Revert:
6343         2011-03-04  Yao Qi  <yao@codesourcery.com>
6344
6345         * Makefile.in: Remove GNU make feature --directory.
6346
6347         2011-03-05  Yao Qi  <yao@codesourcery.com>
6348
6349         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6350         (subdir_do): New make target.  Copied from gdb/Makefile.
6351         (maintainer-clean, realclean, distclean, clean): Call corresponding
6352         make targets in common/Makefile.
6353
6354         2011-02-11  Yao Qi  <yao@codesourcery.com>
6355
6356         * configure.ac: Call AC_PROG_RANLIB.
6357         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
6358         * configure: Regenerate.
6359
6360 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6361
6362         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6363
6364 2011-03-06  Yao Qi  <yao@codesourcery.com>
6365
6366         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6367
6368 2011-03-05  Yao Qi  <yao@codesourcery.com>
6369
6370         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6371         (subdir_do): New make target.  Copied from gdb/Makefile.
6372         (maintainer-clean, realclean, distclean, clean): Call corresponding
6373         make targets in common/Makefile.
6374
6375 2011-03-04  Yao Qi  <yao@codesourcery.com>
6376
6377         * Makefile.in: Remove GNU make feature --directory.
6378
6379 2011-03-04  Michael Snyder  <msnyder@vmware.com>
6380
6381         * server.c (queue_stop_reply): Call xmalloc not malloc.
6382
6383 2011-03-02  Michael Snyder  <msnyder@vmware.com>
6384
6385         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6386
6387 2011-02-28  Michael Snyder  <msnyder@vmware.com>
6388
6389         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6390         (cmd_qtframe): Ditto.
6391         (cmd_qtbuffer): Ditto.
6392         (cmd_bigqtbuffer): Ditto.
6393
6394         * utils.c (decimal2str): Initialize 'width' to nine, then
6395         don't mess with it.
6396
6397 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6398
6399         * hostio.c (require_data): Free *data, not data.
6400
6401 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6402
6403         * hostio.c (require_data): Use free, not xfree.
6404
6405 2011-02-27  Michael Snyder  <msnyder@vmware.com>
6406
6407         * server.c (handle_query): Discard unused value.
6408
6409         * hostio.c (require_data): Free malloc memory before returning
6410         error.
6411
6412 2011-02-26  Michael Snyder  <msnyder@vmware.com>
6413
6414         * linux-low.c (list_threads): Call closedir for dirent.
6415
6416 2011-02-27  Michael Snyder  <msnyder@vmware.com>
6417
6418         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6419         a case statement falls through.
6420
6421         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6422
6423         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6424         in comparison.
6425
6426 2011-02-26  Michael Snyder  <msnyder@vmware.com>
6427
6428         * utils.c (decimal2str): Eliminate dead code and dead param.
6429         (pulongest): Drop dead param from call to decimal2str.
6430         (plongest): Ditto.
6431
6432 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
6433
6434         Revert the following patch (not approved yet):
6435         2011-02-21  Hui Zhu  <teawater@gmail.com>
6436         * tracepoint.c (tp_printf): New function.
6437         (eval_agent_expr): Handle gdb_agent_op_printf.
6438
6439 2011-02-21  Hui Zhu  <teawater@gmail.com>
6440
6441         * tracepoint.c (tp_printf): New function.
6442         (eval_agent_expr): Handle gdb_agent_op_printf.
6443
6444 2011-02-18  Tom Tromey  <tromey@redhat.com>
6445
6446         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6447         (tracepoint.o): Likewise.
6448         * tracepoint.c (enum gdb_agent_op): Use ax.def.
6449         (gdb_agent_op_names): Likewise.
6450
6451 2011-02-18  Tom Tromey  <tromey@redhat.com>
6452
6453         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6454         gdb_agent_op_rot>: New constants.
6455         (gdb_agent_op_names): Add pick and roll.
6456         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6457         cases.
6458
6459 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
6460
6461         * aclocal.m4: Regenerated with aclocal-1.11.1.
6462
6463 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
6464
6465         * server.c (handle_qxfer_traceframe_info): New.
6466         (qxfer_packets): Register "traceframe-info".
6467         (handle_query): Report support for qXfer:traceframe-info:read+.
6468         * tracepoint.c (match_blocktype): New.
6469         (traceframe_find_block_type): Rename to ...
6470         (traceframe_walk_blocks): ... this.  Add callback filter argument,
6471         and use it.
6472         (traceframe_find_block_type): New, reimplemented on top of
6473         traceframe_walk_blocks.
6474         (build_traceframe_info_xml): New.
6475         (traceframe_read_info): New.
6476         * server.h (traceframe_read_info): Declare.
6477
6478 2011-02-11  Yao Qi  <yao@codesourcery.com>
6479
6480         * configure.ac: Call AC_PROG_RANLIB.
6481         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
6482         * configure: Regenerate.
6483
6484 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
6485
6486         * server.c (gdb_read_memory): Change return semantics to allow
6487         partial transfers.
6488         (handle_search_memory_1): Adjust.
6489         (process_serial_event) <'m' packet>: Handle partial transfers.
6490         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6491
6492 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
6493
6494         * regcache.c (init_register_cache): Initialize
6495         regcache->register_status.
6496         (free_register_cache): Release regcache->register_status.
6497         (regcache_cpy): Copy register_status.
6498         (registers_to_string): Print 'x's for unavailable registers.
6499         (supply_register): Mark the register's status valid or
6500         unavailable, depending on whether a buffer was passed in or not.
6501         (supply_register_zeroed): New.
6502         (supply_regblock): Mark the registers' status valid or
6503         unavailable, depending on whether a buffer was passed in or not.
6504         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6505         (struct regcache): New `register_status' field.
6506         (supply_register_zeroed): Declare.
6507         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6508         supply_register_zeroed, rather than passing a NULL buffer to
6509         supply_register.
6510         * tracepoint.c (fetch_traceframe_registers): Update comment.
6511
6512 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
6513
6514         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6515         buffer explicit.
6516
6517 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
6518
6519         * server.h (decode_xfer_write): Change prototype.
6520         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6521         and don't extract the annex here.
6522         * server.c (decode_xfer_read): Remove `annex' parameter,
6523         and don't extract the annex here.
6524         (decode_xfer): New.
6525         (struct qxfer): New.
6526         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6527         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6528         (handle_qxfer_statictrace): New functions, abstracted out from
6529         handle_query, and made to use the struct qxfer interface.
6530         (handle_threads_qxfer_proper): Rename to ...
6531         (handle_qxfer_threads_proper): ... this.
6532         (handle_threads_qxfer): Rename to ...
6533         (handle_qxfer_threads): ... this.  Adjust.
6534         (qxfer_packets): New array.
6535         (handle_qxfer): New function.
6536         (handle_query): Use handle_qxfer.
6537
6538 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
6539
6540         * gdbreplay.c: Shorten lines of >= 80 columns.
6541         * linux-low.c: Ditto.
6542         * linux-ppc-low.c: Ditto.
6543         * linux-s390-low.c: Ditto.
6544         * linux-sparc-low.c: Ditto.
6545         * linux-x86-low.c: Ditto.
6546         * linux-xtensa-low.c: Ditto.
6547         * mem-break.c: Ditto.
6548         * nto-low.c: Ditto.
6549         * regcache.h: Ditto.
6550         * remote-utils.c: Ditto.
6551         * server.c: Ditto.
6552         * server.h: Ditto.
6553         * thread-db.c: Ditto.
6554         * tracepoint.c: Ditto.
6555         * utils.c: Ditto.
6556         * win32-low.h: Ditto.
6557
6558 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
6559
6560         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6561         update.
6562
6563 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
6564
6565         * server.c (gdbserver_version): Update copyright year in version
6566         output.
6567         * gdbreplay.c (gdbreplay_version): Ditto.
6568
6569 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
6570
6571         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6572         * linux-bfin-low.c: New file.
6573         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6574         PT_DATA_ADDR for BFIN targets.
6575         * Makefile.in (SFILES): Add linux-bfin-low.c.
6576         (clean): Remove reg-bfin.c.
6577         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6578         * README: Mention supported Blackfin targets.
6579
6580 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
6581
6582         * .gitignore: New file.
6583
6584 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
6585
6586         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6587
6588 2010-10-22  Jie Zhang  <jie@codesourcery.com>
6589
6590         * Makefile.in: Add FLAGS_TO_PASS variable.
6591         (install): Remove dependency of install-only and recursively
6592         invoke make for install-only.
6593
6594 2010-10-04  Doug Evans  <dje@google.com>
6595
6596         * Makefile.in (uninstall): Use $(DESTDIR).
6597
6598 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
6599
6600         PR gdb/11842
6601
6602         * linux-x86-low.c (compat_siginfo_from_siginfo)
6603         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6604         si_code is < 0.  Check for si_code == SI_TIMER before checking for
6605         si_code < 0.
6606
6607 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
6608
6609         * lynx-i386-low.c: New file.
6610         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6611
6612 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
6613
6614         * lynx-low.c (ptrace_request_to_str): Remove handling for
6615         request values that have been removed in LynxOS 5.x.
6616
6617 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
6618
6619         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6620         <ptrace.h>
6621
6622 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
6623
6624         * configure.ac: Add --enable-inprocess-agent option.
6625         * configure: Rebuilt.
6626
6627 2010-09-06  Yao Qi  <yao@codesourcery.com>
6628
6629         * linux-low.c (linux_kill): Remove unused variable.
6630         (linux_stabilize_threads): Likewise.
6631         * server.c (start_inferior): Likewise.
6632         (queue_stop_reply_callback): Likewise.
6633         * tracepoint.c (do_action_at_tracepoint): Likewise.
6634
6635 2010-09-06  Yao Qi  <yao@codesourcery.com>
6636
6637         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6638         on return.
6639
6640 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6641
6642         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6643
6644 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
6645
6646         * Makefile.in (install-only): Replace $IPA_DEPFILES with
6647         "$(IPA_DEPFILES)".
6648
6649 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6650
6651         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6652         gdbserver/lynx-ppc-low.c: New files.
6653         * Makefile.in (lynx_low_h): New variable.
6654         (lynx-low.o, lynx-ppc-low.o): New rules.
6655         * configure.ac: On LynxOS, link with -lnetinet.
6656         * configure.srv: Add handling of powerpc-*-lynxos* targets.
6657         * configure: regenerate.
6658
6659 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6660
6661         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6662         * configure.ac: Add check for vasprintf and vsnprintf.
6663         * configure, config.in: Regenerate.
6664         * server.h (vasprintf, vsnprintf): Add conditional declarations.
6665
6666 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6667
6668         * gdbreplay.c: Move include of alloca.h up, next to include of
6669         malloc.h.
6670         * server.h: Add include of malloc.h.
6671         * mem-break.c: Remove include of malloc.h.
6672         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6673
6674 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6675
6676         * Makefile.in (memmem.o): Build with -Wno-error.
6677
6678 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6679
6680         * utils.c (xsnprintf): Make non-static.
6681         * server.h: Add xsnprintf declaration.
6682         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6683         replace calls to snprintf by calls to xsnprintf throughout.
6684
6685 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6686
6687         * configure.ac: Add configure check for alloca.
6688         * configure, config.in: Regenerate.
6689         * server.h: Include alloca.h if it exists.
6690         * gdbreplay.c: Include alloca.h if it exists.
6691
6692 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
6693
6694         * linux-low.c (__SIGRTMIN): Define if not already defined.
6695         (linux_create_inferior): Check for __ANDROID__ rather than
6696         __SIGRTMIN.
6697         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6698         are already deferred.
6699         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6700         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6701         stopped and already has a pending signal to report.
6702         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6703         a pending signal to report or is moving out of a jump pad.
6704         (linux_init_signals): Check for __ANDROID__ rather than
6705         __SIGRTMIN.
6706
6707 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
6708
6709         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6710         debug_threads check.  Avoid a linear search when not doing debug
6711         output.
6712
6713 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
6714
6715         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6716         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6717         (struct file_handler) <fd>: Change type to gdb_fildes_t.
6718         (process_event): Change local fd's type to gdb_fildes_t.
6719         (create_file_handler): Adjust prototype.
6720         (delete_file_handler): Adjust prototype.
6721         (handle_file_event): Adjust prototype.  Use pfildes.
6722         (create_file_event): Adjsut prototype.
6723         * remote-utils.c (remote_desc, listen_desc): Change type to
6724         gdb_fildes_t.
6725         * server.h: New gdb_fildes_t typedef.
6726         [USE_WIN32API]: Include winsock2.h.
6727         (delete_file_handler, add_file_handler): Adjust prototypes.
6728         (pfildes): Declare.
6729         * utils.c (pfildes): New.
6730
6731 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
6732
6733         * configure.ac (build_warnings): Add -Wno-char-subscripts.
6734         * configure: Regenerate.
6735
6736 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
6737
6738         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6739         (linux_done_accessing_memory): ... this.
6740         (linux_target_ops): Adjust.
6741         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6742         * nto-low.c (nto_target_ops): Adjust comment.
6743         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6744         * spu-low.c (spu_target_ops): Adjust comment.
6745         * target.h (target_ops): Rename unprepare_to_access_memory field
6746         to done_accessing_memory.
6747         (unprepare_to_access_memory): Rename to ...
6748         (done_accessing_memory): ... this.
6749
6750 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
6751
6752         * linux-low.c (linux_prepare_to_access_memory): New.
6753         (linux_unprepare_to_access_memory): New.
6754         (linux_target_ops): Install them.
6755         * server.c (read_memory): Rename to ...
6756         (gdb_read_memory): ... this.  Use
6757         prepare_to_access_memory/prepare_to_access_memory.
6758         (write_memory): Rename to ...
6759         (gdb_write_memory): ... this.  Use
6760         prepare_to_access_memory/prepare_to_access_memory.
6761         (handle_search_memory_1): Adjust.
6762         (process_serial_event): Adjust.
6763         * target.h (struct target_ops): New fields
6764         prepare_to_access_memory and unprepare_to_access_memory.
6765         (prepare_to_access_memory, unprepare_to_access_memory): New.
6766         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6767         prepare_to_access_memory/prepare_to_access_memory.
6768         * nto-low.c (nto_target_ops): Adjust.
6769         * spu-low.c (spu_target_ops): Adjust.
6770         * win32-low.c (win32_target_ops): Adjust.
6771
6772 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
6773
6774         * Makefile.in (WARN_CFLAGS): Get it from configure.
6775         (WERROR_CFLAGS): New.
6776         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6777         * configure.ac: Introduce --enable-werror, which adds -Werror to
6778         the compiler command line.  Enabled by default.  Disable with
6779         --disable-werror.  Add -Wdeclaration-after-statement
6780         Wpointer-arith and -Wformat-nonliteral to warning flags.
6781         * configure: Regenerate.
6782
6783 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
6784
6785         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6786
6787 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
6788
6789         * gdbreplay.c (remote_error): New.
6790         (gdbchar): New.
6791         (expect): Use gdbchar.  Check for error reading from GDB.
6792         Clarify sync error output.
6793         (play): Check for errors writing to GDB.
6794         * linux-low.c (sigchld_handler): Really ignore `write' errors.
6795         * remote-utils.c (getpkt): Check for errors writing to the remote
6796         descriptor.
6797
6798 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
6799
6800         * linux-low.c (linux_wait_1): Move non-debugging code out of
6801         `debug_threads' control.
6802
6803 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
6804
6805         * linux-low.c (linux_wait_1): Don't set last_status here.
6806         * server.c (push_event, queue_stop_reply_callback): Assert we're
6807         not pushing a TARGET_WAITKIND_IGNORE event.
6808         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6809         (myresume, handle_target_event): Set the thread's last_resume_kind
6810         and last_status from the target returned status.
6811
6812 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
6813
6814         PR threads/10729
6815
6816         * linux-x86-low.c (update_debug_registers_callback): New.
6817         (i386_dr_low_set_addr): Use it.
6818         (i386_dr_low_get_addr): New.
6819         (i386_dr_low_set_control): Use update_debug_registers_callback.
6820         (i386_dr_low_get_control): New.
6821         (i386_dr_low_get_status): Adjust.
6822         * linux-low.c (linux_stop_lwp): New.
6823         * linux-low.h (linux_stop_lwp): Declare.
6824
6825         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6826         argument instead of a i386_debug_reg_state.
6827         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6828         a i386_debug_reg_state.
6829         (i386_insert_aligned_watchpoint): Adjust.
6830         (i386_remove_aligned_watchpoint): Adjust.
6831         (i386_low_stopped_data_address): Read the debug registers from the
6832         inferior instead of from the mirrors.
6833         * i386-low.h (struct i386_debug_reg_state): Extend comment.
6834         (i386_dr_low_get_addr): Declare.
6835         (i386_dr_low_get_control): Declare.
6836         (i386_dr_low_get_status): Change prototype.
6837
6838         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6839         (i386_dr_low_get_addr): New.
6840         (i386_dr_low_get_control): New.
6841         (i386_dr_low_get_status): Adjust prototype.  Return
6842         dr_status_mirror.
6843         (i386_initial_stuff): Clear dr_status_mirror and
6844         dr_control_mirror.
6845         (i386_get_thread_context): Adjust.
6846         (i386_set_thread_context): Adjust.
6847         (i386_thread_added): Adjust.
6848
6849 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
6850
6851         * linux-low.h (linux_thread_area): Delete declaration.
6852
6853 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
6854
6855         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6856         after its termination.
6857
6858 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
6859
6860         * linux-low.c (gdb_wants_lwp_stopped): Delete.
6861         (gdb_wants_all_stopped): Delete.
6862         (linux_wait_1): Don't call them.
6863         * server.c (handle_v_cont): Tag all threads as want-stopped.
6864         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
6865         stopped as "client-wants-stopped".
6866
6867 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
6868
6869         * Makefile.in (signals_h): New.
6870         (server_h): Depend on it.
6871         (server.o): Don't depend on $(signals_def).
6872         (signals.o): Depend on $(signals_def).
6873
6874 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
6875
6876         * Makefile.in (signals_def): New.
6877         (server_h): Append include/gdb/signals.h and signals_def.
6878         (server.o): Append signals_def.
6879
6880 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6881
6882         * server.c (handle_target_event): Use target_signal_to_host for
6883         resume_info.sig initialization.
6884         * target.h (struct thread_resume) <sig>: New comment.
6885
6886 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
6887
6888         * server.c (handle_query): strcpy() the returned string from paddress()
6889         instead of sprintf().
6890         * utils.c (paddress): Return phex_nz().
6891
6892 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
6893
6894         * server.c (handle_v_cont): Call mourn_inferior if process
6895         just exited.
6896         (myresume): Likewise.
6897
6898 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
6899
6900         Static tracepoints, and integration with UST.
6901
6902         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
6903         * mem-break.c (uninsert_all_breakpoints)
6904         (reinsert_all_breakpoints): New.
6905         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6906         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6907         (gdb_agent_ust_loaded, helper_thread_id)
6908         (gdb_agent_helper_thread_id): New macros.
6909         (struct ipa_sym_addresses): Add addr_ust_loaded,
6910         addr_helper_thread_id, addr_cmd_buf.
6911         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6912         (in_process_agent_loaded_ust): New.
6913         (write_e_ust_not_loaded): New.
6914         (maybe_write_ipa_ust_not_loaded): New.
6915         (struct collect_static_trace_data_action): New.
6916         (enum tracepoint_type) <static_tracepoint>: New.
6917         (struct tracepoint) <handle>: Mention static tracepoints.
6918         (struct static_tracepoint_ctx): New.
6919         (CMD_BUF_SIZE): New.
6920         (add_tracepoint_action): Handle static tracepoint actions.
6921         (unprobe_marker_at): New.
6922         (clear_installed_tracepoints): Handle static tracepoints.
6923         (cmd_qtdp): Handle static tracepoints.
6924         (probe_marker_at): New.
6925         (cmd_qtstart): Handle static tracepoints.
6926         (response_tracepoint): Handle static tracepoints.
6927         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6928         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6929         (get_context_regcache): Handle static tracepoints.
6930         (do_action_at_tracepoint): Handle static tracepoint actions.
6931         (traceframe_find_block_type): Handle static trace data blocks.
6932         (traceframe_read_sdata): New.
6933         (download_tracepoints): Download static tracepoint actions.
6934         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6935         (GDB_PROBE_NAME): New.
6936         (ust_ops): New.
6937         (GET_UST_SYM): New.
6938         (USTF): New.
6939         (dlsym_ust): New.
6940         (ust_marker_to_static_tracepoint): New.
6941         (gdb_probe): New.
6942         (collect_ust_data_at_tracepoint): New.
6943         (gdb_ust_probe): New.
6944         (UNIX_PATH_MAX, SOCK_DIR): New.
6945         (gdb_ust_connect_sync_socket): New.
6946         (resume_thread, stop_thread): New.
6947         (run_inferior_command): New.
6948         (init_named_socket): New.
6949         (gdb_ust_socket_init): New.
6950         (cstr_to_hexstr): New.
6951         (next_st): New.
6952         (first_marker, next_marker): New.
6953         (response_ust_marker): New.
6954         (cmd_qtfstm, cmd_qtsstm): New.
6955         (unprobe_marker_at, probe_marker_at): New.
6956         (cmd_qtstmat, gdb_ust_thread): New.
6957         (gdb_ust_init): New.
6958         (initialize_tracepoint_ftlib): Call gdb_ust_init.
6959         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6960         (ST_REGENTRY): New.
6961         (x86_64_st_collect_regmap): New.
6962         (X86_64_NUM_ST_COLLECT_GREGS): New.
6963         (AMD64_RIP_REGNUM): New.
6964         (supply_static_tracepoint_registers): New.
6965         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6966         (ST_REGENTRY): New.
6967         (i386_st_collect_regmap): New.
6968         (i386_NUM_ST_COLLECT_GREGS): New.
6969         (supply_static_tracepoint_registers): New.
6970         * server.c (handle_query): Handle qXfer:statictrace:read.
6971         <qSupported>: Report support for StaticTracepoints, and
6972         qXfer:statictrace:read features.
6973         * server.h (traceframe_read_sdata)
6974         (supply_static_tracepoint_registers): Declare.
6975         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6976         (unpack_varlen_hex): Include in IPA build.
6977         * Makefile.in (ustlibs, ustinc): New.
6978         (IPA_OBJS): Add remote-utils-ipa.o.
6979         ($(IPA_LIB)): Link -ldl and -lpthread.
6980         (UST_CFLAGS): New.
6981         (IPAGENT_CFLAGS): Add UST_CFLAGS.
6982         * config.in, configure: Regenerate.
6983
6984 2010-06-20  Ian Lance Taylor  <iant@google.com>
6985             Pedro Alves  <pedro@codesourcery.com>
6986
6987         * linux-x86-low.c (always_true): Delete.
6988         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6989         trying to fool the compiler with always_true.
6990
6991 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
6992
6993         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6994         conditions in gdbserver.
6995
6996 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
6997
6998         * spu-low.c (spu_read_memory): Wrap around local store limit.
6999         (spu_write_memory): Likewise.
7000
7001 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
7002
7003         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7004         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7005         LONGEST uses.
7006         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7007         uses.
7008         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7009         uses with LONGEST uses.
7010
7011 2010-06-14  Stan Shebs  <stan@codesourcery.com>
7012             Pedro Alves  <pedro@codesourcery.com>
7013
7014         Bytecode compiler.
7015
7016         * linux-x86-low.c: Include limits.h.
7017         (add_insns): New.
7018         (always_true): New.
7019         (EMIT_ASM): New.
7020         (EMIT_ASM32): New.
7021         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7022         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7023         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7024         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7025         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7026         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7027         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7028         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7029         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7030         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7031         (amd64_emit_void_call_2): New.
7032         (amd64_emit_ops): New.
7033         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7034         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7035         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7036         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7037         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7038         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7039         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7040         (i386_emit_call, i386_emit_reg, i386_emit_pop)
7041         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7042         (i386_emit_stack_adjust, i386_emit_int_call_1)
7043         (i386_emit_void_call_2): New.
7044         (i386_emit_ops): New.
7045         (x86_emit_ops): New.
7046         (the_low_target): Install x86_emit_ops.
7047         * server.h (struct emit_ops): New.
7048         (get_raw_reg_func_addr): Declare.
7049         (current_insn_ptr, emit_error): Declare.
7050         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7051         (set_trace_state_variable_value): New defines.
7052         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7053         addr_get_trace_state_variable_value and
7054         addr_set_trace_state_variable_value.
7055         (symbol_list): New fields for get_raw_reg,
7056         get_trace_state_variable_value and set_trace_state_variable_value.
7057         (condfn): New typedef.
7058         (struct tracepoint): New field `compiled_cond'.
7059         (do_action_at_tracepoint): Clear compiled_cond.
7060         (get_trace_state_variable_value, set_trace_state_variable_value):
7061         Export in the IPA.
7062         (condition_true_at_tracepoint): If there's a compiled condition,
7063         run that.
7064         (current_insn_ptr, emit_error): New globals.
7065         (struct bytecode_address): New.
7066         (get_raw_reg_func_addr): New.
7067         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7068         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7069         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7070         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7071         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7072         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7073         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7074         (compile_tracepoint_condition, compile_bytecodes): New.
7075         * target.h (emit_ops): Forward declare.
7076         (struct target_ops): New field emit_ops.
7077         (target_emit_ops): New.
7078         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7079         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7080         * linux-low.c (linux_emit_ops): New.
7081         (linux_target_ops): Install it.
7082         * linux-low.h (struct linux_target_ops): New field emit_ops.
7083
7084 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
7085
7086         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7087         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7088
7089 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
7090             Stan Shebs  <stan@codesourcery.com>
7091
7092         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7093         (all): Depend on $(extra_libraries).
7094         (install-only): Install the IPA.
7095         (IPA_OBJS, IPA_LIB): New.
7096         (clean): Remove the IPA lib.
7097         (IPAGENT_CFLAGS): New.
7098         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7099         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7100         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7101         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7102         * configure.ac: Check for atomic builtins support in the compiler.
7103         (IPA_DEPFILES, extra_libraries): Define.
7104         * configure.srv (ipa_obj): Add description.
7105         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7106         (i[34567]86-*-linux*): Set ipa_obj.
7107         (x86_64-*-linux*): Set ipa_obj.
7108         * linux-low.c (stabilizing_threads): New.
7109         (supports_fast_tracepoints): New.
7110         (linux_detach): Stabilize threads before detaching.
7111         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
7112         the lwp is either not stabilizing, or is moving out of a jump pad.
7113         (linux_fast_tracepoint_collecting): New.
7114         (maybe_move_out_of_jump_pad): New.
7115         (enqueue_one_deferred_signal): New.
7116         (dequeue_one_deferred_signal): New.
7117         (linux_wait_for_event_1): If moving out of a jump pad, defer
7118         pending signals to later.
7119         (linux_stabilize_threads): New.
7120         (linux_wait_1): Check if threads need moving out of jump pads, and
7121         do it if so.
7122         (stuck_in_jump_pad_callback): New.
7123         (move_out_of_jump_pad_callback): New.
7124         (lwp_running): New.
7125         (linux_resume_one_lwp): Handle moving out of jump pads.
7126         (linux_set_resume_request): Dequeue deferred signals.
7127         (need_step_over_p): Also step over fast tracepoint jumps.
7128         (start_step_over): Also uninsert fast tracepoint jumps.
7129         (finish_step_over): Also reinsert fast tracepoint jumps.
7130         (linux_install_fast_tracepoint_jump): New.
7131         (linux_target_ops): Install linux_stabilize_threads and
7132         linux_install_fast_tracepoint_jump_pad.
7133         * linux-low.h (linux_target_ops) <get_thread_area,
7134         install_fast_tracepoint_jump_pad>: New fields.
7135         (struct lwp_info) <collecting_fast_tracepoint,
7136         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7137         (linux_get_thread_area): Declare.
7138         * linux-x86-low.c (jump_insn): New.
7139         (x86_get_thread_area): New.
7140         (append_insns): New.
7141         (push_opcode): New.
7142         (amd64_install_fast_tracepoint_jump_pad): New.
7143         (i386_install_fast_tracepoint_jump_pad): New.
7144         (x86_install_fast_tracepoint_jump_pad): New.
7145         (the_low_target): Install x86_get_thread_area and
7146         x86_install_fast_tracepoint_jump_pad.
7147         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7148         (struct fast_tracepoint_jump): New.
7149         (fast_tracepoint_jump_insn): New.
7150         (fast_tracepoint_jump_shadow): New.
7151         (find_fast_tracepoint_jump_at): New.
7152         (fast_tracepoint_jump_here): New.
7153         (delete_fast_tracepoint_jump): New.
7154         (set_fast_tracepoint_jump): New.
7155         (uninsert_fast_tracepoint_jumps_at): New.
7156         (reinsert_fast_tracepoint_jumps_at): New.
7157         (set_breakpoint_at): Use write_inferior_memory.
7158         (uninsert_raw_breakpoint): Use write_inferior_memory.
7159         (check_mem_read): Mask out fast tracepoint jumps.
7160         (check_mem_write): Mask out fast tracepoint jumps.
7161         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7162         (set_fast_tracepoint_jump): Declare.
7163         (delete_fast_tracepoint_jump)
7164         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7165         (reinsert_fast_tracepoint_jumps_at): Declare.
7166         * regcache.c: Don't compile many functions when building the
7167         in-process agent library.
7168         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7169         the register buffer in the heap.
7170         (free_register_cache): If the register buffer isn't owned by the
7171         regcache, don't free it.
7172         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7173         pre-existing register caches.
7174         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7175         type.
7176         (convert_ascii_to_int): : Constify `from' parameter type.
7177         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7178         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
7179         the needed buffer in-place.
7180         (relocate_instruction): New.
7181         * server.c (handle_query) <qSymbols>: If the target supports
7182         tracepoints, give it a chance of looking up symbols.  Report
7183         support for fast tracepoints.
7184         (handle_status): Stabilize threads.
7185         (process_serial_event): Adjust.
7186         * server.h (struct fast_tracepoint_jump): Forward declare.
7187         (struct process_info) <fast_tracepoint_jumps>: New field.
7188         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7189         (decode_X_packet, decode_M_packet): Adjust.
7190         (relocate_instruction): Declare.
7191         (in_process_agent_loaded): Declare.
7192         (tracepoint_look_up_symbols): Declare.
7193         (struct fast_tpoint_collect_status): Declare.
7194         (fast_tracepoint_collecting): Declare.
7195         (force_unlock_trace_buffer): Declare.
7196         (handle_tracepoint_bkpts): Declare.
7197         (initialize_low_tracepoint)
7198         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7199         * target.h (struct target_ops) <stabilize_threads,
7200         install_fast_tracepoint_jump_pad>: New fields.
7201         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7202         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7203         [HAVE_STDINT_H]: Include stdint.h.
7204         (trace_debug_1): Rename to ...
7205         (trace_vdebug): ... this.
7206         (trace_debug): Rename to ...
7207         (trace_debug_1): ... this.  Add `level' parameter.
7208         (trace_debug): New.
7209         (ATTR_USED, ATTR_NOINLINE): New.
7210         (IP_AGENT_EXPORT): New.
7211         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7212         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7213         (about_to_request_buffer_space, trace_buffer_is_full)
7214         (stopping_tracepoint, expr_eval_result, error_tracepoint)
7215         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7216         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7217         (traceframe_write_count, traceframes_created)
7218         (trace_state_variables)
7219         New renaming defines.
7220         (struct ipa_sym_addresses): New.
7221         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7222         (symbol_list): New.
7223         (ipa_sym_addrs): New.
7224         (all_tracepoint_symbols_looked_up): New.
7225         (in_process_agent_loaded): New.
7226         (write_e_ipa_not_loaded): New.
7227         (maybe_write_ipa_not_loaded): New.
7228         (tracepoint_look_up_symbols): New.
7229         (debug_threads) [IN_PROCESS_AGENT]: New.
7230         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7231         (UNKNOWN_SIDE_EFFECTS): New.
7232         (stop_tracing): New.
7233         (flush_trace_buffer): New.
7234         (stop_tracing_bkpt): New.
7235         (flush_trace_buffer_bkpt): New.
7236         (read_inferior_integer): New.
7237         (read_inferior_uinteger): New.
7238         (read_inferior_data_pointer): New.
7239         (write_inferior_data_pointer): New.
7240         (write_inferior_integer): New.
7241         (write_inferior_uinteger): New.
7242         (struct collect_static_trace_data_action): Delete.
7243         (enum tracepoint_type): New.
7244         (struct tracepoint) <type>: New field `type'.
7245         <actions_str, step_actions, step_actions_str>: Only include in
7246         GDBserver.
7247         <orig_size, obj_addr_on_target, adjusted_insn_addr>
7248         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7249         (tracepoints): Use IP_AGENT_EXPORT.
7250         (last_tracepoint): Don't include in the IPA.
7251         (stopping_tracepoint): Use IP_AGENT_EXPORT.
7252         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7253         (alloced_trace_state_variables): New.
7254         (trace_state_variables): Use IP_AGENT_EXPORT.
7255         (traceframe_t): Delete unused variable.
7256         (circular_trace_buffer): Don't include in the IPA.
7257         (trace_buffer_start): Delete.
7258         (struct trace_buffer_control): New.
7259         (trace_buffer_free): Delete.
7260         (struct ipa_trace_buffer_control): New.
7261         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7262         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7263         New.
7264         (trace_buffer_ctrl): New.
7265         (TRACE_BUFFER_CTRL_CURR): New.
7266         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7267         Reimplement as macros.
7268         (trace_buffer_wrap): Delete.
7269         (traceframe_write_count, traceframe_read_count)
7270         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7271         (struct tracepoint_hit_ctx) <type>: New field.
7272         (struct fast_tracepoint_ctx): New.
7273         (memory_barrier): New.
7274         (cmpxchg): New.
7275         (record_tracepoint_error): Update atomically in the IPA.
7276         (clear_inferior_trace_buffer): New.
7277         (about_to_request_buffer_space): New.
7278         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7279         updating the same buffer.
7280         (add_tracepoint): Default the tracepoint's type to trap
7281         tracepoint, and orig_size to -1.
7282         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7283         internal variables.
7284         (create_trace_state_variable): New parameter `gdb'.  Handle it.
7285         (clear_installed_tracepoints): Clear fast tracepoint jumps.
7286         (cmd_qtdp): Handle fast tracepoints.
7287         (cmd_qtdv): Adjust.
7288         (max_jump_pad_size): New.
7289         (gdb_jump_pad_head): New.
7290         (get_jump_space_head): New.
7291         (claim_jump_space): New.
7292         (sort_tracepoints): New.
7293         (MAX_JUMP_SIZE): New.
7294         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
7295         IPA.
7296         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7297         support.  Upload fast traceframes, and delete internal IPA
7298         breakpoints.
7299         (stop_tracing_handler): New.
7300         (flush_trace_buffer_handler): New.
7301         (cmd_qtstop): Upload fast tracepoints.
7302         (response_tracepoint): Handle fast tracepoints.
7303         (tracepoint_finished_step): Upload fast traceframes.  Set the
7304         tracepoint hit context's tracepoint type.
7305         (handle_tracepoint_bkpts): New.
7306         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7307         type.  Add comment about fast tracepoints.
7308         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7309         non-existing action_str field.
7310         (get_context_regcache): Handle fast tracepoints.
7311         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7312         to the regcache.
7313         (fast_tracepoint_from_jump_pad_address): New.
7314         (fast_tracepoint_from_ipa_tpoint_address): New.
7315         (collecting_t): New.
7316         (force_unlock_trace_buffer): New.
7317         (fast_tracepoint_collecting): New.
7318         (collecting): New.
7319         (gdb_collect): New.
7320         (write_inferior_data_ptr): New.
7321         (target_tp_heap): New.
7322         (target_malloc): New.
7323         (download_agent_expr): New.
7324         (UALIGN): New.
7325         (download_tracepoints): New.
7326         (download_trace_state_variables): New.
7327         (upload_fast_traceframes): New.
7328         (IPA_FIRST_TRACEFRAME): New.
7329         (IPA_NEXT_TRACEFRAME_1): New.
7330         (IPA_NEXT_TRACEFRAME): New.
7331         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7332         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7333         (gdb_jump_pad_buffer_end): New.
7334         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7335         (initialize_tracepoint): Adjust.
7336         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7337         buffer.  Initialize the low module.
7338         * utils.c (PREFIX, TOOLNAME): New.
7339         (malloc_failure): Use PREFIX.
7340         (error): In the IPA, an error causes an exit.
7341         (fatal, warning): Use PREFIX.
7342         (internal_error): Use TOOLNAME.
7343         (NUMCELLS): Increase to 10.
7344         * configure, config.in: Regenerate.
7345
7346 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
7347
7348         * server.c (handle_query) <qSupported>: Do two passes over the
7349         qSupported string to avoid nesting strtok.
7350
7351 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7352
7353         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7354         (CDEPS): New.
7355         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
7356         -Wl,--dynamic-list.
7357         * configure: Regenerate.
7358         * proc-service.list: New.
7359
7360 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7361
7362         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7363         New comment.
7364
7365 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
7366
7367         * gdbreplay.c (remote_open): Check error return from socket() call by
7368         its equality to -1 not by it being negative.
7369         * remote-utils.c (remote_open): Likewise.
7370
7371 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
7372
7373         * config.h: Regenerate.
7374
7375 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
7376
7377         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7378         doesn't provide PTRACE_GET_THREAD_AREA.
7379
7380 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
7381
7382         * linux-m68k-low.c: Include <asm/ptrace.h>
7383         (ps_get_thread_area): Implement.
7384
7385 2010-05-03  Doug Evans  <dje@google.com>
7386
7387         * event-loop.c (struct callback_event): New struct.
7388         (callback_list): New global.
7389         (append_callback_event, delete_callback_event): New functions.
7390         (process_callback): New function.
7391         (start_event_loop): Call it.
7392         * remote-utils.c (NOT_SCHEDULED): Define.
7393         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7394         moved out of readchar.
7395         (readchar): Rewrite.  Call reschedule before returning.
7396         (reset_readchar): New function.
7397         (remote_close): Call it.
7398         (process_remaining, reschedule): New functions.
7399         * server.h (callback_handler_func): New typedef.
7400         (append_callback_event, delete_callback_event): Declare.
7401
7402 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
7403
7404         * proc-service.c (ps_pglobal_lookup): Use
7405         thread_db_look_up_one_symbol.
7406         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7407         parameter.  Use it instead of all_symbols_looked_up.
7408         * server.h (struct process_info) <all_symbols_looked_up>: Delete
7409         field.
7410         (all_symbols_looked_up): Don't declare.
7411         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7412         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7413         field.
7414         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7415         Set all_symbols_looked_up here.
7416         (thread_db_look_up_one_symbol): New.
7417         (thread_db_get_tls_address): Adjust.
7418         (thread_db_load_search, try_thread_db_load_1): Always allocate the
7419         thread_db object on the heap, and tentatively set it in the
7420         process structure.
7421         (thread_db_init): Don't set all_symbols_looked_up here.
7422         * linux-low.h (thread_db_look_up_one_symbol): Declare.
7423
7424 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
7425
7426         * linux-low.c (linux_kill, linux_detach): Adjust.
7427         (status_pending_p_callback): Remove redundant statement.  Check
7428         for !TARGET_WAITIKIND_IGNORE, instead of
7429         TARGET_WAITKIND_STOPPED.
7430         (handle_tracepoints): Make sure LWP is locked.  Adjust.
7431         (linux_wait_for_event_1): Adjust.
7432         (linux_cancel_breakpoints): New.
7433         (unsuspend_one_lwp): New.
7434         (unsuspend_all_lwps): New.
7435         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7436         (send_sigstop_callback): Change return type to int, add new
7437         `except' parameter and handle it.
7438         (suspend_and_send_sigstop_callback): New.
7439         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7440         pass them down.  If SUSPEND, also increment the lwp's suspend
7441         count.
7442         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7443         (need_step_over_p): Don't consider suspended LWPs.
7444         (start_step_over): Adjust.
7445         (proceed_one_lwp): Change return type to int, add new `except'
7446         parameter and handle it.
7447         (unsuspend_and_proceed_one_lwp): New.
7448         (proceed_all_lwps): Use find_inferior instead of
7449         for_each_inferior.
7450         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
7451         also decrement the suspend count of LWPs.  Pass `except' down,
7452         instead of hacking its suspend count.
7453         (linux_pause_all): Add `freeze' parameter.  Adjust.
7454         (linux_unpause_all): New.
7455         (linux_target_ops): Install linux_unpause_all.
7456         * server.c (handle_status): Adjust.
7457         * target.h (struct target_ops): New fields `unpause_all' and
7458         `cancel_breakpoints'.  Add new parameter to `pause_all'.
7459         (pause_all): Add new `freeze' parameter.
7460         (unpause_all): New.
7461         (cancel_breakpoints): New.
7462         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7463         cancel breakpoints.
7464         (cmd_qtstart): Pause threads.
7465         (stop_tracing): Pause threads, and cancel breakpoints.
7466         * win32-low.c (win32_target_ops): Adjust.
7467
7468 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
7469
7470         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7471         the inferior right away from here...
7472         (linux_wait_1): ... to here, and adjust to check the thread's
7473         last_resume_kind instead of the lwp's step or stop_expected flags.
7474
7475 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
7476
7477         * README: Use consistent `GDB' and `GDBserver' spellings.
7478
7479 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
7480
7481         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7482         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
7483         (linux_detach_one_lwp): Assume the lwp is stopped.
7484         (any_thread_of): Delete.
7485         (linux_detach): Stop all lwps here.  Don't blindly delete all
7486         breakpoints.
7487         (delete_lwp_callback): New.
7488         (linux_mourn): Delete all lwps of the process that is gone.
7489         (linux_wait_1): Don't delete the last lwp of the process here.
7490         * mem-break.h (mark_breakpoints_out): Declare.
7491         * mem-break.c (mark_breakpoints_out): New.
7492         (free_all_breakpoints): Use it.
7493         * server.c (handle_target_event): If the process is gone, mark
7494         breakpoints out.
7495         * thread-db.c (struct thread_db) <create_bp>: New field.
7496         (thread_db_enable_reporting): Fix prototype.  Store a thread event
7497         breakpoint reference in the thread_db struct.
7498         (thread_db_load_search): Clear the thread_db object.
7499         (try_thread_db_load_1): Ditto.
7500         (switch_to_process): New.
7501         (disable_thread_event_reporting): Use it.
7502         (remove_thread_event_breakpoints): New.
7503         (thread_db_detach, thread_db_mourn): Use it.
7504
7505 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
7506
7507         * linux-low.c (linux_enable_event_reporting): New.
7508         (linux_wait_for_event_1, handle_extended_wait): Use it.
7509
7510 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
7511
7512         * linux-low.c (linux_kill_one_lwp, linux_kill)
7513         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7514         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
7515         SIGSTOP even if the LWP is stopped.
7516         (send_sigstop_callback): New.
7517         (stop_all_lwps): Use send_sigstop_callback instead.
7518         (linux_resume_one_thread): Adjust.
7519         (proceed_one_lwp): Still proceed an LWP that the client has
7520         requested to stop, if we haven't reported it as stopped yet.  Make
7521         sure that LWPs the client want stopped, have a pending SIGSTOP.
7522
7523 2010-04-26  Doug Evans  <dje@google.com>
7524
7525         * server.c (handle_general_set): Make static.
7526
7527         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7528         Print received char after testing for error/eof instead of before.
7529         (input_interrupt): Tweak comment.
7530
7531 2010-04-23  Doug Evans  <dje@google.com>
7532
7533         * server.c (start_inferior): Print inferior argv if --debug.
7534
7535 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
7536
7537         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7538         * nto-x86-low.c: Include server.h
7539
7540 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
7541
7542         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7543         be consistent with other sources of this directory.
7544         (init_registers_amd64): Correct name of source file of this function
7545         in the comment.
7546
7547 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7548
7549         * configure.srv (x86_64-*-mingw*): New configuration for Windows
7550         64-bit executables.
7551
7552 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7553
7554         * win32-i386-low.c: Add 64-bit support.
7555         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7556         (init_registers_amd64): Declare.
7557         (mappings): Add 64-bit version of array.
7558         (init_windows_x86): New function.
7559         (the_low_target): Change init_arch field to init_windows_x86.
7560
7561 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7562
7563         * win32-low.c: Adapt to support also 64-bit architecture.
7564         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7565         (get_image_name): Use SIZE_T type for local variable `done'.
7566         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7567         (toolhelp_get_dll_name): Idem.
7568         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7569         Use uintptr_t typecast to avoid warning.
7570         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7571         (handle_exception): Use phex_nz to avoid warning.
7572         (win32_wait): Remove unused local variable `process'.
7573
7574 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7575
7576         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7577         `amd64-avx.o'.
7578
7579 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
7580
7581         * configure.ac: Use `ws2_32' library for srv_mingw.
7582         * configure: Regenerate.
7583         * gdbreplay.c: Include winsock2.h instead of winsock.h.
7584         * remote-utils.c: Likewise.
7585
7586 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
7587
7588         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7589         if __x86_64__ is defined.
7590
7591 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
7592
7593         * configure: Regenerate.
7594
7595 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
7596
7597         * server.c (handle_query): Handle 'qGetTIBAddr' query.
7598         * target.h (target_ops): New get_tib_address field.
7599         * win32-low.h (win32_thread_info): Add thread_local_base field.
7600         * win32-low.c (child_add_thread): Add tlb argument.
7601         Set thread_local_base field to TLB.
7602         (get_child_debug_event): Adapt to child_add_thread change.
7603         (win32_get_tib_address): New function.
7604         (win32_target_ops): Set get_tib_address field to
7605         win32_get_tib_address.
7606         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7607
7608 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
7609
7610         * linux-low.c (linux_mourn): Also remove the process.
7611         * server.c (handle_target_event): Don't remove the process here.
7612         * nto-low.c (nto_mourn): New.
7613         (nto_target_ops): Install it.
7614         * spu-low.c (spu_mourn): New.
7615         (spu_target_ops): Install it.
7616         * win32-low.c (win32_mourn): New.
7617         (win32_target_ops): Install it.
7618
7619 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
7620
7621         * server.h (buffer_xml_printf): Remove redundant `;'.
7622
7623 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
7624
7625         * regcache.c (set_register_cache): Invalidate regcaches before
7626         changing the register cache layout.
7627         (regcache_invalidate_one): Allow a NULL regcache.
7628         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7629         regcaches before changing the register cache layout or the target
7630         regsets.
7631
7632 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7633
7634         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7635         variable warning on Linux/x86-64.
7636
7637 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
7638
7639         GDBserver disconnected tracing support.
7640
7641         * linux-low.c (linux_remove_process): Delete.
7642         (add_lwp): Don't set last_resume_kind here.
7643         (linux_kill): Use `mourn'.
7644         (linux_detach): Use `thread_db_detach', and `mourn'.
7645         (linux_mourn): New.
7646         (linux_attach_lwp_1): Adjust comment.
7647         (linux_attach): last_resume_kind moved the thread_info; adjust.
7648         (status_pending_p_callback): Adjust.
7649         (linux_wait_for_event_1): Adjust.
7650         (count_events_callback, select_singlestep_lwp_callback)
7651         (select_event_lwp_callback, cancel_breakpoints_callback)
7652         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7653         (proceed_one_lwp): Adjust.
7654         (linux_async): Add debug output.
7655         (linux_thread_stopped): New.
7656         (linux_pause_all): New.
7657         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7658         linux_pause_all.
7659         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7660         (thread_db_free): Delete declaration.
7661         (thread_db_detach, thread_db_mourn): Declare.
7662         * thread-db.c (thread_db_init): Use thread_db_mourn.
7663         (thread_db_free): Delete, split in two.
7664         (disable_thread_event_reporting): New.
7665         (thread_db_detach): New.
7666         (thread_db_mourn): New.
7667
7668         * server.h (struct thread_info) <last_resume_kind>: New field.
7669         <attached>: Add comment.
7670         <gdb_detached>: New field.
7671         (handler_func): Change return type to int.
7672         (handle_serial_event, handle_target_event): Ditto.
7673         (gdb_connected): Declare.
7674         (tracing): Delete.
7675         (disconnected_tracing): Declare.
7676         (stop_tracing): Declare.
7677
7678         * server.c (handle_query) <qSupported>: Report support for
7679         disconnected tracing.
7680         (queue_stop_reply_callback): Account for running threads.
7681         (gdb_wants_thread_stopped): New.
7682         (gdb_wants_all_threads_stopped): New.
7683         (gdb_reattached_process): New.
7684         (handle_status): Clear the `gdb_detached' flag of all processes.
7685         In all-stop, stop all threads.
7686         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
7687         (process_serial_event): If the remote connection breaks, or if an
7688         exit was forced with "monitor exit", force an event loop exit.
7689         Handle disconnected tracing on detach.
7690         (handle_serial_event): Adjust.
7691         (handle_target_event): If GDB isn't connected, forward events back
7692         to the inferior, unless the last process exited, in which case,
7693         exit gdbserver.  Adjust interface.
7694
7695         * remote-utils.c (remote_open): Don't block in accept.  Instead
7696         register an event loop source on the listen socket file
7697         descriptor.  Refactor bits into ...
7698         (listen_desc): ... this new global.
7699         (gdb_connected): ... this new function.
7700         (enable_async_notification): ... this new function.
7701         (handle_accept_event): ... this new function.
7702         (remote_close): Clear remote_desc.
7703
7704         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7705
7706         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7707         New fields.
7708         (mourn_inferior): Define.
7709         (target_process_qsupported): Avoid the dangling else problem.
7710         (thread_stopped): Define.
7711         (pause_all): Define.
7712         (target_waitstatus_to_string): Declare.
7713         * target.c (target_waitstatus_to_string): New.
7714
7715         * tracepoint.c (tracing): Make extern.
7716         (disconnected_tracing): New.
7717         (stop_tracing): Make extern.  Handle tracing stops due to GDB
7718         disconnecting.
7719         (cmd_qtdisconnected): New.
7720         (cmd_qtstatus): Report disconnected tracing status in trace reply.
7721         (handle_tracepoint_general_set): Handle QTDisconnected.
7722
7723         * event-loop.c (event_handler_func): Change return type to int.
7724         (process_event): Bail out if the event handler wants the event
7725         loop to stop.
7726         (handle_file_event): Ditto.
7727         (start_event_loop): Bail out if the event handler wants the event
7728         loop to stop.
7729
7730         * nto-low.c (nto_target_ops): Adjust.
7731         * spu-low.c (spu_wait): Don't remove the process here.
7732         (spu_target_ops): Adjust.
7733         * win32-low.c (win32_wait): Don't remove the process here.
7734         (win32_target_ops): Adjust.
7735
7736 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
7737
7738         * regcache.c (realloc_register_cache): Invalidate inferior's
7739         regcache before recreating it.
7740
7741 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
7742
7743         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7744
7745 2010-04-09  Stan Shebs  <stan@codesourcery.com>
7746             Pedro Alves  <pedro@codesourcery.com>
7747
7748         * server.h (LONGEST): New.
7749         (struct thread_info) <while_stepping>: New field.
7750         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7751         Declare.
7752         (initialize_tracepoint, handle_tracepoint_general_set)
7753         (handle_tracepoint_query, tracepoint_finished_step)
7754         (tracepoint_was_hit, release_while_stepping_state_list):
7755         (current_traceframe): Declare.
7756         * server.c (handle_general_set): Handle tracepoint packets.
7757         (read_memory): New.
7758         (write_memory): New.
7759         (handle_search_memory_1): Use read_memory.
7760         (handle_query): Report support for conditional tracepoints, trace
7761         state variables, and tracepoint sources.  Handle tracepoint
7762         queries.
7763         (main): Initialize the tracepoints module.
7764         (process_serial_event): Handle traceframe reads/writes.
7765
7766         * linux-low.c (handle_tracepoints): New.
7767         (linux_wait_1): Call it.
7768         (linux_resume_one_lwp): Handle while-stepping.
7769         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7770         (linux_target_ops): Install them.
7771         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7772         New field.
7773         * linux-x86-low.c (x86_supports_tracepoints): New.
7774         (the_low_target). Install it.
7775
7776         * mem-break.h (delete_breakpoint): Declare.
7777         * mem-break.c (delete_breakpoint): Make external.
7778
7779         * target.h (struct target_ops): Add `supports_tracepoints',
7780         `read_pc', and `write_pc' fields.
7781         (target_supports_tracepoints): Define.
7782         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7783         (phex_nz): New.
7784
7785         * regcache.h (struct regcache) <registers_owned>: New field.
7786         (init_register_cache, regcache_cpy): Declare.
7787         (regcache_read_pc, regcache_write_pc): Declare.
7788         (register_cache_size): Declare.
7789         (supply_regblock): Declare.
7790         * regcache.c (init_register_cache): New.
7791         (new_register_cache): Use it.
7792         (regcache_cpy): New.
7793         (register_cache_size): New.
7794         (supply_regblock): New.
7795         (regcache_read_pc, regcache_write_pc): New.
7796
7797         * tracepoint.c: New.
7798
7799         * Makefile.in (OBS): Add tracepoint.o.
7800         (tracepoint.o): New rule.
7801
7802 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
7803
7804         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7805         (i386-mmx.o): New.
7806         (i386-mmx.c): Likewise.
7807         (i386-mmx-linux.o): Likewise.
7808         (i386-mmx-linux.c): Likewise.
7809
7810         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7811         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7812         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7813         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7814
7815         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7816         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7817         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7818
7819 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
7820
7821         * Makefile.in (clean): Updated.
7822         (i386-avx.o): New.
7823         (i386-avx.c): Likewise.
7824         (i386-avx-linux.o): Likewise.
7825         (i386-avx-linux.c): Likewise.
7826         (amd64-avx.o): Likewise.
7827         (amd64-avx.c): Likewise.
7828         (amd64-avx-linux.o): Likewise.
7829         (amd64-avx-linux.c): Likewise.
7830
7831         * configure.srv (srv_i386_regobj): Add i386-avx.o.
7832         (srv_i386_linux_regobj): Add i386-avx-linux.o.
7833         (srv_amd64_regobj): Add amd64-avx.o.
7834         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7835         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7836         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7837         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7838         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7839         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7840         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7841
7842         * i387-fp.c: Include "i386-xstate.h".
7843         (i387_xsave): New.
7844         (i387_cache_to_xsave): Likewise.
7845         (i387_xsave_to_cache): Likewise.
7846         (x86_xcr0): Likewise.
7847
7848         * i387-fp.h (i387_cache_to_xsave): Likewise.
7849         (i387_xsave_to_cache): Likewise.
7850         (x86_xcr0): Likewise.
7851
7852         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7853         * linux-crisv32-low.c (target_regsets): Likewise.
7854         * linux-m68k-low.c (target_regsets): Likewise.
7855         * linux-mips-low.c (target_regsets): Likewise.
7856         * linux-ppc-low.c (target_regsets): Likewise.
7857         * linux-s390-low.c (target_regsets): Likewise.
7858         * linux-sh-low.c (target_regsets): Likewise.
7859         * linux-sparc-low.c (target_regsets): Likewise.
7860         * linux-xtensa-low.c (target_regsets): Likewise.
7861
7862         * linux-low.c: Include <sys/uio.h>.
7863         (regsets_fetch_inferior_registers): Support nt_type.
7864         (regsets_store_inferior_registers): Likewise.
7865         (linux_process_qsupported): New.
7866         (linux_target_ops): Add linux_process_qsupported.
7867
7868         * linux-low.h (regset_info): Add nt_type.
7869         (linux_target_ops): Add process_qsupported.
7870
7871         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7872         and <sys/uio.h>.
7873         (init_registers_i386_avx_linux): New.
7874         (init_registers_amd64_avx_linux): Likewise.
7875         (xmltarget_i386_linux_no_xml): Likewise.
7876         (xmltarget_amd64_linux_no_xml): Likewise.
7877         (PTRACE_GETREGSET): Likewise.
7878         (PTRACE_SETREGSET): Likewise.
7879         (x86_fill_xstateregset): Likewise.
7880         (x86_store_xstateregset): Likewise.
7881         (use_xml): Likewise.
7882         (x86_linux_update_xmltarget): Likewise.
7883         (x86_linux_process_qsupported): Likewise.
7884         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7885         (x86_arch_setup): Don't call init_registers_amd64_linux nor
7886         init_registers_i386_linux here.  Call
7887         x86_linux_update_xmltarget.
7888         (the_low_target): Add x86_linux_process_qsupported.
7889
7890         * server.c (handle_query): Call target_process_qsupported.
7891
7892         * target.h (target_ops): Add process_qsupported.
7893         (target_process_qsupported): New.
7894
7895 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
7896
7897         * inferiors.c (add_thread): Set last_status kind to
7898         TARGET_WAITKIND_IGNORE.
7899         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7900         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
7901         (linux_wait_1): Move `thread' local definition to block that uses
7902         it.  Don't NULL initialize `event_child'.
7903         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7904         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7905         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7906
7907 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
7908
7909         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7910         an extended waitstatus, or by a watchpoint.
7911         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7912         thread was stepping or has been stopped by a watchpoint.
7913
7914 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
7915
7916         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7917         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7918         of another, then delete the previous, and validate all
7919         breakpoints.
7920         (validate_inserted_breakpoint): New.
7921         (delete_disabled_breakpoints): New.
7922         (validate_breakpoints): New.
7923         (check_mem_read): Validate breakpoints before trusting their
7924         shadow.  Delete disabled breakpoints.
7925         (check_mem_write): Validate breakpoints before trusting they
7926         should be inserted.  Delete disabled breakpoints.
7927         * mem-break.h (validate_breakpoints):
7928         * server.c (handle_query): Validate breakpoints when we see a
7929         qSymbol query.
7930
7931 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
7932
7933         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7934         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
7935         if we could tell there's a GDB breakpoint at stop_pc.
7936         (need_step_over_p): Don't do a step over if we find a GDB
7937         breakpoint at the resume PC.
7938
7939         * mem-break.c (struct raw_breakpoint): New.
7940         (enum bkpt_type): New type `gdb_breakpoint'.
7941         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7942         fields.  New field `raw'.
7943         (find_raw_breakpoint_at): New.
7944         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
7945         breakpoint instead.
7946         (set_breakpoint_at): Adjust.
7947         (delete_raw_breakpoint): New.
7948         (release_breakpoint): New.
7949         (delete_breakpoint): Rename to...
7950         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
7951         release_breakpoint.  Return ENOENT.
7952         (delete_breakpoint): Reimplement.
7953         (find_breakpoint_at): Delete.
7954         (find_gdb_breakpoint_at): New.
7955         (delete_breakpoint_at): Delete.
7956         (set_gdb_breakpoint_at): New.
7957         (delete_gdb_breakpoint_at): New.
7958         (gdb_breakpoint_here): New.
7959         (set_reinsert_breakpoint): Use release_breakpoint.
7960         (uninsert_breakpoint): Rename to ...
7961         (uninsert_raw_breakpoint): ... this.
7962         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7963         (reinsert_raw_breakpoint): Change parameter type to
7964         raw_breakpoint.
7965         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7966         instead.
7967         (check_breakpoints): Adjust.  Use release_breakpoint.
7968         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7969         (breakpoint_inserted_here): Ditto.
7970         (check_mem_read): Adjust to iterate over raw breakpoints instead.
7971         Don't trust the breakpoint's shadow if it is not inserted.
7972         (check_mem_write): Adjust to iterate over raw breakpoints instead.
7973         (delete_all_breakpoints): Adjust.
7974         (free_all_breakpoints): Mark all breakpoints as uninserted, and
7975         use delete_breakpoint_1.
7976
7977         * mem-break.h (breakpoints_supported): Delete declaration.
7978         (set_gdb_breakpoint_at): Declare.
7979         (gdb_breakpoint_here): Declare.
7980         (delete_breakpoint_at): Delete.
7981         (delete_gdb_breakpoint_at): Declare.
7982
7983         * server.h (struct raw_breakpoint): Forward declare.
7984         (struct process_info): New field `raw_breakpoints'.
7985
7986         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7987         breakpoints.
7988
7989 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
7990
7991         * linux-low.c (status_pending_p_callback): Fix comment.
7992         (linux_wait_for_event_1): Move most of the internal breakpoint
7993         handling from here...
7994         (linux_wait_1): ... to here.
7995         (count_events_callback): New.
7996         (select_singlestep_lwp_callback): New.
7997         (select_event_lwp_callback): New.
7998         (cancel_breakpoints_callback): New.
7999         (select_event_lwp): New.
8000         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
8001         priority to all LWPs that have had events that should be reported
8002         to the client.  Cancel breakpoints when about to reporting the
8003         event to the client, not while stopping lwps.  No longer cancel
8004         finished single-steps here.
8005         (cancel_finished_single_step): Delete.
8006         (cancel_finished_single_steps): Delete.
8007
8008 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8009
8010         * mem-break.c (enum bkpt_type): New.
8011         (struct breakpoint): New field `type'.
8012         (set_breakpoint_at): Change return type to struct breakpoint
8013         pointer.  Set type to `other_breakpoint' by default.
8014         (delete_breakpoint): Rewrite, supporting more than one breakpoint
8015         in the breakpoint list.
8016         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8017         (reinsert_breakpoint): Rename to ...
8018         (reinsert_raw_breakpoint): ... this.
8019         (reinsert_breakpoints_at): Adjust.
8020         * mem-break.h (struct breakpoint): Declare.
8021         (set_breakpoint_at): Change return type to struct breakpoint
8022         pointer.
8023
8024 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8025
8026         * server.c (handle_query): Assign, not compare.
8027
8028 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8029
8030         Teach linux gdbserver to step-over-breakpoints.
8031
8032         * linux-low.c (can_hardware_single_step): New.
8033         (supports_breakpoints): New.
8034         (handle_extended_wait): If stopping threads, read the stop pc of
8035         the new cloned LWP.
8036         (get_pc): New.
8037         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
8038         low target doesn't support retrieving the PC.
8039         (add_lwp): Set last_resume_kind to resume_continue.
8040         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
8041         (linux_attach): Don't clear stop_expected.  Set the lwp's
8042         last_resume_kind to resume_stop.
8043         (linux_detach_one_lwp): Don't check for removed breakpoints.
8044         (check_removed_breakpoint): Delete.
8045         (status_pending_p): Rename to ...
8046         (status_pending_p_callback): ... this.  Don't check for removed
8047         breakpoints.  Don't consider threads that are stopped from GDB's
8048         perspective.
8049         (linux_wait_for_lwp): Always read the stop_pc here.
8050         (cancel_breakpoint): New.
8051         (step_over_bkpt): New global.
8052         (linux_wait_for_event_1): Implement stepping over breakpoints.
8053         (gdb_wants_lwp_stopped): New.
8054         (gdb_wants_all_stopped): New.
8055         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
8056         single-step traps here.  Store the thread's last reported target
8057         wait status.
8058         (send_sigstop): Don't clear stop_expected.  Always set it,
8059         instead.
8060         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8061         (cancel_finished_single_step): New.
8062         (cancel_finished_single_steps): New.
8063         (wait_for_sigstop): Don't cancel finished single-step traps here.
8064         (linux_resume_one_lwp): Don't check for removed breakpoints.
8065         Don't set `step' on non-hardware step archs.
8066         (linux_set_resume_request): Ignore resume_stop requests if already
8067         stopping or stopped.  Set the lwp's last_resume_kind.
8068         (resume_status_pending_p): Don't check for removed breakpoints.
8069         (need_step_over_p): New.
8070         (start_step_over): New.
8071         (finish_step_over): New.
8072         (linux_resume_one_thread): Always queue a sigstop for resume_stop
8073         requests.  Clear the thread's last reported target waitstatus.
8074         Don't use the `suspended' flag.  Don't consider pending breakpoints.
8075         (linux_resume): Start a step-over if necessary.
8076         (proceed_one_lwp): New.
8077         (proceed_all_lwps): New.
8078         (unstop_all_lwps): New.
8079         * linux-low.h (struct lwp_info): Rewrite comment for the
8080         `suspended' flag.  Add the `stop_pc' field.  Delete the
8081         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
8082         Add `'last_resume_kind' and `need_step_over' fields.
8083         * inferiors.c (struct thread_info): Delete, moved elsewhere.
8084         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8085         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
8086         (set_raw_breakpoint_at): New.
8087         (set_breakpoint_at): Rewrite to use it.
8088         (reinsert_breakpoint_handler): Delete.
8089         (set_reinsert_breakpoint): New.
8090         (reinsert_breakpoint_by_bp): Delete.
8091         (delete_reinsert_breakpoints): New.
8092         (uninsert_breakpoint): Rewrite.
8093         (uninsert_breakpoints_at): New.
8094         (reinsert_breakpoint): Rewrite.
8095         (reinsert_breakpoints_at): New.
8096         (check_breakpoints): Rewrite.
8097         (breakpoint_here): New.
8098         (breakpoint_inserted_here): New.
8099         (check_mem_read): Adjust.
8100         * mem-break.h (breakpoints_supported, breakpoint_here)
8101         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8102         (reinsert_breakpoint_by_bp): Delete declaration.
8103         (delete_reinsert_breakpoints): Declare.
8104         (reinsert_breakpoint): Delete declaration.
8105         (reinsert_breakpoints_at): Declare.
8106         (uninsert_breakpoint): Delete declaration.
8107         (uninsert_breakpoints_at): Declare.
8108         (check_breakpoints): Adjust prototype.
8109         * server.h: Adjust include order.
8110         (struct thread_info): Declare here.  Add a `last_status' field.
8111
8112 2010-03-23  Michael Snyder  <msnyder@vmware.com>
8113
8114         * server.c (crc32): New function.
8115         (handle_query): Add handling for 'qCRC:' request.
8116
8117 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
8118
8119         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8120         lwp had been stopped by a watchpoint.
8121
8122 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
8123
8124         * server.h (internal_error): Declare.
8125         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8126         * utils.c (internal_error): New function.
8127
8128 2010-03-15  Andreas Schwab  <schwab@redhat.com>
8129
8130         * configure.srv: Fix typo setting srv_regobj.
8131
8132 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
8133
8134         * linux-low.c (fetch_register): Avoid passing a non string literal
8135         format to `error'.
8136         (usr_store_inferior_registers): Ditto.
8137
8138 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
8139
8140         * linux-low.c (linux_write_memory): Bail out early if peeking
8141         memory failed.
8142
8143 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
8144
8145         * linux-low.h (struct lwp_info): New fields
8146         `stopped_by_watchpoint' and `stopped_data_address'.
8147         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8148         here, and cache them in the lwp object.
8149         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8150         directly.
8151         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8152         field.
8153         (linux_stopped_by_watchpoint): Rewrite.
8154         (linux_stopped_data_address): Rewrite.
8155
8156 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
8157
8158         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8159         switching the current inferior, not before.
8160
8161 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
8162
8163         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8164         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8165         i386-linux.c and amd64-linux.c.
8166         (reg-i386.o): Removed.
8167         (reg-i386.c): Likewise.
8168         (reg-i386-linux.o): Likewise.
8169         (reg-i386-linux.c): Likewise.
8170         (reg-x86-64.o): Likewise.
8171         (reg-x86-64.c): Likewise.
8172         (reg-x86-64-linux.o): Likewise.
8173         (reg-x86-64-linux.c): Likewise.
8174         (i386.o): New.
8175         (i386.c): Likewise.
8176         (i386-linux.o): Likewise.
8177         (i386-linux.c): Likewise.
8178         (amd64.o): Likewise.
8179         (amd64.c): Likewise.
8180         (amd64-linux.o): Likewise.
8181         (amd64-linux.c): Likewise.
8182
8183         * configure.srv (srv_i386_regobj): New.
8184         (srv_i386_linux_regobj): Likewise.
8185         (srv_amd64_regobj): Likewise.
8186         (srv_amd64_linux_regobj): Likewise.
8187         (srv_i386_32bit_xmlfiles): Likewise.
8188         (srv_i386_64bit_xmlfiles): Likewise.
8189         (srv_i386_xmlfiles): Likewise.
8190         (srv_amd64_xmlfiles): Likewise.
8191         (srv_i386_linux_xmlfiles): Likewise.
8192         (srv_amd64_linux_xmlfiles): Likewise.
8193         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
8194         srv_xmlfiles to $srv_i386_xmlfiles.
8195         (i[34567]86-*-mingw32ce*): Likewise.
8196         (i[34567]86-*-mingw*): Likewise.
8197         (i[34567]86-*-nto*): Likewise.
8198         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8199         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
8200         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8201         (x86_64-*-linux*): Likewise.
8202
8203         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8204         (init_registers_amd64_linux): New.
8205         (x86_arch_setup): Replace init_registers_x86_64_linux with
8206         init_registers_amd64_linux.
8207
8208 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
8209
8210         * configure.ac: Check for libdl.  If it is not available link against
8211         static libthread_db.
8212         * configure: Regenerate.
8213
8214 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
8215
8216         PR9605
8217
8218         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8219         handing a read watchpoint.
8220         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8221
8222 2010-02-12  Doug Evans  <dje@google.com>
8223
8224         * linux-low.c (linux_supports_tracefork_flag): Document.
8225         (linux_look_up_symbols): Add comment.
8226
8227 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
8228
8229         * regcache.c (supply_register): Clear regcache if buf is NULL.
8230
8231 2010-02-02  Nicolas Roche  <roche@sourceware.org>
8232             Joel Brobecker  <brobecker@adacore.com>
8233
8234         * inferiors.c (find_inferior): Add function documentation.
8235         (unloaded_dll): Handle the case where the unloaded dll has not
8236         been previously registered in the dll list.
8237
8238 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
8239
8240         * linux-arm-low.c (thumb_breakpoint_len): Delete.
8241         (thumb2_breakpoint): New.
8242         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8243
8244 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
8245
8246         * linux-low.c (get_stop_pc): Check for SIGTRAP.
8247         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8248         breakpoints.
8249
8250 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
8251
8252         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8253
8254 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8255
8256         * linux-s390-low.c (s390_collect_ptrace_register)
8257         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8258
8259 2010-01-21  Doug Evans  <dje@google.com>
8260
8261         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8262         (PTRACE_ARG4_TYPE): New macro.
8263         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8264         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8265         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8266         (usr_store_inferior_registers): Ditto.
8267         (linux_read_memory, linux_write_memory): Ditto.
8268         (linux_test_for_tracefork): Ditto.
8269
8270         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8271         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8272
8273 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
8274
8275         * proc-service.c (ps_lgetregs): Don't refetch registers from the
8276         target.
8277
8278 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
8279
8280         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8281         prototype to take a regcache.  Adjust.
8282
8283 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
8284
8285         * regcache.h (struct thread_info): Forward declare.
8286         (struct regcache): New.
8287         (new_register_cache): Adjust prototype.
8288         (get_thread_regcache): Declare.
8289         (free_register_cache): Adjust prototype.
8290         (registers_to_string, registers_from_string): Ditto.
8291         (supply_register, supply_register_by_name, collect_register)
8292         (collect_register_as_string, collect_register_by_name): Ditto.
8293         * regcache.c (struct inferior_regcache_data): Delete.
8294         (get_regcache): Rename to ...
8295         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
8296         fetching registers.
8297         (regcache_invalidate_one): Adjust.
8298         (regcache_invalidate): Fix prototype.
8299         (new_register_cache): Return the new register cache.
8300         (free_register_cache): Change prototype.
8301         (realloc_register_cache): Adjust.
8302         (registers_to_string): Change prototype to take a regcache.  Adjust.
8303         (registers_from_string): Ditto.
8304         (register_data): Ditto.
8305         (supply_register): Ditto.
8306         (supply_register_by_name): Ditto.
8307         (collect_register): Ditto.
8308         (collect_register_as_string): Ditto.
8309         (collect_register_by_name): Ditto.
8310         * server.c (process_serial_event): Adjust.
8311         * linux-low.h (regset_fill_func, regset_store_func): Change
8312         prototype.
8313         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8314         Change prototype.
8315         * linux-low.c (get_stop_pc): Adjust.
8316         (check_removed_breakpoint): Adjust.
8317         (linux_wait_for_event): Adjust.
8318         (linux_resume_one_lwp): Adjust.
8319         (fetch_register): Add regcache parameter.  Adjust.
8320         (usr_store_inferior_registers): Ditto.
8321         (regsets_fetch_inferior_registers): Ditto.
8322         (regsets_store_inferior_registers): Ditto.
8323         (linux_fetch_registers, linux_store_registers): Ditto.
8324         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8325         regcache.  Adjust.
8326         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8327         Ditto.
8328         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8329         prototype to take a regcache.
8330         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8331         * remote-utils.c (convert_ascii_to_int, outreg)
8332         (prepare_resume_reply): Change prototype to take a regcache.
8333         Adjust.
8334         * target.h (struct target_ops) <fetch_registers, store_registers>:
8335         Change prototype to take a regcache.
8336         (fetch_inferior_registers, store_inferior_registers): Change
8337         prototype to take a regcache.  Adjust.
8338         * proc-service.c (ps_lgetregs): Adjust.
8339         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8340         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8341         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8342         take a regcache.  Adjust.
8343         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8344         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8345         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8346         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
8347         * linux-cris-low.c (cris_get_pc, cris_set_pc)
8348         (cris_cannot_fetch_register):
8349         (cris_breakpoint_at): Change prototype to take a regcache.
8350         Adjust.
8351         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8352         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8353         to take a regcache.  Adjust.
8354         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8355         Adjust.
8356         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8357         take a regcache.  Adjust.
8358         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8359         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8360         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
8361         * linux-mips-low.c (mips_get_pc):
8362         (mips_set_pc): Change prototype to take a regcache.  Adjust.
8363         (mips_reinsert_addr): Adjust.
8364         (mips_collect_register): Change prototype to take a regcache.
8365         Adjust.
8366         (mips_supply_register):
8367         (mips_collect_register_32bit, mips_supply_register_32bit)
8368         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8369         (mips_store_fpregset): Ditto.
8370         * linux-ppc-low.c (ppc_supply_ptrace_register)
8371         (ppc_supply_ptrace_register): Ditto.
8372         (parse_spufs_run): Adjust.
8373         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8374         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8375         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8376         take a regcache.  Adjust.
8377         * linux-s390-low.c (s390_collect_ptrace_register)
8378         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8379         (s390_set_pc): Change prototype to take a regcache.  Adjust.
8380         (s390_arch_setup): Adjust.
8381         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8382         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
8383         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8384         (sparc_fill_gregset, sparc_store_gregset_from_stack)
8385         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8386         regcache.  Adjust.
8387         (sparc_breakpoint_at): Adjust.
8388         * linux-xtensa-low.c (xtensa_fill_gregset):
8389         (xtensa_store_gregset):
8390         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8391         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
8392         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8393         prototype to take a regcache.  Adjust.
8394         * win32-arm-low.c (arm_fetch_inferior_register)
8395         (arm_store_inferior_register): Change prototype to take a
8396         regcache.  Adjust.
8397         * win32-i386-low.c (i386_fetch_inferior_register)
8398         (i386_store_inferior_register): Change prototype to take a
8399         regcache.  Adjust.
8400         * win32-low.c (child_fetch_inferior_registers)
8401         (child_store_inferior_registers): Change prototype to take a
8402         regcache.  Adjust.
8403         (win32_wait): Adjust.
8404         (win32_fetch_inferior_registers): Change prototype to take a
8405         regcache.  Adjust.
8406         (win32_store_inferior_registers): Adjust.
8407         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8408         store_inferior_register>: Change prototype to take a regcache.
8409
8410 2010-01-20  Doug Evans  <dje@google.com>
8411
8412         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8413         #ifdef.
8414         (linux_wait_for_event1, linux_init_signals): Ditto.
8415         (W_STOPCODE): Provide definition if missing.
8416
8417 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
8418
8419         * linux-low.c (linux_core_of_thread): New.
8420         (compare_ints, show_process, list_threads): New.
8421         (linux_qxfer_osdata): Report threads and cores.
8422         (linux_target_op): Register linux_core_of_thread.
8423         * remote-utils.c (prepare_resume_reply): Report the core.
8424         (buffer_xml_printf): Support %d specifier.
8425         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8426         New.
8427         (handle_query): Handle qXfer:threads.  Announce availability
8428         thereof.
8429         * target.h (struct target_ops): New field core_of_thread.
8430
8431 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
8432
8433         * Makefile.in (clean): Remove new generated files.
8434         (reg-s390.o, reg-s390.c): Remove rules.
8435         (reg-s390x.o, reg-s390x.c): Likewise.
8436         (s390-linux32.o, s390-linux32.c): Add rules.
8437         (s390-linux64.o, s390-linux64.c): Likewise.
8438         (s390x-linux64.o, s390x-linux64.c): Likewise.
8439         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8440         * linux-s390-low.c: Include <elf.h>.
8441         (HWCAP_S390_HIGH_GPRS): Define if undefined.
8442         (init_registers_s390): Remove prototype.
8443         (init_registers_s390x): Likewise.
8444         (init_registers_s390_linux32): Add prototype.
8445         (init_registers_s390_linux64): Likewise.
8446         (init_registers_s390x_linux64): Likewise.
8447         (s390_num_regs_3264): New define.
8448         (s390_regmap_3264): New global variable.
8449         (s390_cannot_fetch_register): Remove obsolete check.
8450         (s390_cannot_store_register): Likewise.
8451         (s390_collect_ptrace_register): Handle upper/lower register halves.
8452         (s390_supply_ptrace_register): Likewise.
8453         (s390_fill_gregset): Update to register number changes.
8454         (s390_get_hwcap): New routine.
8455         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8456         Install appropriate regmap and register set.
8457
8458 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
8459
8460         * server.c (gdbserver_version): Update copyright year to 2010.
8461         * gdbreplay.c (gdbreplay_version): Likewise.
8462
8463 2009-12-28  Doug Evans  <dje@google.com>
8464
8465         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8466         elf/external.h.  Include <elf.h> instead but only if necessary.
8467
8468 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
8469
8470         * linux-low.c (linux_remove_process): Remove `detaching'
8471         parameter.  Don't release/detach from thread_db here.
8472         (linux_kill): Release/detach from thread_db here, ...
8473         (linux_detach): ... and here, before actually detaching.
8474         (linux_wait_1): ... and here, when a process exits.
8475         * thread-db.c (any_thread_of): New.
8476         (thread_db_free): Switch the current inferior to a thread of the
8477         passed in process.
8478
8479 2009-12-21  Doug Evans  <dje@google.com>
8480
8481         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8482
8483         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8484         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8485         warning ifndef __NR_tkill.  Move setting of errno there too.
8486         Delete unnecessary resetting of errno after syscall.
8487         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8488
8489         * configure.ac: Check for dladdr.
8490         * config.in: Regenerate.
8491         * configure: Regenerate.
8492         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8493         (try_thread_db_load): Update.
8494
8495         * linux-low.c (my_waitpid): Delete unnecessary prototype.
8496
8497 2009-12-18  Doug Evans  <dje@google.com>
8498
8499         * event-loop.c: Include unistd.h if it exists.
8500
8501         * linux-low.c (my_waitpid): Move definition away from being in
8502         between linux_tracefork_child/linux_test_for_tracefork.
8503
8504         * gdb_proc_service.h (psaddr_t): Fix type.
8505         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8506         signature to match glibc.
8507
8508 2009-12-16  Doug Evans  <dje@google.com>
8509
8510         * linux-low.c (linux_read_memory): Fix argument to read.
8511
8512 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
8513
8514         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8515         events, don't leave current_inferior pointing at null.
8516
8517 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
8518
8519         * win32-low.c (LOG): Delete.
8520         (OUTMSG): Output to stderr.
8521         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8522         on compile time LOG macro.
8523         (win32_wait): Fix debug output.
8524
8525 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
8526
8527         * win32-low.c (win32_add_one_solib): If the dll name is
8528         "ntdll.dll", prepend the system directory to the dll path.
8529
8530 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
8531
8532         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8533
8534 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8535             Vladimir Prus  <vladimir@codesourcery.com>
8536
8537         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8538         * configure.ac: Check for __mcoldfire__ and set
8539         gdb_cv_m68k_is_coldfire.
8540         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8541         reg-cf.o and reg-m68k.o.
8542         * configure: Regenerated.
8543
8544 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
8545
8546         * linux-low.c (linux_remove_process): Add `detaching' parameter.
8547         Pass it to thread_db_free.
8548         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8549         proper `detaching' argument to linux_remove_process.
8550         * linux-low.h (thread_db_free): Add `detaching' parameter.
8551         * thread-db.c (thread_db_init): Pass false as `detaching' argument
8552         to thread_db_free.
8553         (thread_db_free): Add `detaching' parameter.  Only
8554         call td_ta_clear_event if detaching from process.
8555
8556 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
8557
8558         * thread-db.c (thread_db_free): Fix typo.
8559
8560 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
8561
8562         PR gdb/10838
8563         * thread-db.c (thread_db_free): Call td_ta_clear_event.
8564
8565 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
8566
8567         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8568         with an i686 compiler.
8569         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8570         needed.
8571         * configure: Rebuilt.
8572
8573 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
8574
8575         PR gdb/10783
8576
8577         * server.c (handle_search_memory_1): Correct read_addr initialization
8578         in loop for searching subsequent chunks.
8579
8580 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
8581
8582         * configure.ac: New --with-libthread-db option.
8583         * thread-db.c: Allow direct dependence on libthread_db.
8584         (thread_db_free): Adjust.
8585         * config.in: Regenerate.
8586         * configure: Likewise.
8587
8588 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
8589
8590         PR gdb/10757
8591         * thread-db.c (attach_thread): New function.
8592         (maybe_attach_thread): Return success/failure.
8593         (find_new_threads_callback): Adjust.
8594         (thread_db_find_new_threads): Loop until no new threads.
8595
8596 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
8597
8598         * proc-service.c (ps_lgetregs): Formatting.
8599
8600 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
8601
8602         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8603         * configure.ac: Adjust.
8604         * linux-low.h (struct process_info_private): Move members to struct
8605         thread_db.
8606         (thread_db_free, thread_db_handle_monitor_command): New prototype.
8607         * linux-low.c (linux_remove_process): Adjust.
8608         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8609         * server.c (handle_query): Move code ...
8610         (handle_monitor_command): ... here. New function.
8611         * target.h (struct target_ops): New member.
8612         * thread-db.c (struct thread_db): New.
8613         (libthread_db_search_path): New variable.
8614         (thread_db_create_event, thread_db_enable_reporting)
8615         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8616         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8617         (try_thread_db_load_1, dladdr_to_soname): New functions.
8618         (try_thread_db_load, thread_db_load_search): New functions.
8619         (thread_db_init): Search for libthread_db.
8620         (thread_db_free): New function.
8621         (thread_db_handle_monitor_command): Likewise.
8622         * config.in: Regenerate.
8623         * configure: Regenerate.
8624
8625 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
8626
8627         * spu-low.c (spu_kill): Wait for inferior to terminate.
8628         Call clear_inferiors.
8629         (spu_detach): Call clear_inferiors.
8630
8631 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8632
8633         * aclocal.m4: Regenerate.
8634         * config.in: Likewise.
8635         * configure: Likewise.
8636
8637 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
8638
8639         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8640         (parse_spufs_run): New function.
8641         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8642         (ppc_breakpoint_at): Handle SPU breakpoints.
8643
8644 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
8645
8646         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8647         (SPUFS_MAGIC): Define.
8648         (spu_enumerate_spu_ids): New function.
8649         (linux_qxfer_spu): New function.
8650         (linux_target_ops): Install linux_qxfer_spu.
8651
8652 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
8653
8654         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8655         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
8656         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8657         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8658         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8659         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8660         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8661         (init_registers_powerpc_cell32l): Add prototype.
8662         (init_registers_powerpc_cell64l): Likewise.
8663         (ppc_arch_setup): Detect Cell/B.E. architecture.
8664
8665 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8666
8667         * Makefile.in (datarootdir): New variable.
8668
8669 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
8670
8671         * linux-low.c (linux_write_memory): Update debugging output.
8672         * Makefile.in (clean): Add new descriptions.
8673         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8674         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8675         * configure.srv: Add new files for arm*-*-linux*.
8676         * linux-arm-low.c: Add new declarations.
8677         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8678         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8679         (HWCAP_VFPv3D16): New.
8680         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8681         instead of __IWMMXT__.
8682         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8683         (arm_arch_setup): New.
8684         (target_regsets): Remove #ifdef.  Add VFP regset.
8685         (the_low_target): Use arm_arch_setup.
8686
8687 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
8688
8689         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8690         the main thread again.
8691
8692 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
8693
8694         Adding Neutrino gdbserver.
8695         * configure: Regenerated.
8696         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8697         * configure.srv (i[34567]86-*-nto*): New target.
8698         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8699         * remote-utils.c [__QNX__]: Include sys/iomgr.h
8700         (nto_comctrl) [__QNX__]: New function.
8701         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8702
8703 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
8704
8705         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8706         srv_tgtobj.
8707
8708 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
8709             Pedro Alves  <pedro@codesourcery.com>
8710
8711         * win32-i386-low.c (i386_get_thread_context): Handle systems that
8712         don't support CONTEXT_EXTENDED_REGISTERS.
8713         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8714         (the_low_target): Install them.
8715         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8716         failing with ERROR_PIPE_NOT_CONNECTED.
8717
8718 2009-06-30  Doug Evans  <dje@google.com>
8719             Pierre Muller  <muller@ics.u-strasbg.fr>
8720
8721         Add h/w watchpoint support to x86-linux, win32-i386.
8722         * Makefile.in (SFILES): Add i386-low.c
8723         (i386_low_h): Define.
8724         (i386-low.o): Add dependencies.
8725         (linux-x86-low.o): Add i386-low.h dependency.
8726         (win32-i386-low.o): Ditto.
8727         * i386-low.c: New file.
8728         * i386-low.h: New file.
8729         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8730         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8731         * linux-low.c (linux_add_process): Initialize arch_private.
8732         (linux_remove_process): Free arch_private.
8733         (add_lwp): Initialize arch_private.
8734         (delete_lwp): Free arch_private.
8735         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8736         provided.
8737         * linux-low.h (process_info_private): New member arch_private.
8738         (lwp_info): New member arch_private.
8739         (linux_target_ops): New members new_process, new_thread,
8740         prepare_to_resume.
8741         (ptid_of): New macro.
8742         * linux-x86-low.c: Include stddef.h, i386-low.h.
8743         (arch_process_info): New struct.
8744         (arch_lwp_info): New struct.
8745         (x86_linux_dr_get, x86_linux_dr_set): New functions.
8746         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8747         (i386_dr_low_get_status): New function.
8748         (x86_insert_point, x86_remove_point): New functions.
8749         (x86_stopped_by_watchpoint): New function.
8750         (x86_stopped_data_address): New function.
8751         (x86_linux_new_process, x86_linux_new_thread): New functions.
8752         (x86_linux_prepare_to_resume): New function.
8753         (the_low_target): Add entries for insert_point, remove_point,
8754         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8755         prepare_to_resume.
8756         * server.c (debug_hw_points): New global.
8757         (monitor_show_help): Document set debug-hw-points.
8758         (handle_query): Process "set debug-hw-points".
8759         * server.h (debug_hw_points): Declare.
8760         (paddress): Declare.
8761         * utils.c (NUMCELLS, CELLSIZE): New macros.
8762         (get_sell, xsnprintf, paddress): New functions.
8763         * win32-arm-low.c (the_low_target): Add entries for insert_point,
8764         remove_point, stopped_by_watchpoint, stopped_data_address.
8765         * win32-i386-low.c: Include i386-low.h.
8766         (debug_reg_state): Replaces dr.
8767         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8768         (i386_dr_low_get_status): New function.
8769         (i386_insert_point, i386_remove_point): New functions.
8770         (i386_stopped_by_watchpoint): New function.
8771         (i386_stopped_data_address): New function.
8772         (i386_initial_stuff): Update.
8773         (get_thread_context,set_thread_context,i386_thread_added): Update.
8774         (the_low_target): Add entries for insert_point,
8775         remove_point, stopped_by_watchpoint, stopped_data_address.
8776         * win32-low.c (win32_insert_watchpoint): New function.
8777         (win32_remove_watchpoint): New function.
8778         (win32_stopped_by_watchpoint): New function.
8779         (win32_stopped_data_address): New function.
8780         (win32_target_ops): Add entries for insert_watchpoint,
8781         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8782         * win32-low.h (win32_target_ops): New members insert_point,
8783         remove_point, stopped_by_watchpoint, stopped_data_address.
8784
8785 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
8786
8787         * server.c (process_serial_event): Re-return unsupported, not
8788         error, if the type isn't recognized.  Re-allow supporting only
8789         insert or remove packets.  Also call require_running for
8790         breakpoints.  Add missing break statement to default case.  Tidy.
8791         * target.h (struct target_ops): Rename insert_watchpoint to
8792         insert_point, and remove_watchpoint to remove_point.
8793
8794         * linux-low.h (struct linux_target_ops): Likewise.
8795         * linux-low.c (linux_insert_watchpoint): Rename to ...
8796         (linux_insert_point): ... this.  Adjust.
8797         (linux_remove_watchpoint): Rename to ...
8798         (linux_remove_point): ... this.  Adjust.
8799         (linux_target_ops): Adjust.
8800         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8801         (cris_insert_point): ... this.
8802         (cris_remove_watchpoint): Rename to ...
8803         (cris_remove_point): ... this.
8804         (the_low_target): Adjust.
8805
8806 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
8807
8808         * server.c (handle_v_kill): Pass signal_pid to
8809         kill_inferior if multi_process is zero.
8810
8811 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
8812
8813         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8814         * target.h (target_ops): Comment for *_watchpoint to make it clear
8815         the functions can get types '0' and '1'.
8816
8817 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
8818
8819         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8820         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8821         * regcache.c (get_regcache): Likewise.
8822         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8823         * win32-low.c (child_fetch_inferior_registers): Remove check for
8824         regno 0.
8825
8826 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
8827             Pedro Alves <pedro@codesourcery.com>
8828
8829         * target.h (struct target_ops) <supports_multi_process>: New
8830         callback.
8831         (target_supports_multi_process): New.
8832         * server.c (handle_query): Even if GDB reports support, only
8833         enable multi-process if the target also supports it.  Report
8834         multi-process support only if the target backend supports it.
8835         * linux-low.c (linux_supports_multi_process): New function.
8836         (linux_target_ops): Install it as target_supports_multi_process
8837         callback.
8838
8839 2009-05-24  Doug Evans  <dje@google.com>
8840
8841         Global renaming of find_thread_pid to find_thread_ptid.
8842         * server.h (find_thread_ptid): Renamed from find_thread_pid.
8843         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8844         All callers updated.
8845
8846         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8847         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8848         directly.
8849
8850         * linux-low.c (get_stop_pc): Print pc if debug_threads.
8851         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8852         (linux_resume_one_lwp): Ditto.
8853
8854 2009-05-23  Doug Evans  <dje@google.com>
8855
8856         * linux-low.c (linux_resume_one_lwp): Change type of first arg
8857         from struct inferior_list_entry * to struct lwp_info *.
8858         All callers updated.
8859
8860 2009-05-13  Doug Evans  <dje@google.com>
8861
8862         * linux-x86-low.c: Don't include assert.h.
8863         (x86_siginfo_fixup): Use fatal, not assert.
8864         (x86_arch_setup): Fix comment.
8865
8866 2009-05-12  Doug Evans  <dje@google.com>
8867
8868         Biarch support for i386/amd64 gdbserver.
8869         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8870         Add linux-x86-low.c.
8871         (linux-i386-low.o, linux-x86-64-low.o): Delete.
8872         (linux-x86-low.o): Add.
8873         * linux-x86-64-low.c: Delete.
8874         * linux-i386-low.c: Delete.
8875         * linux-x86-low.c: New file.
8876         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8877         linux-x86-low.o.
8878         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8879         linux-x86-low.o.
8880         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8881         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8882         (linux_child_pid_to_exec_file): New function.
8883         (elf_64_header_p, elf_64_file_p): New functions.
8884         (siginfo_fixup): New function.
8885         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
8886         give target a chance to convert layout.
8887         * linux-low.h (linux_target_ops): New member siginfo_fixup.
8888         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8889
8890 2009-05-07  Doug Evans  <dje@google.com>
8891
8892         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8893         (regsets_store_inferior_registers): Ditto.
8894
8895 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
8896
8897         PR server/10048
8898
8899         * linux-low.c (must_set_ptrace_flags): Delete.
8900         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8901         of the global.
8902         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
8903         `lwp->must_set_ptrace_flags' instead.
8904         (linux_wait_for_event_1): Set ptrace options here.
8905         (linux_wait_1): ... not here.
8906
8907 2009-04-30  Doug Evans  <dje@google.com>
8908
8909         * inferiors.c (started_inferior_callback): New function.
8910         (attached_inferior_callback): New function.
8911         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8912         * server.c (print_started_pid, print_attached_pid): New functions.
8913         (detach_or_kill_for_exit): New function.
8914         (main): Call it instead of for_each_inferior (kill_inferior_callback).
8915         * server.h (have_started_inferiors_p): Declare.
8916         (have_attached_inferiors_p): Declare.
8917
8918         * inferiors.c (remove_process): Fix memory leak, free process.
8919         * linux-low.c (linux_remove_process): New function.
8920         (linux_kill): Call it instead of remove_process.
8921         (linux_detach, linux_wait_1): Ditto.
8922
8923 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
8924
8925         * configure.srv: Add x86 Windows CE target.
8926
8927 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
8928
8929         * inferiors.c (get_thread_process): Make global.
8930         * server.h (get_thread_process): Add prototype.
8931         * thread-db.c (find_one_thread): Use get_thread_process
8932         instead of current_process.
8933         (thread_db_get_tls_address): Do not crash if called when
8934         thread layer is not yet initialized.
8935
8936 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
8937
8938         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8939         * spu-low.c (current_tid): Rename to ...
8940         (current_ptid): ... this.
8941         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8942         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8943         ptid_get_lwp (current_ptid) instead of current_tid.
8944         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8945         instead of current_tid.  Use find_process_pid to verify pid
8946         argument is valid.  Pass proper argument to remove_process.
8947         (spu_thread_alive): Compare current_ptid instead of current_tid.
8948         (spu_resume): Likewise.
8949
8950 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
8951
8952         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8953         variable.
8954
8955 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
8956
8957         Implement the multiprocess extensions, and add linux multiprocess
8958         support.
8959
8960         * server.h (ULONGEST): Declare.
8961         (struct ptid, ptid_t): New.
8962         (minus_one_ptid, null_ptid): Declare.
8963         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8964         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8965         (struct inferior_list_entry): Change `id' type from unsigned from
8966         to ptid_t.
8967         (struct sym_cache, struct breakpoint, struct
8968         process_info_private): Forward declare.
8969         (struct process_info): Declare.
8970         (current_process): Declare.
8971         (all_processes): Declare.
8972         (initialize_inferiors): Declare.
8973         (add_thread): Adjust to use ptid_t.
8974         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8975         (add_process, remove_process, find_thread_pid): Declare.
8976         (find_inferior_id): Adjust to use ptid_t.
8977         (cont_thread, general_thread, step_thread): Change type to ptid_t.
8978         (multi_process): Declare.
8979         (push_event): Adjust to use ptid_t.
8980         (read_ptid, write_ptid): Declare.
8981         (prepare_resume_reply): Adjust to use ptid_t.
8982         (clear_symbol_cache): Declare.
8983         * inferiors.c (all_processes): New.
8984         (null_ptid, minus_one_ptid): New.
8985         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8986         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8987         (add_thread): Change unsigned long to ptid.  Remove gdb_id
8988         parameter.  Adjust.
8989         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8990         (gdb_id_to_thread): Rename to ...
8991         (find_thread_pid): ... this.  Change unsigned long to ptid.
8992         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8993         (loaded_dll, pull_pid_from_list): Adjust.
8994         (add_process, remove_process, find_process_pid)
8995         (get_thread_process, current_process, initialize_inferiors): New.
8996         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8997         (struct target_waitstatus) <related_pid>: Ditto.
8998         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
8999         return type to int.
9000         (struct target_ops) <join>: Add `pid' argument.
9001         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9002         (struct target_ops) <wait>: Add `ptid' field.  Change return type
9003         to ptid.
9004         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9005         (mywait): Add `ptid' argument.  Change return type to ptid_t.
9006         (target_pid_to_str): Declare.
9007         * target.c (set_desired_inferior): Adjust to use ptids.
9008         (mywait): Add new `ptid' argument.  Adjust.
9009         (target_pid_to_str): New.
9010         * mem-break.h (free_all_breakpoints): Declare.
9011         * mem-break.c (breakpoints): Delelete.
9012         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9013         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9014         to use per-process breakpoint list.
9015         (free_all_breakpoints): New.
9016         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9017         (symbol_cache, all_symbols_looked_up): Delete.
9018         (hexchars): New.
9019         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9020         read_ptid): New.
9021         (prepare_resume_reply): Change ptid argument's type from unsigned
9022         long to ptid_t.  Adjust.  Implement W;process and X;process.
9023         (free_sym_cache, clear_symbol_cache): New.
9024         (look_up_one_symbol): Adjust to per-process symbol cache.  *
9025         * server.c (cont_thread, general_thread, step_thread): Change type
9026         to ptid_t.
9027         (attached): Delete.
9028         (multi_process): New.
9029         (last_ptid): Change type to ptid_t.
9030         (struct vstop_notif) <ptid>: Change type to ptid_t.
9031         (queue_stop_reply, push_event): Change `ptid' argument's type to
9032         ptid_t.
9033         (discard_queued_stop_replies): Add `pid' argument.
9034         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
9035         changes.  Don't reference the `attached' global.
9036         (attach_inferior): Adjust to mywait interface changes.
9037         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
9038         features.  Handle and report "multiprocess+".  Handle
9039         "qAttached:PID".
9040         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
9041         changes.
9042         (handle_v_kill): New.
9043         (handle_v_stopped): Adjust to use target_pid_to_str.
9044         (handle_v_requests): Allow multiple attaches and runs when
9045         multiprocess extensions are in effect.  Handle "vKill".
9046         (myresume): Adjust to use ptids.
9047         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
9048         (handle_status): Adjust to discard_queued_stop_replies interface
9049         change.
9050         (first_thread_of, kill_inferior_callback)
9051         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9052         (main): Call initialize_inferiors.  Adjust to use ptids, killing
9053         and detaching from all inferiors.  Handle multiprocess packet
9054         variants.
9055         * linux-low.h: Include gdb_proc_service.h.
9056         (struct process_info_private): New.
9057         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9058         <lwpid_of>: Use ptid_get_lwp.
9059         (get_lwp_thread): Adjust.
9060         (struct lwp_info): Add `dead' member.
9061         (find_lwp_pid): Declare.
9062         * linux-low.c (thread_db_active): Delete.
9063         (new_inferior): Adjust comment.
9064         (inferior_pid): Delete.
9065         (linux_add_process): New.
9066         (handle_extended_wait): Adjust.
9067         (add_lwp): Change unsigned long to ptid.
9068         (linux_create_inferior): Add process to processes table.  Adjust
9069         to use ptids.  Don't set new_inferior here.
9070         (linux_attach_lwp): Rename to ...
9071         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
9072         it.  Adjust to use ptids.
9073         (linux_attach_lwp): New.
9074         (linux_attach): Add process to processes table.  Don't set
9075         new_inferior here.
9076         (struct counter): New.
9077         (second_thread_of_pid_p, last_thread_of_process_p): New.
9078         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
9079         multiple processes.
9080         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
9081         processes.  Remove process from process table.
9082         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
9083         to multiple processes.
9084         (any_thread_of): New.
9085         (linux_detach): Add `pid' argument, and handle it.  Remove process
9086         from processes table.
9087         (linux_join): Add `pid' argument.  Handle it.
9088         (linux_thread_alive): Change unsighed long argument to ptid_t.
9089         Consider dead lwps as not being alive.
9090         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
9091         threads we're not interested in.
9092         (same_lwp, find_lwp_pid): New.
9093         (linux_wait_for_lwp): Change `pid' argument's type from int to
9094         ptid_t.  Adjust.
9095         (linux_wait_for_event): Rename to ...
9096         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
9097         from int to ptid_t.  Adjust.
9098         (linux_wait_for_event): New.
9099         (linux_wait_1): Add `ptid' argument.  Change return type to
9100         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
9101         that exit from the process table.
9102         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
9103         Adjust.
9104         (mark_lwp_dead): New.
9105         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
9106         stopping all threads, mark its main lwp as dead.
9107         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9108         ptids.
9109         (fetch_register, usr_store_inferior_registers)
9110         (regsets_fetch_inferior_registers)
9111         (regsets_store_inferior_registers, linux_read_memory)
9112         (linux_write_memory): Inline `inferior_pid'.
9113         (linux_look_up_symbols): Adjust to use per-process
9114         `thread_db_active'.
9115         (linux_request_interrupt): Adjust to use ptids.
9116         (linux_read_auxv): Inline `inferior_pid'.
9117         (initialize_low): Don't reference thread_db_active.
9118         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9119         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9120         (ps_getpid): Return the pid of the current inferior.
9121         * thread-db.c (proc_handle, thread_agent): Delete.
9122         (thread_db_create_event, thread_db_enable_reporting): Adjust to
9123         per-process data.
9124         (find_one_thread): Change argument type to ptid_t.  Adjust to
9125         per-process data.
9126         (maybe_attach_thread): Adjust to per-process data and ptids.
9127         (thread_db_find_new_threads): Ditto.
9128         (thread_db_init): Ditto.
9129         * spu-low.c (spu_create_inferior, spu_attach): Add process to
9130         processes table.  Adjust to use ptids.
9131         (spu_kill, spu_detach): Adjust interface.  Remove process from
9132         processes table.
9133         (spu_join, spu_thread_alive): Adjust interface.
9134         (spu_wait): Adjust interface.  Remove process from processes
9135         table.  Adjust to use ptids.
9136         * win32-low.c (current_inferior_tid): Delete.
9137         (current_inferior_ptid): New.
9138         (debug_event_ptid): New.
9139         (thread_rec): Take a ptid.  Adjust.
9140         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
9141         (child_delete_thread): Ditto.
9142         (do_initial_child_stuff): Add `attached' argument.  Add process to
9143         processes table.
9144         (child_fetch_inferior_registers, child_store_inferior_registers):
9145         Adjust.
9146         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9147         (win32_attach): Pass 1 to do_initial_child_stuff.
9148         (win32_kill): Adjust interface.  Remove process from processes
9149         table.
9150         (win32_detach): Ditto.
9151         (win32_join): Adjust interface.
9152         (win32_thread_alive): Take a ptid.
9153         (win32_resume): Adjust to use ptids.
9154         (get_child_debug_event): Ditto.
9155         (win32_wait): Adjust interface.  Remove exiting process from
9156         processes table.
9157
9158 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9159
9160         Non-stop mode support.
9161
9162         * server.h (non_stop): Declare.
9163         (gdb_client_data, handler_func): Declare.
9164         (delete_file_handler, add_file_handler, start_event_loop):
9165         Declare.
9166         (handle_serial_event, handle_target_event, push_event)
9167         (putpkt_notif): Declare.
9168         * target.h (enum resume_kind): New.
9169         (struct thread_resume): Replace `step' field by `kind' field.
9170         (TARGET_WNOHANG): Define.
9171         (struct target_ops) <wait>: Add `options' argument.
9172         <supports_non_stop, async, start_non_stop>: New fields.
9173         (target_supports_non_stop, target_async): New.
9174         (start_non_stop): Declare.
9175         (mywait): Add `options' argument.
9176         * target.c (mywait): Add `options' argument.  Print child exit
9177         notifications here.
9178         (start_non_stop): New.
9179         * server.c (non_stop, own_buf, mem_buf): New globals.
9180         (struct vstop_notif): New.
9181         (notif_queue): New global.
9182         (queue_stop_reply, push_event, discard_queued_stop_replies)
9183         (send_next_stop_reply): New.
9184         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
9185         interface changes.
9186         (attach_inferior): In non-stop mode, don't wait for the target
9187         here.
9188         (handle_general_set): Handle QNonStop.
9189         (handle_query): When handling qC, return the current general
9190         thread, instead of the first thread of the list.
9191         (handle_query): If the backend supports non-stop mode, include
9192         QNonStop+ in the qSupported query response.
9193         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
9194         and non-stop mode.
9195         (handle_v_attach, handle_v_run): Handle non-stop mode.
9196         (handle_v_stopped): New.
9197         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
9198         (myresume): Adjust to use resume_kind.  Handle non-stop.
9199         (queue_stop_reply_callback): New.
9200         (handle_status): Handle non-stop mode.
9201         (main): Clear non_stop flag on reconnection.  Use the event-loop.
9202         Refactor serial protocol handling from here ...
9203         (process_serial_event): ... to this new function.  When GDB
9204         selects any thread, select one here.  In non-stop mode, wait until
9205         GDB acks all pending events before exiting.
9206         (handle_serial_event, handle_target_event): New.
9207         * remote-utils.c (remote_open): Install remote_desc in the event
9208         loop.
9209         (remote_close): Remove remote_desc from the event loop.
9210         (putpkt_binary): Rename to...
9211         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
9212         (putpkt_binary): New as wrapper around putpkt_binary_1.
9213         (putpkt_notif): New.
9214         (prepare_resume_reply): In non-stop mode, don't change the
9215         general_thread.
9216         * event-loop.c: New.
9217         * Makefile.in (OBJ): Add event-loop.o.
9218         (event-loop.o): New rule.
9219
9220         * linux-low.h (pid_of): Moved here.
9221         (lwpid_of): New.
9222         (get_lwp_thread): Use lwpid_of.
9223         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
9224         * linux-low.c (pid_of): Delete.
9225         (inferior_pid): Use lwpid_of.
9226         (linux_event_pipe): New.
9227         (target_is_async_p): New.
9228         (delete_lwp): New.
9229         (handle_extended_wait): Use lwpid_of.
9230         (add_lwp): Don't set lwpid field.
9231         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
9232         (linux_kill_one_lwp): If killing a running lwp, stop it first.
9233         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
9234         (linux_detach_one_lwp): If detaching from a running lwp, stop it
9235         first.  Adjust to linux_wait_for_event interface changes.  Use
9236         lwpid_of.
9237         (linux_detach): Don't delete the main lwp here.
9238         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
9239         (status_pending_p): Don't consider explicitly suspended lwps.
9240         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9241         pointer.  Add OPTIONS argument.  Change return type to int.  Use
9242         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
9243         (linux_wait_for_event): Take an integer pid instead of a lwp_info
9244         pointer.  Add status pointer argument.  Return a pid instead of a
9245         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
9246         changes.  In non-stop mode, don't switch to a random thread.
9247         (linux_wait): Rename to...
9248         (linux_wait_1): ... this.  Add target_options argument, and handle
9249         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
9250         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
9251         clean exit and signal exit code.  Don't stop all threads in
9252         non-stop mode.  In all-stop mode, only stop all threads when
9253         reporting a stop to GDB.  Handle explicit thread stop requests.
9254         (async_file_flush, async_file_mark): New.
9255         (linux_wait): New.
9256         (send_sigstop): Use lwpid_of.
9257         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
9258         interface changes.  In non-stop mode, don't switch to a random
9259         thread.
9260         (linux_resume_one_lwp): Use lwpid_of.
9261         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9262         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
9263         non-stop mode, don't look for pending flag in all threads.
9264         (resume_status_pending_p): Don't consider explicitly suspended
9265         threads.
9266         (my_waitpid): Reimplement.  Emulate __WALL.
9267         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9268         Use lwpid_of.
9269         (sigchld_handler, linux_supports_non_stop, linux_async)
9270         (linux_start_non_stop): New.
9271         (linux_target_ops): Register linux_supports_non_stop, linux_async
9272         and linux_start_non_stop.
9273         (initialize_low): Install SIGCHLD handler.
9274         * thread-db.c (thread_db_create_event, find_one_thread)
9275         (thread_db_get_tls_address): Use lwpid_of.
9276         * win32-low.c (win32_detach): Adjust to use resume_kind.
9277         (win32_wait): Add `options' argument.
9278         * spu-low.c (spu_resume): Adjust to use resume_kind.
9279         (spu_wait): Add `options' argument.
9280
9281 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9282
9283         Decouple target code from remote protocol.
9284
9285         * target.h (enum target_waitkind): New.
9286         (struct target_waitstatus): New.
9287         (struct target_ops) <wait>: Return an unsigned long.  Take a
9288         target_waitstatus pointer instead of a char pointer.
9289         (mywait): Likewise.
9290         * target.c (mywait): Change prototype to return an unsigned long.
9291         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
9292         * server.h (thread_from_wait, old_thread_from_wait): Delete
9293         declarations.
9294         (prepare_resume_reply): Change prototype to take a
9295         target_waitstatus.
9296         * server.c (thread_from_wait, old_thread_from_wait): Delete.
9297         (last_status, last_ptid): New.
9298         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
9299         pid instead of a signal.
9300         (attach_inferior): Remove "status" and "signal" parameters.
9301         Adjust.
9302         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9303         not as an address.
9304         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9305         (handle_v_requests, myresume): Remove "status" and "signal"
9306         parameters.  Adjust.
9307         (handle_status): New.
9308         (main): Delete local `status'.  Adjust.
9309         * remote-utils.c: Include target.h.
9310         (prepare_resume_reply): Change prototype to take a
9311         target_waitstatus.  Adjust.
9312
9313         * linux-low.c (linux_wait): Adjust to new target_ops->wait
9314         interface.
9315         * spu-low.c (spu_wait): Adjust.
9316         * win32-low.c (enum target_waitkind, struct target_waitstatus):
9317         Delete.
9318         (win32_wait): Adjust.
9319
9320 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9321
9322         * target.h (struct thread_resume): Delete leave_stopped member.
9323         (struct target_ops): Add a `n' argument to the `resume' callback.
9324         * server.c (start_inferior): Adjust.
9325         (handle_v_cont, myresume): Adjust.
9326         * linux-low.c (check_removed_breakpoint): Adjust to resume
9327         interface change, and to removed leave_stopped field.
9328         (resume_ptr): Delete.
9329         (struct thread_resume_array): New.
9330         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
9331         resume interface change.
9332         (linux_continue_one_thread, linux_queue_one_thread)
9333         (resume_status_pending_p): Check if the resume field is NULL
9334         instead of checking the leave_stopped member.
9335         (linux_resume): Adjust to the target resume interface change.
9336         * spu-low.c (spu_resume): Adjust to the target resume interface
9337         change.
9338         * win32-low.c (win32_detach, win32_resume): Ditto.
9339
9340 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9341
9342         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9343         flag.
9344         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9345         pending.
9346         (linux_continue_one_thread): Only preserve the stepping flag if
9347         there's a pending breakpoint.
9348
9349 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
9350
9351         * server.c (main): After the inferior having exited, call
9352         remote_close before exiting gdbserver.
9353
9354 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
9355
9356         Fix size of FPSCR in Power 7 processors.
9357         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9358         (PPC_FEATURE_HAS_DFP): New #define.
9359         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9360         size of the FPSCR.
9361
9362 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
9363
9364         * server.c (handle_query) Whitespace and formatting.
9365
9366 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
9367
9368         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9369         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9370         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9371         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9372         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9373         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9374         Makefile.in, configure.ac: Fix whitespace throughout.
9375         * configure: Regenerate.
9376
9377 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
9378
9379         * inferiors.c (find_inferior): Make it safe for the callback
9380         function to delete the currently iterated inferior.
9381
9382 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
9383
9384         * Makefile.in (linuw_low_h): Move higher.
9385         (thread-db.o): Depend on $(linux_low_h).
9386
9387 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
9388
9389         Rename "process" to "lwp" throughout.
9390
9391         * linux-low.c (all_processes): Rename to...
9392         (all_lwps): ... this.
9393         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9394         (add_process): Rename to ...
9395         (add_lwp): ... this.  Adjust.
9396         (linux_create_inferior): Adjust.
9397         (linux_attach_lwp): Adjust.
9398         (linux_attach): Adjust.
9399         (linux_kill_one_process): Rename to ...
9400         (linux_kill_one_lwp): ... this.  Adjust.
9401         (linux_kill): Adjust.
9402         (linux_detach_one_process): Rename to ...
9403         (linux_detach_one_lwp): ... this.  Adjust.
9404         (linux_detach): Adjust.
9405         (check_removed_breakpoint): Adjust.
9406         (status_pending_p): Adjust.
9407         (linux_wait_for_process): Rename to ...
9408         (linux_wait_for_lwp): ... this.  Adjust.
9409         (linux_wait_for_event): Adjust.
9410         (send_sigstop): Adjust.
9411         (wait_for_sigstop): Adjust.
9412         (stop_all_processes): Rename to ...
9413         (stop_all_lwps): ... this.
9414         (linux_resume_one_process): Rename to ...
9415         (linux_resume_one_lwp): ... this.  Adjust.
9416         (linux_set_resume_request, linux_continue_one_thread)
9417         (linux_queue_one_thread, resume_status_pending_p)
9418         (usr_store_inferior_registers, regsets_store_inferior_registers)
9419         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9420         Adjust.
9421         * linux-low.h (get_process): Rename to ...
9422         (get_lwp): ... this.  Adjust.
9423         (get_thread_process): Rename to ...
9424         (get_thread_lwp): ... this.  Adjust.
9425         (get_process_thread): Rename to ...
9426         (get_lwp_thread): ... this.  Adjust.
9427         (struct process_info): Rename to ...
9428         (struct lwp_info): ... this.
9429         (all_processes): Rename to ...
9430         (all_lwps): ... this.
9431         * proc-service.c (ps_lgetregs): Adjust.
9432         * thread-db.c (thread_db_create_event, find_one_thread)
9433         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9434
9435 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
9436
9437         * server.c (handle_query): Handle "qAttached".
9438
9439 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
9440
9441         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9442         GPLv3, update license URL.
9443
9444 2009-03-01  Doug Evans  <dje@google.com>
9445
9446         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9447         (server_h): Add gdb_signals.h.
9448         (signals.o): Update.
9449         * server.h (target_signal_from_host,target_signal_to_host_p)
9450         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9451
9452 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
9453
9454         * remote-utils.c (getpkt): Also generate remote-debug
9455         information if noack_mode is set.
9456
9457 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
9458
9459         * server.c (handle_query): Report qXfer:siginfo:read and
9460         qXfer:siginfo:write as supported and handle them.
9461         * target.h (struct target_ops) <qxfer_siginfo>: New field.
9462         * linux-low.c (linux_xfer_siginfo): New.
9463         (linux_target_ops): Set it.
9464
9465 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
9466
9467         * server.c (gdbserver_usage): Mention --remote-debug.
9468         (main): Accept '--remote-debug' switch.
9469
9470 2009-01-18  Doug Evans  <dje@google.com>
9471
9472         * regcache.c (new_register_cache): No need to check result of xcalloc.
9473         * server.c (handle_search_memory): Back out calls to xmalloc,
9474         result is checked and error is returned to user upon failure.
9475         (handle_query): Ditto.  Add more checks for result of malloc.
9476         (handle_v_cont): Check result of malloc, report error back to
9477         user upon failure.
9478         (handle_v_run): Ditto.  Call freeargv.
9479         * server.h (freeargv): Declare.
9480         * utils.c (freeargv): New fn.
9481
9482 2009-01-15  Doug Evans  <dje@google.com>
9483
9484         * gdbreplay.c (perror_with_name): Make arg const char *.
9485         * server.h (target_signal_to_name): Make return type const char *.
9486         * thread-db.c (thread_db_err_str): Make return type const char *.
9487         * utils.c (perror_with_name): Make arg const char *.
9488
9489 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
9490
9491         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9492         when handling a EXIT_PROCESS_DEBUG_EVENT.
9493
9494 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
9495
9496         * gdbreplay.c (gdbreplay_version): Update copyright year.
9497         * server.c (gdbserver_version): Likewise.
9498
9499 2009-01-05  Doug Evans  <dje@google.com>
9500
9501         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9502         (handle_extended_wait): Improve comment.
9503
9504 2008-12-13  Doug Evans  <dje@google.com>
9505
9506         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9507         * server.h (ATTR_MALLOC): New macro.
9508         (xmalloc,xcalloc,xstrdup): Declare.
9509         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9510         * inferiors.c: Ditto.
9511         * linux-low.c: Ditto.
9512         * mem-break.c: Ditto.
9513         * regcache.c: Ditto.
9514         * remote-utils.c: Ditto.
9515         * server.c: Ditto.
9516         * target.c: Ditto.
9517         * win32-low.c: Ditto.
9518
9519 2008-12-12  Doug Evans  <dje@google.com>
9520
9521         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9522         in debugging printf.
9523
9524         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9525
9526 2008-12-09  Doug Evans  <dje@google.com>
9527
9528         * linux-low.h (struct process_info): Delete member tid, unused.
9529         * thread-db.c (find_one_thread): Update.
9530         (maybe_attach_thread): Update.
9531
9532 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
9533
9534         * target.h (struct target_ops): Add qxfer_osdata member.
9535         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9536         and dirent.h.
9537         (linux_qxfer_osdata): New functions.
9538         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9539         callback.
9540         * server.c (handle_query): Handle "qXfer:osdata:read:".
9541         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9542         (buffer_xml_printf): New functions.
9543         * server.h (struct buffer): New.
9544         (buffer_grow_str, buffer_grow_str0): New macros.
9545         (buffer_grow, buffer_free, buffer_init, buffer_finish)
9546         (buffer_xml_printf): Declare.
9547
9548 2008-11-24  Doug Evans  <dje@google.com>
9549
9550         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9551
9552 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
9553
9554         * server.c (handle_v_run): Always use the supplied argument list.
9555
9556 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
9557
9558         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9559         (xtensa_regmap_table): Add entry for scompare1.
9560
9561 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
9562
9563         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9564         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9565         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9566         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9567         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9568         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9569         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9570         XML target descriptions.
9571         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9572         when inferior is running on an ISA 2.05 or later processor.  Add
9573         special case to return offset for full 64-bit slot of FPSCR when
9574         in 32-bits.
9575
9576 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
9577
9578         * Makefile.in (SFILES, clean): Added sparc64 files.
9579         (reg-sparc64.o, reg-sparc64.c): New.
9580         * configure.srv (sparc*-*-linux*): New configuration.
9581         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9582         syscall arguments for SPARC.
9583         (regsets_store_inferior_registers): Likewise.
9584         * linux-sparc-low.c: New file.
9585
9586 2008-10-21  Doug Evans  <dje@google.com>
9587
9588         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9589         (READLINE_DIR,READLINE_DEP): Delete.
9590         (INTERNAL_CFLAGS): Update.
9591         (LINTFLAGS): Update.
9592
9593 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
9594
9595         * server.c (handle_v_run): If GDB didn't specify an argv, use the
9596         whole argv from the last run, not just argv[0].
9597
9598 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
9599
9600         * regcache.c (new_register_cache): Return NULL if the register
9601         cache size isn't known yet.
9602         (free_register_cache): Avoid dereferencing a NULL regcache.
9603
9604 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
9605
9606         * configure.srv: Merge MIPS and MIPS64.
9607
9608 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
9609
9610         * Makefile.in (uninstall): Apply $(EXEEXT) too.
9611
9612 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
9613
9614         * Makefile.in: Add required vsx dependencies.
9615
9616         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9617         Declare init_registers_powerpc_vsx32l.
9618         Declare init_registers_powerpc_vsx64l.
9619         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9620         (ppc_arch_setup): Check for VSX in hwcap.
9621         (ppc_fill_vsxregset): New function.
9622         (ppc_store_vsxregset): New function.
9623         Add new VSX entry in regset_info target_regsets.
9624
9625         * configure.srv: Add new VSX dependencies.
9626
9627 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
9628
9629         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9630         (remote_open): Set or clear transport_is_reliable.
9631         (putpkt_binary): Don't expect acks in noack mode.
9632         (getpkt): Don't send ack/nac in noack mode.
9633         * server.c (handle_general_set): Handle QStartNoAckMode.
9634         (handle_query): If connected by tcp pass QStartNoAckMode+ in
9635         qSupported.
9636         (main): Reset noack_mode on every connection.
9637         * server.h (noack_mode): Declare.
9638
9639 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9640
9641         * Makefile.in (GDBREPLAY_OBS): New variable.
9642         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9643
9644 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
9645             Daniel Jacobowitz  <dan@codesourcery.com>
9646
9647         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9648         (usr_store_inferior_registers): Likewise.
9649         (regsets_store_inferior_registers): Likewise.
9650
9651 2008-07-31  Rolf Jansen  <rj@surtec.com>
9652             Pedro Alves  <pedro@codesourcery.com>
9653
9654         * configure.ac: Check for memmem declaration.
9655         * server.c [HAVE_MALLOC_H]: Include malloc.h.
9656         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9657         (disable_packet_qfThreadInfo): Unconditionally compile.
9658         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9659         * configure, config.in: Regenerate.
9660
9661 2008-07-28  Doug Kwan  <dougkwan@google.com>
9662
9663         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9664         (linux_write_memory): Remove declaration of errno.
9665
9666 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
9667
9668         * linux-low.c (handle_extended_wait): Do not use "status"
9669         variable uninitialized.
9670
9671 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
9672
9673         * server.c (handle_v_attach): Inhibit reporting dll changes.
9674
9675 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
9676
9677         * remote-utils.c (prepare_resume_reply): If requested, don't
9678         output "thread:TID" in the T stop reply.
9679
9680         * server.c (disable_packet_vCont, disable_packet_Tthread)
9681         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9682         (handle_query): If requested, disable support for qC, qfThreadInfo
9683         and qsThreadInfo.
9684         (handle_v_requests): If requested, disable support for vCont.
9685         (gdbserver_show_disableable): New.
9686         (main): Handle --disable-packet and --disable-packet=LIST.
9687
9688         * server.h (disable_packet_vCont, disable_packet_Tthread)
9689         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9690
9691 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
9692
9693         * server.c (gdbserver_usage): Mention --version.
9694
9695 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
9696
9697         * Makefile.in (gdbreplay.o): New rule.
9698
9699 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
9700
9701         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9702         message, not gdbserver.
9703
9704 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
9705             Nathan Sidwell  <nathan@codesourcery.com>
9706             Joseph Myers  <joseph@codesourcery.com>
9707
9708         * acinclude.m4: Include ../../config/acx.m4.
9709         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9710         * configure, config.in: Regenerate.
9711         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9712         * server.c (gdbserver_version): Print PKGVERSION.
9713         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
9714         (main): Adjust gdbserver_usage calls.
9715         * gdbreplay.c (version, host_name): Add declarations.
9716         (gdbreplay_version, gdbreplay_usage): New.
9717         (main): Accept --version and --help options.
9718
9719 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
9720
9721         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9722         (arm_breakpoint_at): Handle Thumb.
9723         (the_low_target): Add comment.
9724
9725 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
9726
9727         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9728
9729 2008-05-09  Doug Evans  <dje@google.com>
9730
9731         * server.h (decode_search_memory_packet): Declare.
9732         * remote-utils.c (decode_search_memory_packet): New fn.
9733         * server.c (handle_search_memory_1): New fn.
9734         (handle_search_memory): New fn.
9735         (handle_query): Process qSearch:memory packets.
9736
9737 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9738
9739         * regcache.c (registers_length): Remove.
9740         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9741         full register packet.
9742         * regcache.h (registers_length): Remove prototype.
9743         * server.h (PBUFSIZ): Define to 16384.
9744
9745 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
9746
9747         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9748         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9749         powerpc-64l.o, and powerpc-altivec64l.o.
9750         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9751         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9752         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9753         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9754         rs6000/power-linux.xml, and rs6000/power64-linux.xml
9755         to srv_xmlfiles.
9756
9757         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9758         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9759         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9760         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9761         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9762         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9763         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9764         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9765         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9766         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9767         (clean): Update.
9768
9769         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9770         (init_registers_powerpc_32l): ... this new prototype.
9771         (init_registers_powerpc_32): Remove, replace by ...
9772         (init_registers_powerpc_altivec32l): ... this new prototype.
9773         (init_registers_powerpc_e500): Remove, replace by ...
9774         (init_registers_powerpc_e500l): ... this new prototype.
9775         (init_registers_ppc64): Remove, replace by ...
9776         (init_registers_powerpc_64l): ... this new prototype.
9777         (init_registers_powerpc_64): Remove, replace by ...
9778         (init_registers_powerpc_altivec64l): ... this new prototype.
9779         (ppc_num_regs): Set to 73.
9780         (PT_ORIG_R3, PT_TRAP): Define if necessary.
9781         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9782         (ppc_cannot_store_register): Handle orig_r3 and trap.
9783         (ppc_arch_setup): Update init_registers_... calls.
9784         (ppc_fill_gregset): Handle orig_r3 and trap.
9785
9786         * inferiors.c (clear_inferiors): Reset current_inferior.
9787
9788 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
9789
9790         * acinclude.m4: Add override.m4.
9791         * configure: Regenerate.
9792
9793 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
9794
9795         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9796         initial call to init_register_ppc64.
9797
9798 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
9799
9800         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9801         single powerpc*-*-linux* case.
9802         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9803
9804 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
9805
9806         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9807         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9808         from reg_xmlfiles.
9809         * linux-ppc-low.c: Include <elf.h>.
9810         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9811         (ppc_hwcap): New global variable.
9812         (ppc_regmap): Remove __SPE__ #ifdef sections.
9813         (ppc_regmap_e500): New global variable.
9814         (ppc_cannot_store_register): Update __SPE__ special case.
9815         (ppc_get_hwcap): New function.
9816         (ppc_arch_setup): Use it to determine whether inferior supports
9817         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
9818         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9819         Do not access registers if target does not support AltiVec.
9820         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9821         Do not access registers if target does not support SPE.
9822         (target_regsets): Unconditionally include AltiVec and SPE regsets.
9823
9824 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
9825
9826         * linux-low.c (disabled_regsets, num_regsets): New.
9827         (use_regsets_p): Delete.
9828         (linux_wait_for_process): Clear disabled_regsets.
9829         (regsets_fetch_inferior_registers): Check and set it.
9830         (regsets_store_inferior_registers): Likewise.
9831         (linux_fetch_registers, linux_store_registers): Do not use
9832         use_regsets_p.
9833         (initialize_low): Allocate disabled_regsets.
9834
9835 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
9836
9837         * Makefile.in (LIBOBJS): New.
9838         (OBS): Use LIBOBJS.
9839         (memmem.o): New rule.
9840         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9841         * configure: Regenerated.
9842
9843 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
9844
9845         * server.c (handle_query): Never return "unsupported" for
9846         qXfer:features:read queries.
9847
9848 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
9849
9850         * server.c (get_features_xml): Fix inverted condition.
9851         (handle_query): Always support qXfer:feature:read.
9852
9853 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
9854
9855         * server.c (wrapper_argv): New.
9856         (start_inferior): Handle wrapper_argv.  If set, expect an extra
9857         trap.
9858         (gdbserver_usage): Document --wrapper.
9859         (main): Parse --wrapper.
9860
9861 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9862
9863         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9864         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9865         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9866         (ppc_set_pc): Likewise.
9867         (ppc_arch_setup): New function.
9868         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9869         of collect_register.
9870         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9871
9872 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9873
9874         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9875         instead of linux-ppc64-low.o.
9876         * linux-ppc64-low.c: Remove file.
9877         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9878         (linux-ppc64-low.o): Remove rule.
9879
9880         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9881         (init_registers_powerpc_64): Likewise.
9882         (ppc_regmap): Conditionally define depending on __powerpc64__.
9883         (ppc_cannot_store_register): Do not special-case "fpscr" when
9884         compiled on __powerpc64__.
9885         (ppc_collect_ptrace_register): New function.
9886         (ppc_supply_ptrace_register): New function.
9887         (ppc_breakpoint): Change type to "unsigned int".
9888         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9889         (the_low_target): Conditionally provide initializers for the
9890         arch_setup member depending on __powerpc64__.  Install
9891         collect_ptrace_register and supply_ptrace_register members.
9892
9893 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9894
9895         * regcache.h (gdbserver_xmltarget): Add extern declaration.
9896         * server.c (gdbserver_xmltarget): Define.
9897         (get_features_xml): Use it to replace "target.xml" and arch_string.
9898
9899         * configure.srv: Remove srv_xmltarget.  Add XML files that were
9900         mentioned there to srv_xmlfiles instead.  Remove conditional tests
9901         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9902         srv_xmlfiles and srv_regobj to include all possible choices.
9903         * configure.ac (srv_xmltarget): Remove.
9904         (srv_xmlfiles): Do not add "target.xml".
9905         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9906         checks for supplementary target information.
9907         * configure: Regenerate.
9908         * Makefile.in (XML_TARGET): Remove.
9909         (target.xml): Remove rule.
9910         (clean): Do not clean up target.xml.
9911         (.PRECIOUS): Do not mention target.xml.
9912
9913         * target.h (struct target_ops): Remove arch_string member.
9914         * linux-low.c (linux_arch_string): Remove.
9915         (linux_target_ops): Remove arch_string initializer.
9916         * linux-low.h (struct linux_target_ops): Remove arch_string member.
9917         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9918         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9919         * spu-low.c (spu_arch_string): Remove.
9920         (spu_target_ops): Remove arch_string initializer.
9921         * win32-low.c (win32_arch_string): Remove.
9922         (win32_target_ops): Remove arch_string initializer.
9923         * win32-low.h (struct win32_target_ops): Remove arch_string member.
9924         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9925         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9926
9927 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
9928
9929         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9930         by collect_ptrace_register and supply_ptrace_register hooks.
9931         * linux-low.c (fetch_register): Use supply_ptrace_register callback
9932         instead of checking for the_low_target.left_pad_xfer.
9933         (usr_store_inferior_registers): Use collect_ptrace_register callback
9934         instead of checking for the_low_target.left_pad_xfer.
9935
9936         * linux-s390-low.c (s390_collect_ptrace_register): New function.
9937         (s390_supply_ptrace_register): Likewise.
9938         (s390_fill_gregset): Call s390_collect_ptrace_register.
9939         (the_low_target): Update.
9940
9941         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9942         (ppc_supply_ptrace_register): Likewise.
9943         (the_low_target): Update.
9944
9945         * linux-i386-low.c (the_low_target): Update.
9946         * linux-x86-64-low.c (the_low_target): Update.
9947
9948 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
9949
9950         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9951         reg-s390.o and reg-s390x.o.
9952
9953         * linux-low.c (new_inferior): New global variable.
9954         (linux_create_inferior, linux_attach): Set it.
9955         (linux_wait_for_process): Call the_low_target.arch_setup after the
9956         target has stopped for the first time.
9957         (initialize_low): Do not call the_low_target.arch_setup.
9958
9959         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9960         (s390_set_pc): Likewise.
9961         (s390_arch_setup): New function.
9962         (the_low_target): Use s390_arch_setup as arch_setup routine.
9963
9964         * regcache.c (realloc_register_cache): New function.
9965         (set_register_cache): Call it for each existing regcache.
9966
9967 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
9968
9969         * server.h (init_registers): Remove prototype.
9970
9971         * linux-low.h (struct linux_target_ops): Add arch_setup field.
9972         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9973         instead of init_registers ().
9974         * linux-arm-low.c (init_registers_arm): Add prototype.
9975         (init_registers_arm_with_iwmmxt): Likewise.
9976         (the_low_target): Add initializer for arch_setup field.
9977         * linux-cris-low.c (init_registers_cris): Add prototype.
9978         (the_low_target): Add initializer for arch_setup field.
9979         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9980         (the_low_target): Add initializer for arch_setup field.
9981         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9982         (the_low_target): Add initializer for arch_setup field.
9983         * linux-ia64-low.c (init_registers_ia64): Add prototype.
9984         (the_low_target): Add initializer for arch_setup field.
9985         * linux-m32r-low.c (init_registers_m32r): Add prototype.
9986         (the_low_target): Add initializer for arch_setup field.
9987         * linux-m68k-low.c (init_registers_m68k): Add prototype.
9988         (the_low_target): Add initializer for arch_setup field.
9989         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9990         (init_registers_mips64_linux): Likewise.
9991         (the_low_target): Add initializer for arch_setup field.
9992         * linux-ppc-low.c (init_registers_ppc): Add prototype.
9993         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9994         (the_low_target): Add initializer for arch_setup field.
9995         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9996         (init_registers_powerpc_64): Likewise.
9997         (the_low_target): Add initializer for arch_setup field.
9998         * linux-s390-low.c (init_registers_s390): Add prototype.
9999         (init_registers_s390x): Likewise.
10000         (the_low_target): Add initializer for arch_setup field.
10001         * linux-sh-low.c (init_registers_sh): Add prototype.
10002         (the_low_target): Add initializer for arch_setup field.
10003         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10004         (the_low_target): Add initializer for arch_setup field.
10005         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10006         (the_low_target): Add initializer for arch_setup field.
10007
10008         * win32-low.h (struct win32_target_ops): Add arch_setup field.
10009         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10010         instead of init_registers ().
10011         * win32-arm-low.c (init_registers_arm): Add prototype.
10012         (the_low_target): Add initializer for arch_setup field.
10013         * win32-i386-low.c (init_registers_i386): Add prototype.
10014         (the_low_target): Add initializer for arch_setup field.
10015
10016         * spu-low.c (init_registers_spu): Add prototype.
10017         (initialize_low): Call initialie_registers_spu () instead of
10018         initialize_registers ().
10019
10020 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
10021
10022         * server.c (handle_v_requests): When handling the vRun and vAttach
10023         packets, if already debugging a process, don't kill it.  Return an
10024         error instead.
10025
10026 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
10027
10028         * server.c (handle_query): Correct length check.
10029
10030 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
10031
10032         * win32-low.c (do_initial_child_stuff): Add process handle
10033         parameter.  Set current_process_handle and current_process_id from the
10034         parameters. Clear globals.
10035         (win32_create_inferior): Don't set current_process_handle and
10036         current_process_id here.  Instead pass them on the call to
10037         do_initial_child_stuff.
10038         (win32_attach): Likewise.
10039         (win32_clear_inferiors): New.
10040         (win32_kill): Don't close the current process handle or the
10041         current thread handle here.  Instead call win32_clear_inferiors.
10042         (win32_detach): Don't open a new handle to the process.  Call
10043         win32_clear_inferiors.
10044         (win32_join): Don't rely on current_process_handle; open a new
10045         handle using the process id.
10046         (win32_wait): Call win32_clear_inferiors when the inferior process
10047         has exited.
10048
10049 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
10050
10051         * server.c (monitor_show_help): Add "exit".
10052
10053 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
10054
10055         * Makefile.in (SFILES): Add linux-xtensa-low.c.
10056         (clean): Add reg-xtensa.c.
10057         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10058         * configure.srv (xtensa*-*-linux*) New target.
10059         * linux-xtensa-low.c: New.
10060         * xtensa-xtregs.c: New.
10061
10062 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
10063
10064         * hostio.c: Don't include errno.h.
10065         (errno_to_fileio_errno): Move to hostio-errno.
10066         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
10067         error number outputting to the target->hostio_last_error callback.
10068         (hostio_packet_error): Use FILEIO_EINVAL directly.
10069         (handle_open, handle_pread, hostio_error, handle_unlink): Update
10070         calls to hostio_error.
10071         * hostio-errno.c: New.
10072         * server.h (hostio_last_error_from_errno): Declare.
10073         * target.h (target_ops): Add hostio_last_error member.
10074         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10075         as hostio_last_error handler.
10076         * spu-low.c (spu_target_ops): Likewise.
10077         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10078         (wince_hostio_last_error): New functions.
10079         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10080         as hostio_last_error handler.
10081         (win32_target_ops) [!_WIN32_WCE]: Register
10082         hostio_last_error_from_errno as hostio_last_error handler.
10083         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10084         (hostio-errno.o): New rule.
10085         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10086         * configure.srv (srv_hostio_err_objs): New variable.  Default to
10087         hostio-errno.o.
10088         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10089         * configure: Regenerate.
10090
10091 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10092
10093         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10094         (linux_kill, linux_detach): Clean up the process list.
10095         * remote-utils.c (remote_open): Improve port number parsing.
10096         (putpkt_binary, input_interrupt): Only send interrupts if the target
10097         is running.
10098         * server.c (extended_protocol): Make static.
10099         (attached): Define earlier.
10100         (exit_requested, response_needed, program_argv): New variables.
10101         (target_running): New.
10102         (start_inferior): Clear attached here.
10103         (attach_inferior): Set attached here.
10104         (require_running): Define.
10105         (handle_query): Use require_running and target_running.  Implement
10106         "monitor exit".
10107         (handle_v_attach, handle_v_run): New.
10108         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
10109         (gdbserver_usage): Update.
10110         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
10111         --attach along with other options or after the port.  Save
10112         program_argv.  Support no initial program.  Resynchronize
10113         communication with GDB after an error.  Handle "monitor exit".
10114         Use require_running and target_running.  Always allow the extended
10115         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
10116         restart in extended mode.
10117         * README: Refer to the GDB manual.  Update --attach usage.
10118
10119 2007-12-20  Andreas Schwab  <schwab@suse.de>
10120
10121         * linux-low.c (STACK_SIZE): Define.
10122         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
10123         (linux_test_for_tracefork): Likewise.
10124
10125 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
10126
10127         * linux-low.c (linux_wait_for_event): Update messages.  Do not
10128         reinsert auto-delete breakpoints.
10129         * mem-break.c (struct breakpoint): Change return type of handler to
10130         int.
10131         (set_breakpoint_at): Update handler type.
10132         (reinsert_breakpoint_handler): Return 1 instead of calling
10133         delete_breakpoint.
10134         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10135         setting a new one.
10136         (check_breakpoints): Delete auto-delete breakpoints and return 2.
10137         * mem-break.h (set_breakpoint_at): Update handler type.
10138         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10139         * win32-low.c (auto_delete_breakpoint): New.
10140         (get_child_debug_event): Use it.
10141
10142 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
10143
10144         * configure.ac: Check for pread and pwrite.
10145         * hostio.c (handle_pread): Fall back to lseek and read.
10146         (handle_pwrite): Fall back to lseek and write.
10147         * config.in, configure: Regenerated.
10148
10149 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
10150
10151         * server.c (myresume): Add own_buf argument.
10152         (main): Update calls.
10153
10154 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
10155
10156         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10157         * remote-utils.c (remote_open): Do not call disable_async_io.
10158         (block_async_io): Delete.
10159         (unblock_async_io): Make static.
10160         (initialize_async_io): New.
10161         * server.c (handle_v_cont): Handle async I/O here.
10162         (myresume): Likewise.  Move other common resume tasks here...
10163         (main): ... from here.  Call initialize_async_io.  Disable async
10164         I/O before the main loop.
10165         * server.h (initialize_async_io): Declare.
10166         (block_async_io, unblock_async_io): Delete prototypes.
10167         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10168
10169 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
10170
10171         * remote-utils.c (readchar): Allow binary data in received messages.
10172
10173 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10174
10175         * win32-low.c (attaching): New global.
10176         (win32_create_inferior): Clear the `attaching' global.
10177         (win32_attach): Set the `attaching' global.
10178         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10179         attaching.  Only set a breakpoint at the entry point if not
10180         attaching.
10181
10182 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10183
10184         * server.c (main): Don't report dll events on the initial
10185         connection on attaches.
10186
10187 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10188
10189         * server.c (main): Relax numerical bases supported for the pid of
10190         the --attach command line argument.
10191
10192 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10193
10194         * win32-low.c (win32_attach): Call OpenProcess before
10195         DebugActiveProcess, not after.  Add last error output to error
10196         call.
10197
10198 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10199
10200         * win32-low.c (win32_get_thread_context)
10201         (win32_set_thread_context): New functions.
10202         (thread_rec): Use win32_get_thread_context.
10203         (continue_one_thread, win32_resume): Use win32_set_thread_context.
10204         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10205         field.
10206
10207 2007-12-03  Leo Zayas
10208             Pedro Alves  <pedro_alves@portugalmail.pt>
10209
10210         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10211         global variables.
10212         (child_add_thread): Minor cleanup.
10213         (child_continue): Resume artificially suspended threads before
10214         calling ContinueDebugEvent.
10215         (suspend_one_thread): New.
10216         (fake_breakpoint_event): New.
10217         (get_child_debug_event): Change return type to int.  Check here if
10218         gdb sent an interrupt request.  If a soft interrupt was requested,
10219         fake a breakpoint event.  Return 0 if there is no event to handle,
10220         and 1 otherwise.
10221         (win32_wait): Don't check here if gdb sent an interrupt request.
10222         Ensure there is a valid event to handle.
10223         (win32_request_interrupt): Add soft interruption method as last
10224         resort.
10225
10226 2007-12-03  Leo Zayas
10227             Pedro Alves  <pedro_alves@portugalmail.pt>
10228
10229         * win32-low.h (win32_thread_info): Add descriptions to the
10230         structure members.  Replace `suspend_count' counter by a
10231         `suspended' flag.
10232         * win32-low.c (thread_rec): Update condition of when to get the
10233         context from the inferior.  Rely on ContextFlags being set if it
10234         has already been retrieved.  Only suspend the inferior thread if
10235         we haven't already.  Warn if that fails.
10236         (continue_one_thread): s/suspend_count/suspended/.  Only call
10237         ResumeThread once.  Warn if that fails.
10238
10239 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
10240
10241         * win32-low.c (win32_wait): Don't read from the inferior when it
10242         has already exited.
10243
10244 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
10245
10246         * Makefile.in (win32_low_h): New variable.
10247         (win32-low.o): Add dependency on $(win32_low_h).
10248         (win32-arm-low.o, win32-i386-low.o): New rules.
10249
10250 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
10251
10252         * hostio.c: Correct copyright year.
10253
10254 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
10255
10256         * Makefile.in (OBS): Add hostio.o.
10257         (hostio.o): New rule.
10258         * server.h (handle_vFile): Declare.
10259         * hostio.c: New file.
10260         * server.c (handle_v_requests): Take packet_len and new_packet_len
10261         for binary packets.  Call handle_vFile.
10262         (main): Update call to handle_v_requests.
10263
10264 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
10265
10266         * linux-low.c: Include <sched.h>.
10267
10268 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
10269
10270         * linux-low.c (linux_tracefork_grandchild): New.
10271         (linux_tracefork_child): Use clone.
10272         (linux_test_for_tracefork): Use clone; allocate and free a stack.
10273
10274 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
10275
10276         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10277
10278 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
10279
10280         * linux-low.c (handle_extended_wait): Handle unexpected signals.
10281
10282 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
10283
10284         * inferiors.c (change_inferior_id): Delete.
10285         (add_pid_to_list, pull_pid_from_list): New.
10286         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10287         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10288         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10289         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10290         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10291         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10292         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10293         (using_threads): Always set to 1.
10294         (handle_extended_wait): New.
10295         (add_process): Do not set TID.
10296         (linux_create_inferior): Set must_set_ptrace_flags.
10297         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
10298         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
10299         (linux_thread_alive): Rename TID argument to LWPID.
10300         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
10301         (linux_wait_for_event): Do not use TID or check using_threads.  Update
10302         call to dead_thread_notify.  Call handle_extended_wait.
10303         (linux_create_inferior): Use PTRACE_SETOPTIONS.
10304         (send_sigstop): Delete sigstop_sent.
10305         (wait_for_sigstop): Avoid TID.
10306         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10307         (linux_test_for_tracefork): New.
10308         (linux_lookup_signals): Use thread_db_active and
10309         linux_supports_tracefork_flag.
10310         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10311         * linux-low.h (get_process_thread): Avoid TID.
10312         (struct process_ifo): Move thread_known and tid to the end.  Remove
10313         sigstop_sent.
10314         (linux_attach_lwp, thread_db_init): Update prototypes.
10315         * server.h (change_inferior_id): Delete prototype.
10316         (add_pid_to_list, pull_pid_from_list): New prototypes.
10317         * thread-db.c (thread_db_use_events): New.
10318         (find_first_thread): Rename to...
10319         (find_one_thread): ...this.  Update callers and messages.  Do not
10320         call fatal.  Check thread_db_use_events.  Do not call
10321         change_inferior_id or new_thread_notify.
10322         (maybe_attach_thread): Update.  Do not call new_thread_notify.
10323         (thread_db_init): Set thread_db_use_events.  Check use_events.
10324         * utils.c (fatal, warning): Correct message prefix.
10325
10326 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
10327
10328         * Makefile.in (clean): Remove new files.
10329         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10330         (powerpc-64.o, powerpc-64.c): New rules.
10331         * configure.srv: Use alternate register sets for powerpc64-*-linux*
10332         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10333         with SPE.
10334         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10335         SPE targets.
10336         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10337         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10338         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10339         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10340         (target_regsets): Add AltiVec and SPE register sets.
10341         * configure.ac: Check for AltiVec and SPE.
10342         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10343         (ppc_fill_vrregset, ppc_store_vrregset): New.
10344         (target_regsets): Add AltiVec register set.
10345         * configure: Regenerated.
10346
10347 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
10348
10349         * linux-low.c (O_LARGEFILE): Define.
10350         (linux_read_memory): Use /proc/PID/mem.
10351         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
10352         * configure, config.in: Regenerated.
10353
10354 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10355
10356         * linux-low.c (linux_wait_for_event): Do not pass signals while
10357         single-stepping.
10358
10359 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10360
10361         * win32-low.c (create_process): New.
10362         (win32_create_inferior): Use create_process instead of
10363         CreateProcess.  If create_process failed retry appending an ".exe"
10364         suffix.  Store the GetLastError result immediatelly after
10365         create_process calls and use it on the call to error.
10366
10367 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10368
10369         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10370
10371 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
10372
10373         * configure.ac: Switch license to GPLv3.
10374
10375 2007-08-01  Michael Snyder  <msnyder@access-company.com>
10376
10377         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10378
10379 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
10380
10381         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10382         typedef.
10383         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10384         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
10385         CloseToolhelp32Snapshot.
10386         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10387         CloseToolhelp32Snapshot.
10388
10389 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
10390
10391         * server.c (main): Check for inferior exit before main loop.
10392
10393 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
10394
10395         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10396         instead of on tmp_desc.
10397
10398 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
10399             Daniel Jacobowitz  <dan@codesourcery.com>
10400
10401         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10402         (add_thread): Minor cleanups.
10403         (clear_inferiors): Move lower in the file.  Clear the DLL
10404         list.
10405         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10406         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10407         (xml_escape_text): New.
10408         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
10409         for qSupported.
10410         (handle_v_cont): Report errors.
10411         (gdbserver_version): Update.
10412         (main): Correct size of own_buf.  Do not report initial DLL events.
10413         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10414         (unloaded_dll, xml_escape_text): New.
10415         * win32-low.c (enum target_waitkind): Update comments.
10416         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10417         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10418         (win32_EnumProcessModules, win32_GetModuleInformation)
10419         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10420         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10421         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10422         (win32_Module32First, win32_Module32Next, load_toolhelp)
10423         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10424         (get_child_debug_event): Handle DLL events.
10425         (win32_wait): Likewise.
10426
10427 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
10428
10429         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10430         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10431
10432 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
10433
10434         * win32-low.c (handle_output_debug_string): Ignore event if not
10435         waiting.
10436
10437 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
10438
10439         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10440
10441 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
10442
10443         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10444
10445 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
10446
10447         * inferiors.c (change_inferior_id): Add comment.
10448         * linux-low.c (check_removed_breakpoint): Add an early
10449         prototype.  Improve debug output.
10450         (linux_attach): Doc update.
10451         (linux_detach_one_process, linux_detach): Clean up before releasing
10452         each process.
10453         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10454         * linux-low.h (struct process_info): Doc improvement.
10455         * mem-break.c (delete_all_breakpoints): New.
10456         * mem-break.h (delete_all_breakpoints): New prototype.
10457         * thread-db.c (find_first_thread): New.
10458         (thread_db_create_event): Call it instead of
10459         thread_db_find_new_threads.  Clean up unused variables.
10460         (maybe_attach_thread): Remove first thread handling.
10461         (thread_db_find_new_threads): Use find_first_thread.
10462         (thread_db_get_tls_address): Likewise.
10463
10464 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
10465
10466         * thread-db.c (thread_db_find_new_threads): Add prototype.
10467         (thread_db_create_event): Check for the main thread before adding
10468         a new thread.
10469         (maybe_attach_thread): Only enable event reporting if TID == 0.
10470         (thread_db_get_tls_address): Check for new threads.
10471
10472 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
10473
10474         * linux-low.c (linux_create_inferior): Try execv before execvp.
10475         * spu-low.c (spu_create_inferior): Likewise.
10476
10477 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
10478
10479         * linux-low.c (linux_create_inferior): Change execv to execvp.
10480         * spu-low.c (spu_create_inferior): Likewies.
10481
10482 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
10483
10484         * Makefile.in (clean): Clean new files instead of deleted ones.
10485         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10486         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10487         rules.
10488         * configure.srv: Specify XML files and new regformats for MIPS and
10489         MIPS64 GNU/Linux.
10490         * linux-mips-low.c (mips_num_regs): Set to only used registers.
10491         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
10492         an entry for the restart register.
10493         (mips_cannot_fetch_register, mips_cannot_store_register)
10494         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10495         register names to match the XML descriptions.
10496         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
10497         restart register instead of $0.
10498
10499 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
10500             Markus Deuling  <deuling@de.ibm.com>
10501
10502         * remote-utils.c (decode_xfer_write): New function.
10503         * server.h (decode_xfer_write): Add prototype.
10504         * server.c (handle_query): Add PACKET_LEN argument.  Support
10505         qXfer:spu:read and qXfer:spu:write packets.
10506         (main): Pass packet_len to handle_query.
10507         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10508         * target.h (target_ops): Add qxfer_spu.
10509
10510 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
10511
10512         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10513         accessing non-seekable spufs files.
10514
10515 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
10516
10517         * server.c (handle_query): Add reply for qC packet.
10518
10519 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10520             Leo Zayas  <lerele@champenstudios@com>
10521
10522         * server.h (check_remote_input_interrupt_request): New function.
10523         * remote_utils.c (INVALID_DESCRIPTOR): New define.
10524         (remote_desc): Initialize with INVALID_DESCRIPTOR.
10525         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
10526         (check_remote_input_interrupt_request): New function.
10527         * server.h (check_remote_input_interrupt_request): Declare.
10528         * win32-low.c (winapi_DebugBreakProcess,
10529         winapi_GenerateConsoleCtrlEvent): New typedefs.
10530         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10531         to 250 ms.
10532         (win32_wait): Check for remote interrupt request
10533         with check_remote_input_interrupt_request.
10534         (win32_request_interrupt): New function.
10535         (win32_target_op): Set request_interrupt to win32_request_interrupt.
10536
10537 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10538
10539         * win32-low.c (debug_registers_changed,
10540         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10541         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10542         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10543         (thread_rec): Get context using the low target.
10544         (child_add_thread): Call thread_added on the low target,
10545         which does the same thing.
10546         (regptr): Delete.
10547         (do_initial_child_stuff): Remove debug registers references.
10548         Set context using the low target.  Resume threads after
10549         setting the contexts.
10550         (child_continue): Remove dead variable.  Remove debug
10551         registers references.
10552         (child_fetch_inferior_registers): Go through the low target.
10553         (do_child_store_inferior_registers): Remove.
10554         (child_store_inferior_registers): Go through the low target.
10555         (win32_resume): Remove debug registers references.
10556         Set context using the low target.
10557         (handle_exception): Change return type to void.  Don't record
10558         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
10559         first chance exception.
10560         (get_child_debug_event): Change return type to void.  Remove
10561         goto loop.  Always return after waiting for debug event.
10562         (win32_wait): Convert to switch statement.  Handle spurious
10563         events.
10564
10565         * win32-i386-low.c (debug_registers_changed,
10566         debug_registers_used): New.
10567         (initial_stuff): Rename to ...
10568         (i386_initial_stuff): ... this.  Clear debug registers
10569         state variables.
10570         (store_debug_registers): Delete.
10571         (i386_get_thread_context): New.
10572         (load_debug_registers): Delete.
10573         (i386_set_thread_context): New.
10574         (i386_thread_added): New.
10575         (single_step): Rename to ...
10576         (i386_single_step): ... this.
10577         (do_fetch_inferior_registers): Rename to ...
10578         (i386_fetch_inferior_register): ... this.
10579         (i386_store_inferior_register): New.
10580         (the_low_target): Adapt to new interface.
10581
10582         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10583         (arm_get_thread_context): New.
10584         (arm_set_thread_context): New.
10585         (regptr): New.
10586         (do_fetch_inferior_registers): Rename to ...
10587         (arm_fetch_inferior_register): ... this.
10588         (arm_store_inferior_register): New.
10589         (arm_wince_breakpoint): Reimplement as unsigned long.
10590         (arm_wince_breakpoint_len): Define.
10591         (the_low_target): Adapt to new interface.
10592
10593         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10594         load_debug_registers.  Add get_thread_context, set_thread_context,
10595         thread_added and store_inferior_register.  Rename
10596         fetch_inferior_registers to fetch_inferior_register.
10597         (regptr): Remove declaration.
10598
10599 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10600
10601         * linux-low.c (linux_detach): Change return type to int.  Return 0.
10602         * spu-low.c (spu_detach): Likewise.
10603
10604 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10605
10606         * target.h (target_ops): Change return type of detach to int.
10607         Add join.
10608         (join_inferior): New.
10609         * server.c (main): Don't skip detach support on mingw32.
10610         If the inferior doesn't support detaching return error.
10611         Call join_inferior instead of using waitpid.
10612         * linux-low.c (linux_join): New.
10613         (linux_target_op): Add linux_join.
10614         * spu-low.c (spu_join): New.
10615         (spu_target_ops): Add spu_join.
10616         * win32-low.c (win32_detach): Adapt to new interface.
10617         Reopen current_process_handle before detaching.  Issue a child
10618         resume before detaching.
10619         (win32_join): New.
10620         (win32_target_op): Add win32_join.
10621
10622 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10623
10624         * win32-low.c (win32-attach): Fix return value.
10625         * target.h (target_ops): Describe ATTACH return values.
10626
10627 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10628
10629         * win32-low.c (GETPROCADDRESS): Define.
10630         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
10631         (winapi_DebugSetProcessKillOnExit): Likewise.
10632         (win32_create_inferior): Force usage of ansi CreateProcessA.
10633         (win32_attach): Use GETPROCADDRESS.
10634         (win32_detach): Likewise.
10635
10636 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10637
10638         * win32-low.c (win32_wait): Don't use WSTOPSIG.
10639
10640 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
10641
10642         * win32-low.c: Commit leftover changes from 2007-03-29.
10643
10644 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
10645
10646         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10647         fields short instead of int.  Add explicit padding.
10648         (i387_cache_to_fsave): Remove unnecessary casts.
10649         (i387_fsave_to_cache): Doc fix.
10650         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10651
10652 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
10653
10654         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10655         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10656
10657 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
10658
10659         * configure.srv (arm*-*-mingw32ce*): Move near the other
10660         arm targets.
10661
10662 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
10663
10664         * configure.ac: Add errno checking.
10665         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10666         sys/file.h and malloc.h.
10667         (AC_CHECK_DECLS): Add perror.
10668         (srv_mingwce): Handle.
10669         * configure.srv (i[34567]86-*-cygwin*): Add
10670         win32-i386-low.o to srv_tgtobj.
10671         (i[34567]86-*-mingw*): Likewise.
10672         (arm*-*-mingw32ce*): Add case.
10673         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10674         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10675         [__MINGW32CE__] (strerror): New function.
10676         [__MINGW32CE__] (errno): Define to GetLastError.
10677         [__MINGW32CE__] (COUNTOF): New macro.
10678         (remote_open): Remove extra close call.
10679         * mem-break.c (delete_breakpoint_at): New function.
10680         * mem-break.h (delete_breakpoint_at): Declare.
10681         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10682         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10683         [USE_WIN32API] (read, write): Add char* casts.
10684         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10685         * server.h: Include wincecompat.h on Windows CE.
10686         [HAVE_ERRNO_H]: Check.
10687         (perror): Declare if not declared.
10688         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10689         (perror_with_name): Remove errno declaration.
10690         * wincecompat.h: New.
10691         * wincecompat.c: New.
10692         * win32-low.h: New.
10693         * win32-arm-low.c: New.
10694         * win32-i386-low.c: New.
10695         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10696         (OUTMSG2): Make it safe.
10697         (_T): New macro.
10698         (COUNTOF): New macro.
10699         (NUM_REGS): Get it from the low target.
10700         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10701         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10702         (thread_rec): Let low target handle debug registers.
10703         (child_add_thread): Likewise.
10704         (child_init_thread_list): Likewise.
10705         (continue_one_thread): Likewise.
10706         (regptr): New.
10707         (do_child_fetch_inferior_registers): Move to ...
10708         * win32-i386-low.c: ... here, and rename to ...
10709         (do_fetch_inferior_registers): ... this.
10710         * win32-low.c (child_fetch_inferior_registers):
10711         Go through the low target.
10712         (do_child_store_inferior_registers): Use regptr.
10713         (strwinerror): New function.
10714         (win32_create_inferior): Handle Windows CE.
10715         Use strwinerror instead of strerror on Windows error
10716         codes.  Add program to the error output.
10717         Don't close the main thread handle on Windows CE.
10718         (win32_attach): Use coredll.dll on Windows CE.
10719         (win32_kill): Close current process and current
10720         thread handles.
10721         (win32_detach): Use coredll.dll on Windows CE.
10722         (win32_resume): Let low target handle debug registers, and
10723         step request.
10724         (handle_exception): Add/Remove initial breakpoint.  Avoid
10725         non-existant WSTOPSIG on Windows CE.
10726         (win32_read_inferior_memory): Cast to remove warning.
10727         (win32_arch_string): Go through the low target.
10728         (initialize_low): Call set_breakpoint_data with the low
10729         target's breakpoint.
10730         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10731         FOP_REGNUM, mappings): Move to ...
10732         * win32-i386-low.c: ... here.
10733         * win32-low.c (win32_thread_info): Move to ...
10734         * win32-low.h: ... here.
10735         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10736         win32-arm-low.c and wincecompat.c.
10737         (all:): Add $EXEEXT.
10738         (install-only:): Likewise.
10739         (gdbserver:): Likewise.
10740         (gdbreplay:): Likewise.
10741         * config.in: Regenerate.
10742         * configure: Regenerate.
10743
10744 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
10745
10746         * win32-low.c: Rename typedef thread_info to
10747         win32_thread_info throughout.
10748
10749 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
10750
10751         * win32-i386-low.c: Rename to ...
10752         * win32-low.c: ... this.
10753         * configure.srv: Replace win32-i386-low.o with win32-low.o.
10754         * Makefile.in: Likewise.
10755
10756 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
10757
10758         * remote-utils.c (monitor_output): Constify msg parameter.
10759         * server.h (monitor_output): Likewise.
10760         * win32-i386-low.c (handle_output_debug_string): New.
10761         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10762         handle_output_debug_string.
10763         (get_child_debug_event): Likewise.
10764
10765 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
10766
10767         * server.c (main): Correct strtoul check.
10768
10769 2007-03-27  Jon Ringle  <jon@ringle.org>
10770
10771         * linux-low.c: Check __ARCH_HAS_MMU__ also.
10772
10773 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
10774
10775         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10776
10777 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
10778
10779         * terminal.h: Check HAVE_SGTTY_H.
10780
10781 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
10782
10783         * remote-utils.c (remote_open): Print out the assigned port number.
10784
10785 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
10786
10787         * remote-utils.c (monitor_output): New function.
10788         * server.c (debug_threads): Define here.
10789         (monitor_show_help): New function.
10790         (handle_query): Handle qRcmd.
10791         (main): Do not handle 'd' packet.
10792         * server.h (debug_threads, remote_debug, monitor_output): Declare.
10793         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10794         of debug_threads.
10795
10796 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
10797
10798         * Makefile.in (EXEEXT): New.
10799         (clean): Use $(EXEEXT).
10800
10801 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
10802
10803         * target.h (target_ops): Rename send_signal to request_interrupt,
10804         and remove enum target_signal parameter.
10805         * linux-low.c (linux_request_interrupt): Rename from
10806         linux_send_signal, and always send SIGINT.
10807         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10808         and always send SIGINT.
10809         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10810         of send_signal.
10811         (input_interrupt): Likewise.
10812
10813 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
10814
10815         * server.c (get_features_xml): Check if target implemented
10816         arch_string.
10817         * win32-i386-low.c (win32_arch_string): New.
10818         (win32_target_ops): Add win32_arch_string as arch_string member.
10819
10820 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
10821
10822         * spu-low.c (spu_arch_string): New.
10823         (spu_target_ops): Add spu_arch_string.
10824
10825 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
10826
10827         * remote-utils.c: Remove HAVE_TERMINAL_H check.
10828         * configure.ac: Do not check for terminal.h.
10829         * configure, config.in: Regenerated.
10830
10831 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
10832
10833         * Makefile.in (OBS): Add $(XML_BUILTIN).
10834         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10835         (clean): Update.
10836         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10837         (arm-with-iwmmxt.c): New.
10838         * config.in, configure: Regenerate.
10839         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
10840         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
10841         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10842         (arm*-*-linux*): Add iWMMXt and regset support.
10843         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10844         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10845         (arm_store_wmmxregset, target_regsets): New.
10846         * server.c (get_features_xml): Take annex argument.  Check builtin
10847         XML documents.
10848         (handle_query): Handle multiple annexes.
10849
10850 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10851
10852         * remote-utils.c [USE_WIN32API] (read, write): Define.
10853         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10854         write.
10855
10856 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
10857
10858         * linux-i386-low.c (the_low_target): Set arch_string.
10859         * linux-x86-64-low.c (the_low_target): Likewise.
10860         * linux-low.c (linux_arch_string): New.
10861         (linux_target_ops): Add it.
10862         * linux-low.h (struct linux_target_ops): Add arch_string.
10863         * server.c (write_qxfer_response): Use const void * for DATA.
10864         (get_features_xml): New.
10865         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
10866         * target.h (struct target_ops): Add arch_string method.
10867
10868 2007-01-03  Denis Pilat  <denis.pilat@st.com>
10869             Daniel Jacobowitz  <dan@codesourcery.com>
10870
10871         * linux-low.c (linux_kill): Handle being called with no threads.
10872         * win32-i386-low.c (win32_kill): Likewise.
10873         (get_child_debug_event): Clear current_process_handle.
10874
10875 2006-12-30  Denis PILAT  <denis.pilat@st.com>
10876             Daniel Jacobowitz  <dan@codesourcery.com>
10877
10878         * remote-utils.c (remote_open): Check the type of specified
10879         serial port devices before opening them.
10880         * server.c (main): Kill the inferior if an error occurs during
10881         the first remote_open.
10882
10883 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
10884
10885         * README: Update supported targets.
10886
10887 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
10888
10889         * Makefile.in (clean): Remove reg-mips64.c.
10890         (reg-mips64.c, reg-mips64.o): New rules.
10891         * configure.srv: Handle mips64.  Include regset support for mips.
10892         * linux-mips-low.c (union mips_register): New.
10893         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10894         (mips_breakpoint, mips_breakpoint_at): Use int.
10895         (mips_collect_register, mips_supply_register)
10896         (mips_collect_register_32bit, mips_supply_register_32bit)
10897         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10898         (mips_store_fpregset, target_regsets): New.
10899         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10900
10901 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
10902
10903         * configure.srv: Add target "spu*-*-*".
10904         * Makefile.in (clean): Remove reg-spu.c.
10905         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10906         * spu-low.c: New file.
10907
10908 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
10909
10910         * configure.ac: Correct td_thr_tls_get_addr test.
10911         * configure: Regenerated.
10912
10913 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
10914
10915         * linux-low.c (linux_wait_for_event): Reformat.  Use the
10916         pass_signals array.
10917         * remote-utils.c (decode_address_to_semicolon): New.
10918         * server.c (pass_signals, handle_general_set): New.
10919         (handle_query): Mention QPassSignals for qSupported.
10920         (main): Call handle_general_set.
10921         * server.h (pass_signals, decode_address_to_semicolon): New.
10922
10923 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
10924
10925         * server.c (handle_query): Correct error handling for read_auxv.
10926
10927 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
10928
10929         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10930         and srv_linux_thread_db to yes.
10931         * linux-s390-low.c (s390_fill_gregset): New function.
10932         (target_regsets): Define data structure.
10933
10934 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
10935
10936         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10937         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
10938         * config.in, configure: Regenerated.
10939         * inferiors.c (gdb_id_to_thread): New function.
10940         (gdb_id_to_thread_id): Use it.
10941         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10942         * linux-low.h (struct process_info): Add th member.
10943         (thread_db_get_tls_address): New prototype.
10944         * remote-utils.c (decode_address): Make non-static.
10945         * server.c (handle_query): Handle qGetTLSAddr.
10946         * server.h (gdb_id_to_thread, decode_address): New prototypes.
10947         * target.h (struct target_ops): Add get_tls_address.
10948         * thread-db.c (maybe_attach_thread): Save the thread handle.
10949         (thread_db_get_tls_address): New.
10950
10951 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
10952
10953         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10954         (linux_resume_one_process): Take a siginfo_t *.  Update all
10955         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
10956         (struct pending_signals): Add a siginfo_t.
10957         (linux_wait_for_process): Always set last_status.
10958         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10959         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10960         * linux-low.h (struct process_info): Add last_status.
10961
10962 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
10963
10964         * remote-utils.c (try_rle): New function.
10965         (putpkt_binary): Use it.
10966
10967 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
10968
10969         * Makefile.in (clean): Clean reg-x86-64-linux.c.
10970         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10971         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10972         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10973         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10974         point registers.
10975
10976 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
10977
10978         * server.c (terminal_fd): New variable.
10979         (old_foreground_pgrp): Likewise.
10980         (restore_old_foreground_pgrp): New function.
10981         (start_inferior): Record the terminal file descriptor in terminal_fd
10982         and its original foreground group in old_foreground_pgrp.  Register
10983         restore_old_foreground_pgrp with atexit().
10984
10985 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
10986
10987         * server.c (handle_query): Correct qPart to qXfer.
10988
10989 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
10990
10991         * configure.ac: Check for more headers which are missing on
10992         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
10993         * configure.srv: Add Cygwin and mingw32.
10994         * remote-utils.c: Don't include headers unconditionally which
10995         are missing on mingw32.  Include <winsock.h> for mingw32.
10996         (remote_open): Adjust for mingw32 support.  Flush
10997         standard error after writing to it.
10998         (remote_close, putpkt_binary, input_interrupt, block_async_io)
10999         (unblock_async_io, enable_async_io, disable_async_io)
11000         (readchar, getpkt): Update for Winsock support.
11001         (prepare_resume_reply): Expect a protocol signal number.
11002         * server.c: Disable <sys/wait.h> on mingw32.
11003         (start_inferior): Adjust for mingw32 support.  Flush
11004         standard error after writing to it.
11005         (attach_inferior): Likewise.  Use protocol signal
11006         numbers.
11007         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
11008         and names.
11009         * win32-i386-low.c: New file.
11010         * Makefile.in (XM_CLIBS): Set.
11011         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11012         (win32-i386-low.o): New dependency rule.
11013         * linux-low.c (linux_wait): Use target signal numbers.
11014         * target.h (struct target_ops): Doc fix.
11015         * server.h (target_signal_to_name): New prototype.
11016         * gdbreplay.c: Don't include headers unconditionally which
11017         are missing on mingw32.  Include <winsock.h> for mingw32.
11018         (remote_close, remote_open): Adjust for Winsock support.
11019         * configure, config.in: Regenerated.
11020
11021 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11022
11023         * server.c (decode_xfer_read, write_qxfer_response): New.
11024         (handle_query): Take a packet length argument.  Handle
11025         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
11026         the qSupported response.
11027         (main): Update call to handle_query.
11028
11029 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
11030
11031         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11032         (putpkt_binary): Renamed from putpkt and adjusted for binary
11033         data.
11034         (putpkt): New wrapper for putpkt_binary.
11035         (readchar): Don't mask off the high bit.
11036         (decode_X_packet): New function.
11037         * server.c (main): Call putpkt_binary if a handler sets the packet
11038         length.  Save the length of the incoming packet.  Handle 'X'.
11039         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11040
11041 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
11042
11043         * server.c (handle_query): Handle qSupported.
11044
11045 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
11046
11047         * remote-utils.c (all_symbols_looked_up): New variable.
11048         (look_up_one_symbol): Check it.
11049         * server.h (look_up_one_symbol): New declaration.
11050         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11051
11052 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
11053
11054         * Makefile.in (linux-arm-low.o): Update dependencies.
11055         * linux-arm-low.c: Include "gdb_proc_service.h".
11056         (PTRACE_GET_THREAD_AREA): Define.
11057         (ps_get_thread_area): New function.
11058
11059 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
11060
11061         * configure.srv (m68k*-*-uclinux*): New target.
11062         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11063         (linux_resume_one_process): Remove extraneous cast.
11064         (linux_read_offsets): New.
11065         (linux_target_op): Add linux_read_offsets on mmuless systems.
11066         * server.c (handle_query): Add qOffsets logic.
11067         * target.h (struct target_ops): Add read_offsets.
11068
11069 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
11070
11071         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11072         (PTRACE_GET_THREAD_AREA): Define.
11073         (ps_get_thread_area): New function.
11074         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11075         (linux-x86-64-low.o): Update.
11076
11077 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
11078
11079         * configure.ac: Remove checks for prfpregset_t.
11080         * gdb_proc_service.h: New file.
11081         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11082         new "gdb_proc_service.h".
11083         * proc-service.c: Likewise.
11084         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11085         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11086         * Makefile.in (gdb_proc_service_h): Updated.
11087         * configure, config.in: Regenerated.
11088
11089 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
11090
11091         * remote-utils.c (prepare_resume_reply): Move declaration
11092         of gdb_id_from_wait to the top of the block.
11093
11094 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
11095
11096         * linux-low.c (regsets_store_inferior_registers): Read the regset
11097         from the target before filling it.
11098
11099 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11100
11101         * server.c (attach_inferior): Return SIGTRAP for a successful
11102         attach.
11103
11104 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
11105
11106         * Makefile.in (OBS): Add version.o.
11107         (STAGESTUFF): Delete.
11108         (version.o): Add dependencies.
11109         (version.c): Replace rule.
11110         (clean): Remove version.c.
11111         * server.c (gdbserver_version): New.
11112         (gdbserver_usage): Use printf.
11113         (main): Handle --version and --help.
11114         * server.h (version, host_name): Add declarations.
11115
11116 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
11117
11118         * linux-arm-low.c:
11119         * linux-arm-low.c:
11120         * inferiors.c:
11121         * i387-fp.h:
11122         * i387-fp.c:
11123         * gdbreplay.c:
11124         * regcache.c:
11125         * proc-service.c:
11126         * mem-break.h:
11127         * mem-break.c:
11128         * linux-x86-64-low.c:
11129         * linux-sh-low.c:
11130         * linux-s390-low.c:
11131         * linux-ppc64-low.c:
11132         * linux-ppc-low.c:
11133         * linux-mips-low.c:
11134         * linux-m68k-low.c:
11135         * linux-m32r-low.c:
11136         * linux-low.h:
11137         * linux-low.c:
11138         * linux-ia64-low.c:
11139         * linux-i386-low.c:
11140         * linux-crisv32-low.c:
11141         * thread-db.c:
11142         * terminal.h:
11143         * target.h:
11144         * target.c:
11145         * server.h:
11146         * server.c:
11147         * remote-utils.c:
11148         * regcache.h:
11149         * utils.c:
11150         * Makefile.in:
11151         * configure.ac:
11152         * gdbserver.1: Add (C) after Copyright.  Update the FSF
11153         address.
11154
11155 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
11156
11157         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11158         (arm_breakpoint_at): Recognize both breakpoints.
11159         (the_low_target): Use the correct breakpoint instruction.
11160
11161 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
11162
11163         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11164         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11165         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11166         (the_low_target): Update.
11167
11168 2005-10-25  Andreas Schwab  <schwab@suse.de>
11169
11170         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11171
11172         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11173         (ia64_num_regs): Reduce to 462.
11174
11175 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
11176
11177         * acinclude.m4: Correct quoting.
11178         * aclocal.m4: Regenerated.
11179
11180         Suggested by SZOKOVACS Robert <szo@ies.hu>:
11181         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11182         (thread_db_init): Call thread_db_err_str.
11183         * configure.ac: Check for TD_VERSION.
11184         * config.in, configure: Regenerated.
11185
11186 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11187
11188         * server.h (error, fatal, warning): Add ATTR_FORMAT.
11189
11190 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11191
11192         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11193         is not available.  Define HAVE_PTRACE_GETREGS if it is.
11194         * config.in, configure: Regenerated.
11195         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11196         * linux-i386-low.c, linux-m68k-low.c: Update to use
11197         HAVE_PTRACE_GETREGS.
11198         * linux-low.c (regsets_fetch_inferior_registers)
11199         (regsets_store_inferior_registers): Only return 0 if we processed
11200         GENERAL_REGS.
11201         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11202         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11203
11204 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11205
11206         * inferiors.c (struct thread_info): Add gdb_id.
11207         (add_thread): Add gdb_id argument.
11208         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11209         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11210         calls to add_thread.
11211         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11212         * server.c (handle_query): Use thread_to_gdb_id.
11213         (handle_v_cont, main): Use gdb_id_to_thread_id.
11214         * server.h (add_thread): Update prototype.
11215         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11216         prototypes.
11217
11218 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11219
11220         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11221         left-padded registers.
11222         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11223         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11224
11225 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
11226
11227         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11228         * configure: Regenerate.
11229         * config.in: Regenerate.
11230         * server.h (NEED_DECLARATION_STRERROR):
11231         Replace with !HAVE_DECL_STRERROR.
11232
11233 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
11234
11235         * linux-low.c (linux_wait, linux_send_signal): Don't test
11236         an unsigned long variable for > 0 if it could be MAX_ULONG.
11237         * server.c (myresume): Likewise.
11238         * target.c (set_desired_inferior): Likewise.
11239
11240 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
11241
11242         * configure.ac: Simplify and improve check for socklen_t.
11243         * configure, config.in: Regenerate.
11244
11245 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
11246
11247         * acconfig.h: Remove.
11248         * configure.ac: Add a test for socklen_t.  Use three-argument
11249         AC_DEFINE throughout.
11250         * config.in: Regenerated using autoheader 2.59.
11251         * configure: Regenerated.
11252
11253         * gdbreplay.c (socklen_t): Provide a default.
11254         (remote_open): Use socklen_t.
11255         * remote-utils.c (socklen_t): Provide a default.
11256         (remote_open): Use socklen_t.
11257         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11258         unsigned char.
11259
11260         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11261         char for buffers.
11262         * linux-low.c (linux_read_memory, linux_write_memory)
11263         (linux_read_auxv): Likewise.
11264         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11265         (check_mem_write): Likewise.
11266         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11267         Likewise.
11268         * regcache.c (struct inferior_rgcache_data, registers_to_string)
11269         (registers_from_string, register_data): Likewise.
11270         * server.c (handle_query, main): Likewise.
11271         * server.h (convert_ascii_to_int, convert_int_to_ascii)
11272         (decode_M_packet): Likewise.
11273         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11274         * target.h (struct target_ops): Update read_memory, write_memory,
11275         and read_auxv.
11276         (read_inferior_memory, write_inferior_memory): Update.
11277         * linux-low.h (struct linux_target_ops): Change type of breakpoint
11278         to unsigned char *.
11279         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11280         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11281         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11282         linux-s390-low.c, linux-sh-low.c: Update for changes in
11283         read_inferior_memory and the_low_target->breakpoint.
11284
11285 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
11286
11287         * Makefile.in (SFILES): Add linux-ppc64-low.c.
11288         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11289         * configure.srv: Add powerpc64-*-linux*.
11290         * linux-ppc64-low.c: New file.
11291
11292 2005-05-23  Orjan Friberg  <orjanf@axis.com>
11293
11294         * linux-cris-low.c: New file with support for CRIS.
11295         * linux-crisv32-low.c: Ditto for CRISv32.
11296         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11297         (clean): Add reg-cris.c and reg-crisv32.c.
11298         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11299         reg-crisv32.o, and reg-crisv32.c to make rules.
11300         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11301         recognized targets.
11302
11303 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
11304
11305         * linux-low.c (fetch_register): Ensure buffer size is a multiple
11306         of sizeof (PTRACE_XFER_TYPE).
11307         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
11308
11309 2005-05-12  Orjan Friberg  <orjanf@axis.com>
11310
11311         * target.h (struct target_ops): Add insert_watchpoint,
11312         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11313         pointers for hardware watchpoint support.
11314         * linux-low.h (struct linux_target_ops): Ditto.
11315         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11316         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
11317         to linux_target_ops.
11318         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11319         reply packet.
11320         * server.c (main): Recognize 'Z' and 'z' packets.
11321
11322 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
11323
11324         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11325         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11326         (the_low_target): Add new members.
11327
11328 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
11329
11330         * proc-service.c (ps_lgetregs): Search all_processes instead of
11331         all_threads.
11332
11333 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
11334
11335         * server.c (start_inferior): Change return type to int.
11336         (attach_inferior): Change sigptr to int *.
11337         (handle_v_cont, handle_v_requests): Change signal to int *.
11338         (main): Change signal to int.
11339
11340 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
11341
11342         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11343         * configure.srv: Add m32r*-*-linux*.
11344         * linux-m32r-low.c: New file.
11345
11346 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
11347
11348         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11349
11350 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
11351
11352         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11353         Take unsigned long arguments for PIDs.
11354         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11355         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11356         (wait_for_sigstop, linux_resume_one_process)
11357         (regsets_fetch_inferior_registers, linux_send_signal)
11358         (linux_read_auxv): Likewise.  Update the types of variables holding
11359         PIDs.  Update format string specifiers.
11360         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11361         * remote-utils.c (prepare_resume_reply): Likewise.
11362         * server.c (cont_thread, general_thread, step_thread)
11363         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11364         unsigned long.
11365         (handle_query): Update format specifiers.
11366         (handle_v_cont, main): Use strtoul for thread IDs.
11367         * server.h (struct inferior_list_entry): Use unsigned long for ID.
11368         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11369         (general_thread, step_thread, thread_from_wait)
11370         (old_thread_from_wait): Update.
11371         * target.h (struct thread_resume): Use unsigned long for THREAD.
11372         (struct target_ops): Use unsigned long for arguments to attach and
11373         thread_alive.
11374
11375 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
11376
11377         * acinclude.m4: Include bfd/bfd.m4 directly.
11378         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
11379         <agriffis@toolchain.org>.
11380         * aclocal.m4, configure: Regenerated.
11381
11382 2005-01-07  Andrew Cagney  <cagney@gnu.org>
11383
11384         * configure.ac: Rename configure.in, require autoconf 2.59.
11385         * configure: Re-generate.
11386
11387 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
11388
11389         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
11390         LIBS when finished.
11391         * aclocal.m4: Regenerated.
11392         * configure: Regenerated.
11393
11394 2004-11-21  Andreas Schwab  <schwab@suse.de>
11395
11396         * linux-m68k-low.c (m68k_num_gregs): Define.
11397         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11398         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11399         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11400         (m68k_breakpoint_at): New.  Add to the_low_target.
11401
11402         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11403         srv_linux_thread_db to yes.
11404
11405 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
11406
11407         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11408         (ARCH_SET_FS): Likewise.
11409         (ARCH_GET_FS): Likewise.
11410         (ARCH_GET_GS): Likewise.
11411
11412 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
11413
11414         * linux-i386-low.c (ps_get_thread_area): New.
11415         * linux-x86-64-low.c (ps_get_thread_area): New.
11416         * linux-low.c: Include <sys/syscall.h>.
11417         (linux_kill_one_process): Don't kill the first thread here.
11418         (linux_kill): Kill the first thread here.
11419         (kill_lwp): New function.
11420         (send_sigstop, linux_send_signal): Use it.
11421         * proc-service.c: Clean up #ifdefs.
11422         (fpregset_info): Delete.
11423         (ps_lgetregs): Update and enable implementation.
11424         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11425         implementations.
11426         * remote-utils.c (struct sym_cache, symbol_cache): New.
11427         (input_interrupt): Print a clearer message.
11428         (async_io_enabled): New variable.
11429         (enable_async_io, disable_async_io): Use it.  Update comments.
11430         (look_up_one_symbol): Use the symbol cache.
11431         * thread-db.c (thread_db_look_up_symbols): New function.
11432         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
11433
11434 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
11435
11436         * configure.in: Test for -rdynamic.
11437         * configure: Regenerated.
11438         * Makefile (INTERNAL_LDFLAGS): New.
11439         (gdbserver, gdbreplay): Use it.
11440
11441 2004-09-02  Andrew Cagney  <cagney@gnu.org>
11442
11443         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11444
11445 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
11446
11447         * linux-low.c (linux_wait): Clear all_processes list also.
11448
11449 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
11450
11451         * linux-low.c: Include <errno.h>.  Remove extern declaration of
11452         errno.
11453
11454 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
11455
11456         * gdbreplay.c, server.h, utils.c: Update copyright years.
11457
11458 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
11459
11460         * server.c (main): Print child status or termination signal from
11461         variable 'signal', not 'sig'.
11462
11463 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
11464
11465         * linux-low.c (linux_read_memory): Change return type to
11466         int.  Check for and return error from ptrace().
11467         * target.c (read_inferior_memory): Change return type to int.  Pass
11468         back return status from the_target->read_memory().
11469         * target.h (struct target_ops): Adapt *read_memory() prototype.
11470         Update comment.
11471         (read_inferior_memory): Adapt prototype.
11472         * server.c (main): Return an error packet if
11473         read_inferior_memory() returns an error.
11474
11475 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
11476
11477         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11478         Unify with other clean targets.
11479
11480 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11481
11482         * server.c (handle_v_cont): Call set_desired_inferior.
11483
11484 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11485
11486         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11487
11488 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11489
11490         * linux-low.c (linux_wait): Unblock async I/O.
11491         (linux_resume): Block and enable async I/O.
11492         * remote-utils.c (block_async_io, unblock_async_io): New functions.
11493         * server.h (block_async_io, unblock_async_io): Add prototypes.
11494
11495 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11496
11497         * remote-utils.c (remote_open): Print a status notice after
11498         opening a TCP port.
11499         * server.c (attach_inferior): Print a status notice after
11500         attaching.
11501
11502 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11503
11504         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11505
11506 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
11507
11508         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11509         error packet.
11510         * server.c, target.h: Update copyright years.
11511
11512 2004-02-25  Roland McGrath  <roland@redhat.com>
11513
11514         * target.h (struct target_ops): New member `read_auxv'.
11515         * server.c (handle_query): Handle qPart:auxv:read: query using that.
11516         * linux-low.c (linux_read_auxv): New function.
11517         (linux_target_ops): Initialize `read_auxv' member to that.
11518
11519 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11520
11521         Committed by Jim Blandy  <jimb@redhat.com>.
11522
11523         * linux-s390-low.c (s390_num_regs): Update.
11524         (s390_regmap): Remove control registers.  Use __s390x__ predefine
11525         instead of GPR_SIZE to distiguish s390 and s390x targets.
11526
11527 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
11528
11529         * linux-low.c: Update copyright year.
11530         (check_removed_breakpoint): Clear pending_is_breakpoint.
11531         (linux_set_resume_request, linux_queue_one_thread)
11532         (resume_status_pending_p): New functions.
11533         (linux_continue_one_thread): Use process->resume.
11534         (linux_resume): Only resume threads if there are no pending events.
11535         * linux-low.h (struct process_info): Add resume request
11536         pointer.
11537
11538 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
11539
11540         * regcache.c (new_register_cache): Clear the allocated register
11541         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11542
11543 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
11544
11545         * linux-low.c (linux_resume): Take a struct thread_resume *
11546         argument.
11547         (linux_wait): Update call.
11548         (resume_ptr): New static variable.
11549         (linux_continue_one_thread): Renamed from
11550         linux_continue_one_process.  Use resume_ptr.
11551         (linux_resume): Use linux_continue_one_thread.
11552         * server.c (handle_v_cont, handle_v_requests): New functions.
11553         (myresume): New function.
11554         (main): Handle 'v' case.
11555         * target.h (struct thread_resume): New type.
11556         (struct target_ops): Change argument of "resume" to struct
11557         thread_resume *.
11558         (myresume): Delete macro.
11559
11560 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
11561
11562         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11563         (uninstall): Support DESTDIR.
11564
11565 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
11566
11567         * configure.srv: Add xscale*linux copy of arm*linux entry.
11568
11569 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
11570
11571         * linux-arm-low.c (arm_reinsert_addr): New function.
11572         (the_low_target): Add arm_reinsert_addr.
11573
11574 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
11575
11576         * mem-break.c: Remove whitespace at end of file.
11577
11578 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
11579
11580         * configure.in: Check whether we need to prototype strerror.
11581         * server.h: Optionally prototype strerror.
11582         * gdbreplay.c (perror_with_name): Use strerror.
11583         * linux-low.c (linux_attach_lwp): Use strerror.
11584         * utils.c (perror_with_name): Use strerror.
11585         * config.in, configure: Regenerated.
11586
11587 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
11588
11589         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11590         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11591
11592 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
11593
11594         * Makefile.in (SFILES): Update.
11595         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11596         low-sun3.c: Remove files.
11597
11598 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
11599
11600         * linux-low.c: Move comment to linux_thread_alive where it belonged.
11601         (linux_detach_one_process, linux_detach): New functions.
11602         (linux_target_ops): Add linux_detach.
11603         * server.c (main): Handle 'D' packet.
11604         * target.h (struct target_ops): Add "detach" member.
11605         (detach_inferior): Define.
11606
11607 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
11608
11609         From Kelley Cook  <kelleycook@wideopenwest.com>:
11610         * configure.srv: Accept i[34567]86 variants.
11611
11612 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
11613
11614         * linux-low.c (linux_wait_for_event): Correct comment typos.
11615         (linux_resume_one_process): Call check_removed_breakpoint.
11616         (linux_send_signal): New function.
11617         (linux_target_ops): Add linux_send_signal.
11618         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11619         of kill.
11620         * target.h (struct target_ops): Add send_signal.
11621
11622 2003-05-29  Jim Blandy  <jimb@redhat.com>
11623
11624         * linux-low.c (usr_store_inferior_registers): Transfer buf in
11625         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
11626         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11627         away part of the register's value.
11628
11629 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
11630
11631         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11632         (linux_wait_for_event, linux_init_signals): Likewise.
11633
11634 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
11635
11636         * configure.in: Check for stdlib.h.
11637         * configure: Regenerated.
11638         * config.in: Regenerated.
11639
11640 2003-01-04  Andreas Schwab  <schwab@suse.de>
11641
11642         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11643
11644 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
11645
11646         * Makefile.in: Remove obsolete code.
11647
11648 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
11649
11650         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11651         defined(PT_FPR0_HI).
11652
11653 2002-11-17  Stuart Hughes  <seh@zee2.com>
11654
11655         * linux-arm-low.c (arm_num_regs): Increase.
11656         (arm_regmap): Include status register.
11657
11658 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
11659
11660         * linux-low.c (register_addr): Remove incorrect -1 check.
11661
11662 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
11663
11664         * linux-low.c (linux_create_inferior): Call setpgid.  Return
11665         the new PID.
11666         (unstopped_p, linux_signal_pid): Remove.
11667         (linux_target_ops): Remove linux_signal_pid.
11668         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11669         global instead of target method.
11670         * target.h (struct target_ops): Remove signal_pid.  Update comment
11671         for create_inferior.
11672         * server.c (signal_pid): New variable.
11673         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
11674         gdbserver.  Set the child to be the foreground process group.
11675         (attach_inferior): Set signal_pid.
11676
11677 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
11678
11679         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11680
11681 2002-08-20  Jim Blandy  <jimb@redhat.com>
11682
11683         * Makefile.in (LDFLAGS): Allow the configure script to establish a
11684         default for this.
11685
11686 2002-08-01  Andrew Cagney  <cagney@redhat.com>
11687
11688         * Makefile.in: Make chill references obsolete.
11689
11690 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
11691
11692         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11693         * configure: Regenerate.
11694         * config.in: Regenerate.
11695
11696 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
11697
11698         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11699         (perror_with_name, remote_close, remote_open, expect, play): Static.
11700
11701 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
11702
11703         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11704         byte offsets instead of an array of indexes.
11705         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11706
11707 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
11708
11709         * regcache.c: Add comment.
11710
11711 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
11712
11713         * thread-db.c: New file.
11714         * proc-service.c: New file.
11715         * acinclude.m4: New file.
11716         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11717         proc-service.o, and thread-db.o.
11718         (linux-low.o): Add USE_THREAD_DB.
11719         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11720         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11721         * aclocal.m4: Regenerated.
11722         * config.in: Regenerated.
11723         * configure: Regenerated.
11724         * configure.in: Check for proc_service.h, sys/procfs.h,
11725         thread_db.h, and linux/elf.h headrs.
11726         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11727         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
11728         Check for -lthread_db and thread support.
11729         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11730         PowerPC, and SuperH.
11731         * i387-fp.c: Constify arguments.
11732         * i387-fp.h: Likewise.
11733         * inferiors.c: (struct thread_info): Renamed from
11734         `struct inferior_info'.  Remove PID member.  Use generic inferior
11735         list header.  All uses updated.
11736         (inferiors, signal_pid): Removed.
11737         (all_threads): New variable.
11738         (get_thread): Define.
11739         (add_inferior_to_list): New function.
11740         (for_each_inferior): New function.
11741         (change_inferior_id): New function.
11742         (add_inferior): Removed.
11743         (remove_inferior): New function.
11744         (add_thread): New function.
11745         (free_one_thread): New function.
11746         (remove_thread): New function.
11747         (clear_inferiors): Use for_each_inferior and free_one_thread.
11748         (find_inferior): New function.
11749         (find_inferior_id): New function.
11750         (inferior_target_data): Update argument type.
11751         (set_inferior_target_data): Likewise.
11752         (inferior_regcache_data): Likewise.
11753         (set_inferior_regcache_data): Likewise.
11754         * linux-low.c (linux_bp_reinsert): Remove.
11755         (all_processes, stopping_threads, using_thrads)
11756         (struct pending_signals, debug_threads, pid_of): New.
11757         (inferior_pid): Replace with macro.
11758         (struct inferior_linux_data): Remove.
11759         (get_stop_pc, add_process): New functions.
11760         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11761         Use add_process and add_thread.
11762         (linux_attach_lwp): New function, based on old linux_attach.  Use
11763         add_process and add_thread.  Set stop_expected for new threads.
11764         (linux_attach): New function.
11765         (linux_kill_one_process): New function.
11766         (linux_kill): Kill all LWPs.
11767         (linux_thread_alive): Use find_inferior_id.
11768         (check_removed_breakpoints, status_pending_p): New functions.
11769         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11770         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
11771         struct for the found process.
11772         (linux_wait_for_event): New function.
11773         (linux_wait): Use it.  Support LWPs.
11774         (send_sigstop, wait_for_sigstop, stop_all_processes)
11775         (linux_resume_one_process, linux_continue_one_process): New functions.
11776         (linux_resume): Support LWPs.
11777         (REGISTER_RAW_SIZE): Remove.
11778         (fetch_register): Use register_size instead.  Call supply_register.
11779         (usr_store_inferior_registers): Likewise.  Call collect_register.
11780         Fix recursive case.
11781         (regsets_fetch_inferior_registers): Improve error message.
11782         (regsets_store_inferior_registers): Add debugging.
11783         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11784         (unstopped_p, linux_signal_pid): New functions.
11785         (linux_target_ops): Add linux_signal_pid.
11786         (linux_init_signals): New function.
11787         (initialize_low): Call it.  Initialize using_threads.
11788         * regcache.c (inferior_regcache_data): Add valid
11789         flag.
11790         (get_regcache): Fetch registers lazily.  Add fetch argument
11791         and update all callers.
11792         (regcache_invalidate_one, regcache_invalidate): New
11793         functions.
11794         (new_register_cache): Renamed from create_register_cache.
11795         Return the new regcache.
11796         (free_register_cache): Change argument to a void *.
11797         (registers_to_string, registers_from_string): Call get_regcache
11798         with fetch flag set.
11799         (register_data): Make static.  Pass fetch flag to get_regcache.
11800         (supply_register): Call get_regcache with fetch flag clear.
11801         (collect_register): Call get_regcache with fetch flag set.
11802         (collect_register_as_string): New function.
11803         * regcache.h: Update.
11804         * remote-utils.c (putpkt): Flush after debug output and use
11805         stderr.
11806         Handle input interrupts while waiting for an ACK.
11807         (input_interrupt): Use signal_pid method.
11808         (getpkt): Flush after debug output and use stderr.
11809         (outreg): Use collect_register_as_string.
11810         (new_thread_notify, dead_thread_notify): New functions.
11811         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
11812         and general_thread.
11813         (look_up_one_symbol): Flush after debug output.
11814         * server.c (step_thread, server_waiting): New variables.
11815         (start_inferior): Don't use signal_pid.  Update call to mywait.
11816         (attach_inferior): Update call to mywait.
11817         (handle_query): Handle qfThreadInfo and qsThreadInfo.
11818         (main): Don't fetch/store registers explicitly.  Use
11819         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
11820         calls to mywait.
11821         * server.h: Update.
11822         (struct inferior_list, struct_inferior_list_entry): New.
11823         * target.c (set_desired_inferior): New.
11824         (write_inferior_memory): Constify.
11825         (mywait): New function.
11826         * target.h: Update.
11827         (struct target_ops): New signal_pid method.
11828         (mywait): Removed macro, added prototype.
11829
11830         * linux-low.h (regset_func): Removed.
11831         (regset_fill_func, regset_store_func): New.
11832         (enum regset_type): New.
11833         (struct regset_info): Add type field.  Use new operation types.
11834         (struct linux_target_ops): stop_pc renamed to get_pc.
11835         Add decr_pc_after_break and breakpoint_at.
11836         (get_process, get_thread_proess, get_process_thread)
11837         (strut process_info, all_processes, linux_attach_lwp)
11838         (thread_db_init): New.
11839
11840         * linux-arm-low.c (arm_get_pc, arm_set_pc,
11841         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11842         (the_low_target): Add new members.
11843         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11844         (i386_store_fpxregset): Constify.
11845         (target_regsets): Add new kind identifier.
11846         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
11847         (i386_set_pc): Add debugging.
11848         (i386_breakpoint_at): New function.
11849         (the_low_target): Add new members.
11850         * linux-mips-low.c (mips_get_pc, mips_set_pc)
11851         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11852         (mips_breakpoint_at): New.
11853         (the_low_target): Add new members.
11854         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11855         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11856         (the_low_target): Add new members.
11857         * linux-sh-low.c (sh_get_pc, sh_set_pc)
11858         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11859         (the_low_target): Add new members.
11860         * linux-x86-64-low.c (target_regsets): Add new kind
11861         identifier.
11862
11863 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
11864
11865         From Martin Pool <mbp@samba.org>:
11866         * server.c (gdbserver_usage): New function.
11867         (main): Call it.
11868
11869 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
11870
11871         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11872         stop_at -> stop_pc.
11873
11874 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
11875
11876         * Makefile.in: Remove obsolete code.
11877
11878 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
11879
11880         * linux-low.c (regsets_fetch_inferior_registers),
11881         (regsets_store_inferior_registers): Removed cast to int from
11882         ptrace() calls.
11883         * regcache.h: Added declaration of struct inferior_info.
11884
11885 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
11886
11887         * inferiors.c (struct inferior_info): Add regcache_data.
11888         (add_inferior): Call create_register_cache.
11889         (clear_inferiors): Call free_register_cache.
11890         (inferior_regcache_data, set_inferior_regcache_data): New functions.
11891         * regcache.c (struct inferior_regcache_data): New.
11892         (registers): Remove.
11893         (get_regcache): New function.
11894         (create_register_cache, free_register_cache): New functions.
11895         (set_register_cache): Don't initialize the register cache here.
11896         (registers_to_string, registers_from_string, register_data): Call
11897         get_regcache.
11898         * regcache.h: Add prototypes.
11899         * server.h: Likewise.
11900
11901 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
11902
11903         * mem-break.c: New file.
11904         * mem-break.h: New file.
11905         * Makefile.in: Add mem-break.o rule; update server.h
11906         dependencies.
11907         * inferiors.c (struct inferior_info): Add target_data
11908         member.
11909         (clear_inferiors): Free target_data member if set.
11910         (inferior_target_data, set_inferior_target_data): New functions.
11911         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11912         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
11913         * linux-low.c (linux_bp_reinsert): New variable.
11914         (struct inferior_linux_data): New.
11915         (linux_create_inferior): Use set_inferior_target_data.
11916         (linux_attach): Likewise.  Call add_inferior.
11917         (linux_wait_for_one_inferior): New function.
11918         (linux_wait): Call it.
11919         (linux_write_memory): Add const.
11920         (initialize_low): Call set_breakpoint_data.
11921         * linux-low.h (struct linux_target_ops): Add breakpoint
11922         handling members.
11923         * server.c (attach_inferior): Remove extra add_inferior
11924         call.
11925         * server.h: Include mem-break.h.  Update inferior.c
11926         prototypes.
11927         * target.c (read_inferior_memory)
11928         (write_inferior_memory): New functions.
11929         * target.h (read_inferior_memory)
11930         (write_inferior_memory): Change macros to prototypes.
11931         (struct target_ops): Update comments.  Add const to write_memory
11932         definition.
11933
11934 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
11935
11936         * linux-low.c (usr_store_inferior_registers): Support
11937         registers which are allowed to fail to store.
11938         * linux-low.h (linux_target_ops): Likewise.
11939         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11940         (ppc_cannot_store_register): FPSCR may not be storable.
11941
11942 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11943
11944         * server.h: Include <string.h> if HAVE_STRING_H.
11945         * ChangeLog: Correct paths in last ChangeLog entry.
11946
11947 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11948
11949         * linux-low.h: Remove obsolete prototypes.
11950         (struct linux_target_ops): New.
11951         (extern the_low_target): New.
11952         * linux-low.c (num_regs, regmap): Remove declarations.
11953         (register_addr): Use the_low_target explicitly.
11954         (fetch_register): Likewise.
11955         (usr_fetch_inferior_registers): Likewise.
11956         (usr_store_inferior_registers): Likewise.
11957         * linux-arm-low.c (num_regs): Remove.
11958         (arm_num_regs): Define.
11959         (arm_regmap): Renamed from regmap, made static.
11960         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11961         made static.
11962         (arm_cannot_store_register): Renamed from cannot_store_register,
11963         made static.
11964         (the_low_target): New.
11965         * linux-i386-low.c (num_regs): Remove.
11966         (i386_num_regs): Define.
11967         (i386_regmap): Renamed from regmap, made static.
11968         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11969         made static.
11970         (i386_cannot_store_register): Renamed from cannot_store_register,
11971         made static.
11972         (the_low_target): New.
11973         * linux-ia64-low.c (num_regs): Remove.
11974         (ia64_num_regs): Define.
11975         (ia64_regmap): Renamed from regmap, made static.
11976         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11977         made static.
11978         (ia64_cannot_store_register): Renamed from cannot_store_register,
11979         made static.
11980         (the_low_target): New.
11981         * linux-m68k-low.c (num_regs): Remove.
11982         (m68k_num_regs): Define.
11983         (m68k_regmap): Renamed from regmap, made static.
11984         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11985         made static.
11986         (m68k_cannot_store_register): Renamed from cannot_store_register,
11987         made static.
11988         (the_low_target): New.
11989         * linux-mips-low.c (num_regs): Remove.
11990         (mips_num_regs): Define.
11991         (mips_regmap): Renamed from regmap, made static.
11992         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11993         made static.
11994         (mips_cannot_store_register): Renamed from cannot_store_register,
11995         made static.
11996         (the_low_target): New.
11997         * linux-ppc-low.c (num_regs): Remove.
11998         (ppc_num_regs): Define.
11999         (ppc_regmap): Renamed from regmap, made static.
12000         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12001         made static.
12002         (ppc_cannot_store_register): Renamed from cannot_store_register,
12003         made static.
12004         (the_low_target): New.
12005         * linux-s390-low.c (num_regs): Remove.
12006         (s390_num_regs): Define.
12007         (s390_regmap): Renamed from regmap, made static.
12008         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12009         made static.
12010         (s390_cannot_store_register): Renamed from cannot_store_register,
12011         made static.
12012         (the_low_target): New.
12013         * linux-sh-low.c (num_regs): Remove.
12014         (sh_num_regs): Define.
12015         (sh_regmap): Renamed from regmap, made static.
12016         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12017         made static.
12018         (sh_cannot_store_register): Renamed from cannot_store_register,
12019         made static.
12020         (the_low_target): New.
12021         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12022         (the_low_target): New.
12023
12024 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12025
12026         * Makefile.in: Add stamp-h target.
12027         * configure.in: Create stamp-h.
12028         * configure: Regenerated.
12029
12030 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12031
12032         * inferiors.c: New file.
12033         * target.c: New file.
12034         * target.h: New file.
12035         * Makefile.in:  Add target.o and inferiors.o.  Update
12036         dependencies.
12037         * linux-low.c (inferior_pid): New static variable,
12038         moved from server.c.
12039         (linux_create_inferior): Renamed from create_inferior.
12040         Call add_inferior.  Return 0 on success instead of a PID.
12041         (linux_attach): Renamed from myattach.
12042         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
12043         (linux_thread_alive): Renamed from mythread_alive.
12044         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
12045         child dies.
12046         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
12047         (regsets_store_inferior_registers): Correct error message.
12048         Add missing ``return 0''.
12049         (linux_fetch_registers): Renamed from fetch_inferior_registers.
12050         (linux_store_registers): Renamed from store_inferior_registers.
12051         (linux_read_memory): Renamed from read_inferior_memory.
12052         (linux_write_memory): Renamed from write_inferior_memory.
12053         (linux_target_ops): New structure.
12054         (initialize_low): Call set_target_ops ().
12055         * remote-utils.c (unhexify): New function.
12056         (hexify): New function.
12057         (input_interrupt): Send signals to ``signal_pid''.
12058         * server.c (inferior_pid): Remove.
12059         (start_inferior): Update create_inferior call.
12060         (attach_inferior): Call add_inferior.
12061         (handle_query): New function.
12062         (main): Call handle_query for `q' packets.
12063         * server.h: Include "target.h".  Remove obsolete prototypes.
12064         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12065
12066 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12067
12068         * Makefile.in: Add WARN_CFLAGS.  Update configury
12069         dependencies.
12070         * configure.in: Check for <string.h>
12071         * configure: Regenerate.
12072         * config.in: Regenerate.
12073         * gdbreplay.c: Include needed system headers.
12074         (remote_open): Remove strchr prototype.
12075         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12076         * regcache.c (supply_register): Change buf argument to const void *.
12077         (supply_register_by_name): Likewise.
12078         (collect_register): Change buf argument to void *.
12079         (collect_register_by_name): Likewise.
12080         * regcache.h: Add missing prototypes.
12081         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12082         * server.c (handle_query): New function.
12083         (attached): New static variable, moved out of main.
12084         (main): Quiet longjmp clobber warnings.
12085         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
12086         * utils.c (error): Remove NORETURN.
12087         (fatal): Likewise.