gdb: btrace: fix build errors on older glibc builds
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
2
3         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4         * config.in, configure: Regenerated.
5
6 2013-09-18  Yao Qi  <yao@codesourcery.com>
7
8         PR server/15959
9         * server.c (start_inferior): Clear 'resume_info'.
10
11 2013-09-16  Jiong Wang  <jiwang@tilera.com>
12
13         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
14         for each register.
15
16 2013-09-16  Jiong Wang  <jiwang@tilera.com>
17
18         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
19         linux-tile-low.o to srv_tgtobj.
20
21 2013-09-16  Will Newton  <will.newton@linaro.org>
22
23         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
24         out regs.
25
26 2013-09-06  Pedro Alves  <palves@redhat.com>
27
28         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
29         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
30         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
31         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
32         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
33         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
34
35 2013-09-06  Pedro Alves  <palves@redhat.com>
36
37         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
38         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
39
40 2013-09-06  Pedro Alves  <palves@redhat.com>
41
42         * linux-amd64-ipa.c: Include tracepoint.h.
43         * linux-i386-ipa.c: Include tracepoint.h.
44
45 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
46
47         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
48         (ps_get_thread_area): New function.
49
50 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
51
52         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
53         (initialize_low_arch): Call init_registers_crisv32 rather than
54         init_register_crisv32.
55
56 2013-09-05  Pedro Alves  <palves@redhat.com>
57
58         * server.h (handle_vFile, hostio_last_error_from_errno): Move
59         to ...
60         * hostio.h: ... this new file.
61         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
62         win32-low.c: Include hostio.h.
63
64 2013-09-05  Pedro Alves  <palves@redhat.com>
65
66         * server.h (gdb_client_data, handler_func, callback_handler_func)
67         (delete_file_handler, add_file_handler, append_callback_event)
68         (delete_callback_event, start_event_loop, initialize_event_loop):
69         Move to event-loop.h and include it.
70         * event-loop.h: New file.
71
72 2013-09-05  Pedro Alves  <palves@redhat.com>
73
74         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
75         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
76         (loaded_dll, unloaded_dll): Move to ...
77         * dll.h: ... this new file.
78         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
79
80 2013-09-05  Pedro Alves  <palves@redhat.com>
81
82         * server.h (current_process, get_thread_process, all_processes)
83         (add_inferior_to_list, for_each_inferior, current_inferior)
84         (remove_inferior, add_process, remove_process, find_process_pid)
85         (have_started_inferiors_p, have_attached_inferiors_p)
86         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
87         (clear_inferiors, find_inferior, find_inferior_id)
88         (inferior_target_data, set_inferior_target_data)
89         (inferior_regcache_data, set_inferior_regcache_data): Move to
90         inferiors.h, and include it.
91         * inferiors.h: New file.
92
93 2013-09-05  Pedro Alves  <palves@redhat.com>
94
95         * server.h (struct emit_ops, current_insn_ptr, emit_error):
96         Move ...
97         * ax.h: ... here.
98
99 2013-09-05  Pedro Alves  <palves@redhat.com>
100
101         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
102         tracepoint.h.
103         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
104         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
105         (handle_tracepoint_general_set, handle_tracepoint_query)
106         (tracepoint_finished_step, tracepoint_was_hit)
107         (release_while_stepping_state_list, current_traceframe)
108         (in_readonly_region, traceframe_read_mem)
109         (fetch_traceframe_registers, traceframe_read_sdata)
110         (traceframe_read_info, struct fast_tpoint_collect_status)
111         (fast_tracepoint_collecting, force_unlock_trace_buffer)
112         (handle_tracepoit_bkpts, initialize_low_tracepoint)
113         (supply_fast_tracepoint_registers)
114         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
115         (ipa_tdesc, claim_trampoline_space)
116         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
117         (agent_mem_read, agent_get_trace_state_variable_value)
118         (agent_set_trace_state_variable_value, agent_tsv_read)
119         (agent_mem_read_string, get_raw_reg_func_addr)
120         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
121         * tracepoint.h: ... this new file.
122
123 2013-09-05  Pedro Alves  <palves@redhat.com>
124
125         * server.h (perror_with_name, error, fatal, warning, paddress)
126         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
127         include it.
128         * utils.h: New file.
129
130 2013-09-05  Pedro Alves  <palves@redhat.com>
131
132         * server.h (remote_debug, noack_mode, transport_is_reliable)
133         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
134         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
135         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
136         (write_enn, initialize_async_io, enable_async_io)
137         (disable_async_io, check_remote_input_interrupt_request)
138         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
139         (dead_thread_notify, prepare_resume_reply)
140         (decode_address_to_semicolon, decode_address, decode_m_packet)
141         (decode_M_packet, decode_X_packet, decode_xfer_write)
142         (decode_search_memory_packet, unhexify, hexify)
143         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
144         (look_up_one_symbol, relocate_instruction)
145         (monitor_output): Move to remote-utils.h, and include it.
146         * remote-utils.h: New file.
147
148 2013-09-05  Pedro Alves  <palves@redhat.com>
149
150         * server.h (_): Delete.
151
152 2013-09-02  Pedro Alves  <palves@redhat.com>
153
154         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
155         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
156         allocated.
157         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
158
159 2013-09-02  Pierre Muller  <muller@sourceware.org>
160
161         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
162         or WriteProcessMemory complete successfully and handle
163         ERROR_PARTIAL_COPY error.
164
165 2013-09-02  Pedro Alves  <palves@redhat.com>
166
167         * server.c (gdb_read_memory): Return -1 on traceframe memory read
168         error instead of EIO.
169
170 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
171
172         PR server/15604
173         * linux-low.c: Include filestuff.h.
174         (linux_create_inferior) <pid == 0>: Call close_most_fds.
175         * lynx-low.c: Include filestuff.h.
176         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
177         * server.c: Include filestuff.h.
178         (main): Call notice_open_fds.
179         * spu-low.c: Include filestuff.h.
180         (spu_create_inferior) <pid == 0>: Call close_most_fds.
181
182 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
183
184         * Makefile.in: Explain why ../target and ../nat are not
185         listed as include file search paths.
186         (linux-waitpid.o): New object file rule.
187         * configure.srv (srv_native_linux_obj): New variable.
188         Replace all occurrences of linux native object files with
189         $srv_native_linux_obj.
190         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
191         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
192         (linux_enable_event_reporting): Remove declaration.
193         (my_waitpid): Moved to common/linux-waitpid.c.
194         (linux_wait_for_event): Pass ptid when calling
195         linux_enable_event_reporting.
196         (linux_supports_tracefork_flag): Remove.
197         (linux_enable_event_reporting): Likewise.
198         (linux_tracefork_grandchild): Remove.
199         (STACK_SIZE): Moved to common/linux-ptrace.c.
200         (linux_tracefork_child): Remove.
201         (linux_test_for_tracefork): Remove.
202         (linux_look_up_symbols): Call linux_supports_traceclone.
203         (initialize_low): Remove call to linux_test_for_tracefork.
204         * linux-low.h (PTRACE_TYPE_ARG3): Move to
205         common/linux-ptrace.h.
206         (PTRACE_TYPE_ARG4): Likewise.
207         Include linux-ptrace.h.
208
209 2013-08-21  Pedro Alves  <palves@redhat.com>
210
211         * config.in: Renegerate.
212
213 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
214
215         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
216         (SFILES): Remove $(srcdir)/common/target-common.c and
217         add $(srcdir)/target/waitstatus.c.
218         (OBS): Remove target-common.o and add waitstatus.o.
219         (server_h): Remove $(srcdir)/../common/target-common.h and
220         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
221         and $(srcdir)/../target/waitstatus.h.
222         (target-common.o): Remove.
223         (waitstatus.o): New target object file.
224         * target.h: Do not include target-common.h and
225         include target/resume.h, target/wait.h and
226         target/waitstatus.h.
227
228 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
229
230         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
231         to PTRACE_TYPE_ARG3.
232         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
233         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
234         PTRACE_TYPE_ARG4.
235         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
236         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
237
238 2013-07-27  Jie Zhang  <jie@codesourcery.com>
239             Daniel Jacobowitz  <dan@codesourcery.com>
240             Yao Qi  <yao@codesourcery.com>
241
242         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
243         (mips-linux-watch.o): New rule.
244         (mips_linux_watch_h): New variable.
245         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
246         srv_tgtobj.
247         * linux-mips-low.c: Include mips-linux-watch.h.
248         (struct arch_process_info, struct arch_lwp_info): New.
249         (update_watch_registers_callback): New function.
250         (mips_linux_new_process, mips_linux_new_thread) New functions.
251         (mips_linux_prepare_to_resume, mips_insert_point): New
252         functions.
253         (mips_remove_point, mips_stopped_by_watchpoint): New
254         functions.
255         (rsp_bp_type_to_target_hw_bp_type): New function.
256         (mips_stopped_data_address): New function.
257         (the_low_target): Add watchpoint support functions.
258
259 2013-07-27  Yao Qi  <yao@codesourcery.com>
260
261         * i386-low.c: Include break-common.h.
262         (enum target_hw_bp_type): Remove.
263
264 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
265
266         * Makefile.in (SFILES): /common/target-common.c.
267         (OBS): Add target-common.o.
268         (server_h): Add $(srcdir)/../common/target-common.h.
269         (target-common.o): New target.
270         * server.c (queue_stop_reply_callback): Free
271         status string after use.
272         * target.c (target_waitstatus_to_string): Remove.
273         * target.h: Include target-common.h.
274         (resume_kind): Likewise.
275         (target_waitkind): Likewise.
276         (target_waitstatus): Likewise.
277         (TARGET_WNOHANG): Likewise.
278
279 2013-07-04  Yao Qi  <yao@codesourcery.com>
280
281         * Makefile.in (host_alias): Use @host_noncanonical@.
282         (target_alias): Use @target_noncanonical@.
283         * configure.ac: Use ACX_NONCANONICAL_TARGET and
284         ACX_NONCANONICAL_HOST.
285         * configure: Regenerated.
286
287         Revert:
288         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
289
290         * configure.ac (version_host, version_target): Set and AC_SUBST them.
291         * configure: Rebuild.
292         * Makefile.in (version_host, version_target): Get from configure.
293         (version.c): Use $(version_host) and $(version_target).
294
295 2013-07-03  Pedro Alves  <palves@redhat.com>
296
297         * Makefile.in (config.status): Depend on development.sh.
298         * acinclude.m4: Include libmcheck.m4.
299         * configure: Regenerate.
300
301 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
302
303         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
304         attribute inside the parentheses.
305         (winapi_DebugSetProcessKillOnExit): Ditto.
306         (winapi_DebugBreakProcess): Ditto.
307         (winapi_GenerateConsoleCtrlEvent): Ditto.
308
309 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
310
311         * notif.h (notif_event): Add a dummy member to avoid compiler
312         errors.
313
314 2013-07-01  Pedro Alves  <palves@redhat.com>
315
316         * hostio.c (HOSTIO_PATH_MAX): Define.
317         (require_filename, handle_open, handle_unlink, handle_readlink):
318         Use it.
319
320 2013-07-01  Pedro Alves  <palves@redhat.com>
321
322         * server.h: Include "pathmax.h".
323         * linux-low.c: Don't include sys/param.h.
324         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
325         MAXPATHLEN.
326         * win32-low.c: Don't include sys/param.h.
327         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
328
329 2013-07-01  Pedro Alves  <palves@redhat.com>
330
331         * event-loop.c: Don't check HAVE_UNISTD_H before including
332         <unistd.h>.
333         * gdbreplay.c: Likewise.
334         * remote-utils.c: Likewise.
335         * server.c: Likewise.
336         * configure.ac: Don't check for unistd.h.
337         * configure: Regenerate.
338
339 2013-06-28  Tom Tromey  <tromey@redhat.com>
340
341         * Makefile.in (version.c): Use version.in, not
342         common/version.in.
343
344 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
345
346         * configure.ac (version_host, version_target): Set and AC_SUBST them.
347         * configure: Rebuild.
348         * Makefile.in (version_host, version_target): Get from configure.
349         (version.c): Use $(version_host) and $(version_target).
350
351 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
352
353         Fix trace-status to output user name without trailing colon.
354         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
355
356 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
357
358         Fix trace-status to output proper start-time and stop-time.
359         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
360         output start time and stop time in hex as gdb expects.
361
362 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
363
364         * tracepoint.c (build_traceframe_info_xml): Output trace state
365         variables present in the trace buffer.
366
367 2013-06-24  Tom Tromey  <tromey@redhat.com>
368
369         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
370         create-version.sh.
371         (version.o): Remove.
372         * gdbreplay.c: Include version.h.
373         (version, host_name): Don't declare.
374         * server.h: Include version.h.
375         (version, host_name): Don't declare.
376
377 2013-06-12  Pedro Alves  <palves@redhat.com>
378
379         * linux-x86-low.c (linux_is_elf64): Delete global.
380         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
381         with local linux_pid_exe_is_elf_64_file use.
382
383 2013-06-11  Pedro Alves  <palves@redhat.com>
384
385         * linux-low.c (regset_disabled, disable_regset): New functions.
386         (regsets_fetch_inferior_registers)
387         (regsets_store_inferior_registers): Use them.
388         (initialize_regsets_info); Don't allocate the disabled_regsets
389         array here.
390         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
391         comment.
392
393 2013-06-11  Pedro Alves  <palves@redhat.com>
394
395         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
396         xmalloc.
397
398 2013-06-11  Pedro Alves  <palves@redhat.com>
399
400         * linux-x86-low.c (initialize_low_arch): Call
401         init_registers_x32_avx_linux.
402
403 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
404
405         Fix compatibility with Android Bionic.
406         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
407         it is not empty.
408
409 2013-06-07  Pedro Alves  <palves@redhat.com>
410
411         PR server/14823
412         * Makefile.in (OBS): Add tdesc.o.
413         (IPA_OBJS): Add tdesc-ipa.o.
414         (tdesc-ipa.o): New rule.
415         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
416         interface.
417         * linux-low.c (new_inferior): Delete.
418         (disabled_regsets, num_regsets): Delete.
419         (linux_add_process): Adjust to set the new per-process
420         new_inferior flag.
421         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
422         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
423         was a stop.  When calling arch_setup, switch the current inferior
424         to the thread that got an event.
425         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
426         (regsets_fetch_inferior_registers)
427         (regsets_store_inferior_registers): New regsets_info parameter.
428         Adjust to use it.
429         (linux_register_in_regsets): New regs_info parameter.  Adjust to
430         use it.
431         (register_addr, fetch_register, store_register): New usrregs_info
432         parameter.  Adjust to use it.
433         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
434         parameter regs_info.  Adjust to use it.
435         (linux_fetch_registers): Get the current inferior's regs_info, and
436         adjust to use it.
437         (linux_store_registers): Ditto.
438         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
439         (initialize_low): Don't initialize the target_regsets here.  Call
440         initialize_low_arch.
441         * linux-low.h (target_regsets): Delete declaration.
442         (struct regsets_info): New.
443         (struct usrregs_info): New.
444         (struct regs_info): New.
445         (struct process_info_private) <new_inferior>: New field.
446         (struct linux_target_ops): Delete the num_regs, regmap, and
447         regset_bitmap fields.  New field regs_info.
448         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
449         * i387-fp.c (num_xmm_registers): Delete.
450         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
451         calls to new interface.
452         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
453         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
454         Infer the number of xmm registers from the regcache's target
455         description.
456         * i387-fp.h (num_xmm_registers): Delete.
457         * inferiors.c (add_thread): Don't install the thread's regcache
458         here.
459         * proc-service.c (gregset_info): Fetch the current inferior's
460         regs_info.  Adjust to use it.
461         * regcache.c: Include tdesc.h.
462         (register_bytes, reg_defs, num_registers)
463         (gdbserver_expedite_regs): Delete.
464         (get_thread_regcache): If the thread doesn't have a regcache yet,
465         create one, instead of aborting gdbserver.
466         (regcache_invalidate_one): Rename to ...
467         (regcache_invalidate_thread): ... this.
468         (regcache_invalidate_one): New.
469         (regcache_invalidate): Only invalidate registers of the current
470         process.
471         (init_register_cache): Add target_desc parameter, and use it.
472         (new_register_cache): Ditto.  Assert the target description has a
473         non zero registers_size.
474         (regcache_cpy): Add assertions.  Adjust.
475         (realloc_register_cache, set_register_cache): Delete.
476         (registers_to_string, registers_from_string): Adjust.
477         (find_register_by_name, find_regno, find_register_by_number)
478         (register_cache_size): Add target_desc parameter, and use it.
479         (free_register_cache_thread, free_register_cache_thread_one)
480         (regcache_release, register_cache_size): New.
481         (register_size): Add target_desc parameter, and use it.
482         (register_data, supply_register, supply_register_zeroed)
483         (supply_regblock, supply_register_by_name, collect_register)
484         (collect_register_as_string, collect_register_by_name): Adjust.
485         * regcache.h (struct target_desc): Forward declare.
486         (struct regcache) <tdesc>: New field.
487         (init_register_cache, new_register_cache): Add target_desc
488         parameter.
489         (regcache_invalidate_thread): Declare.
490         (regcache_invalidate_one): Delete declaration.
491         (regcache_release): Declare.
492         (find_register_by_number, register_cache_size, register_size)
493         (find_regno): Add target_desc parameter.
494         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
495         declarations.
496         * remote-utils.c: Include tdesc.h.
497         (outreg, prepare_resume_reply): Adjust.
498         * server.c: Include tdesc.h.
499         (gdbserver_xmltarget): Delete declaration.
500         (get_features_xml, process_serial_event): Adjust.
501         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
502         declare.
503         (struct process_info) <tdesc>: New field.
504         (ipa_tdesc): Declare.
505         * tdesc.c: New file.
506         * tdesc.h: New file.
507         * tracepoint.c: Include tdesc.h.
508         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
509         (get_context_regcache): Adjust to pass ipa_tdesc down.
510         (do_action_at_tracepoint): Adjust to get the register cache size
511         from the context regcache's description.
512         (traceframe_walk_blocks): Adjust to get the register cache size
513         from the current trace frame's description.
514         (traceframe_get_pc): Adjust to get current trace frame's
515         description and pass it down.
516         (gdb_collect): Adjust to get the register cache size from the
517         IPA's description.
518         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
519         (gdbserver_xmltarget): Delete.
520         (initialize_low_tracepoint): Set the ipa's target description.
521         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
522         (initialize_low_tracepoint): Set the ipa's target description.
523         * linux-x86-low.c: Include tdesc.h.
524         [__x86_64__] (is_64bit_tdesc): New.
525         (ps_get_thread_area, x86_get_thread_area): Use it.
526         (i386_cannot_store_register): Rename to ...
527         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
528         (i386_cannot_fetch_register): Rename to ...
529         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
530         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
531         to new interface.
532         (target_regsets): Rename to ...
533         (x86_regsets): ... this.
534         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
535         interface.
536         (x86_siginfo_fixup): Use is_64bit_tdesc.
537         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
538         (tdesc_x32_avx_linux, tdesc_x32_linux)
539         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
540         Declare.
541         (x86_linux_update_xmltarget): Delete.
542         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
543         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
544         (AMD64_LINUX_USER64_CS): New.
545         (x86_linux_read_description): New, based on
546         x86_linux_update_xmltarget.
547         (same_process_callback): New.
548         (x86_arch_setup_process_callback): New.
549         (x86_linux_update_xmltarget): New.
550         (x86_regsets_info): New.
551         (amd64_linux_regs_info): New.
552         (i386_linux_usrregs_info): New.
553         (i386_linux_regs_info): New.
554         (x86_linux_regs_info): New.
555         (x86_arch_setup): Reimplement.
556         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
557         (x86_emit_ops): Ditto.
558         (the_low_target): Adjust.  Install x86_linux_regs_info,
559         x86_cannot_fetch_register, and x86_cannot_store_register.
560         (initialize_low_arch): New.
561         * linux-ia64-low.c (tdesc_ia64): Declare.
562         (ia64_fetch_register): Adjust.
563         (ia64_usrregs_info, regs_info): New globals.
564         (ia64_regs_info): New function.
565         (the_low_target): Adjust.
566         (initialize_low_arch): New function.
567         * linux-sparc-low.c (tdesc_sparc64): Declare.
568         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
569         Adjust.
570         (sparc_arch_setup): New function.
571         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
572         (the_low_target): Adjust.
573         (initialize_low_arch): New function.
574         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
575         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
576         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
577         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
578         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
579         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
580         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
581         (tdesc_powerpc_isa205_vsx64l): Declare.
582         (ppc_cannot_store_register, ppc_collect_ptrace_register)
583         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
584         (ppc_set_pc, ppc_get_hwcap): Adjust.
585         (ppc_usrregs_info): Forward declare.
586         (!__powerpc64__) ppc_regmap_adjusted: New global.
587         (ppc_arch_setup): Adjust to the current process'es target
588         description.
589         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
590         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
591         (ppc_store_evrregset): Adjust.
592         (target_regsets): Rename to ...
593         (ppc_regsets): ... this, and make static.
594         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
595         (ppc_regs_info): New function.
596         (the_low_target): Adjust.
597         (initialize_low_arch): New function.
598         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
599         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
600         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
601         (tdesc_s390x_linux64v2): Declare.
602         (s390_collect_ptrace_register, s390_supply_ptrace_register)
603         (s390_fill_gregset, s390_store_last_break): Adjust.
604         (target_regsets): Rename to ...
605         (s390_regsets): ... this, and make static.
606         (s390_get_pc, s390_set_pc): Adjust.
607         (s390_get_hwcap): New target_desc parameter, and use it.
608         [__s390x__] (have_hwcap_s390_high_gprs): New global.
609         (s390_arch_setup): Adjust to set the current process'es target
610         description.  Don't adjust the regmap.
611         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
612         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
613         (regs_info_3264): New globals.
614         (s390_regs_info): New function.
615         (the_low_target): Adjust.
616         (initialize_low_arch): New function.
617         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
618         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
619         [__mips64] (init_registers_mips_linux)
620         (init_registers_mips_dsp_linux): Delete defines.
621         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
622         (have_dsp): New global.
623         (mips_read_description): New, based on mips_arch_setup.
624         (mips_arch_setup): Reimplement.
625         (get_usrregs_info): New function.
626         (mips_cannot_fetch_register, mips_cannot_store_register)
627         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
628         (mips_fill_fpregset, mips_store_fpregset): Adjust.
629         (target_regsets): Rename to ...
630         (mips_regsets): ... this, and make static.
631         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
632         (dsp_regs_info, regs_info): New globals.
633         (mips_regs_info): New function.
634         (the_low_target): Adjust.
635         (initialize_low_arch): New function.
636         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
637         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
638         Declare.
639         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
640         (arm_read_description): New, with bits factored from
641         arm_arch_setup.
642         (arm_arch_setup): Reimplement.
643         (target_regsets): Rename to ...
644         (arm_regsets): ... this, and make static.
645         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
646         (arm_regs_info): New function.
647         (the_low_target): Adjust.
648         (initialize_low_arch): New function.
649         * linux-m68k-low.c (tdesc_m68k): Declare.
650         (target_regsets): Rename to ...
651         (m68k_regsets): ... this, and make static.
652         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
653         (m68k_regs_info): New function.
654         (m68k_arch_setup): New function.
655         (the_low_target): Adjust.
656         (initialize_low_arch): New function.
657         * linux-sh-low.c (tdesc_sharch): Declare.
658         (target_regsets): Rename to ...
659         (sh_regsets): ... this, and make static.
660         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
661         (sh_regs_info, sh_arch_setup): New functions.
662         (the_low_target): Adjust.
663         (initialize_low_arch): New function.
664         * linux-bfin-low.c (tdesc_bfin): Declare.
665         (bfin_arch_setup): New function.
666         (bfin_usrregs_info, regs_info): New globals.
667         (bfin_regs_info): New function.
668         (the_low_target): Adjust.
669         (initialize_low_arch): New function.
670         * linux-cris-low.c (tdesc_cris): Declare.
671         (cris_arch_setup): New function.
672         (cris_usrregs_info, regs_info): New globals.
673         (cris_regs_info): New function.
674         (the_low_target): Adjust.
675         (initialize_low_arch): New function.
676         * linux-cris-low.c (tdesc_crisv32): Declare.
677         (cris_arch_setup): New function.
678         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
679         (cris_regs_info): New function.
680         (the_low_target): Adjust.
681         (initialize_low_arch): New function.
682         * linux-m32r-low.c (tdesc_m32r): Declare.
683         (m32r_arch_setup): New function.
684         (m32r_usrregs_info, regs_info): New globals.
685         (m32r_regs_info): Adjust.
686         (initialize_low_arch): New function.
687         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
688         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
689         (tic6x_usrregs_info): Forward declare.
690         (tic6x_read_description): New function, based on ...
691         (tic6x_arch_setup): ... this.  Reimplement.
692         (target_regsets): Rename to ...
693         (tic6x_regsets): ... this, and make static.
694         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
695         (tic6x_regs_info): New function.
696         (the_low_target): Adjust.
697         (initialize_low_arch): New function.
698         * linux-xtensa-low.c (tdesc_xtensa): Declare.
699         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
700         (target_regsets): Rename to ...
701         (xtensa_regsets): ... this, and make static.
702         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
703         globals.
704         (xtensa_arch_setup, xtensa_regs_info): New functions.
705         (the_low_target): Adjust.
706         (initialize_low_arch): New function.
707         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
708         (nios2_arch_setup): Set the current process'es tdesc.
709         (target_regsets): Rename to ...
710         (nios2_regsets): ... this.
711         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
712         (nios2_regs_info): New function.
713         (the_low_target): Adjust.
714         (initialize_low_arch): New function.
715         * linux-aarch64-low.c (tdesc_aarch64): Declare.
716         (aarch64_arch_setup): Set the current process'es tdesc.
717         (target_regsets): Rename to ...
718         (aarch64_regsets): ... this.
719         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
720         (aarch64_regs_info): New function.
721         (the_low_target): Adjust.
722         (initialize_low_arch): New function.
723         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
724         globals.
725         (target_regsets): Rename to ...
726         (tile_regsets): ... this.
727         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
728         (tile_regs_info): New function.
729         (tile_arch_setup): Set the current process'es tdesc.
730         (the_low_target): Adjust.
731         (initialize_low_arch): New function.
732         * spu-low.c (tdesc_spu): Declare.
733         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
734         * win32-arm-low.c (tdesc_arm): Declare.
735         (arm_arch_setup): New function.
736         (the_low_target): Install arm_arch_setup instead of
737         init_registers_arm.
738         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
739         (init_windows_x86): Rename to ...
740         (i386_arch_setup): ... this.  Set `win32_tdesc'.
741         (the_low_target): Adjust.
742         * win32-low.c (win32_tdesc): New global.
743         (child_add_thread): Don't create the thread cache here.
744         (do_initial_child_stuff): Set the new process'es tdesc.
745         * win32-low.h (struct target_desc): Forward declare.
746         (win32_tdesc): Declare.
747         * lynx-i386-low.c (tdesc_i386): Declare global.
748         (lynx_i386_arch_setup): Set `lynx_tdesc'.
749         * lynx-low.c (lynx_tdesc): New global.
750         (lynx_add_process): Set the new process'es tdesc.
751         * lynx-low.h (struct target_desc): Forward declare.
752         (lynx_tdesc): Declare global.
753         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
754         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
755         * nto-low.c (nto_tdesc): New global.
756         (do_attach): Set the new process'es tdesc.
757         * nto-low.h (struct target_desc): Forward declare.
758         (nto_tdesc): Declare.
759         * nto-x86-low.c (tdesc_i386): Declare.
760         (nto_x86_arch_setup): Set `nto_tdesc'.
761
762 2013-06-04  Gary Benson  <gbenson@redhat.com>
763
764         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
765         to qSupported response when appropriate.
766         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
767         with nonzero-length annex.
768         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
769         arguments supplied in annex.
770
771 2013-05-31  Doug Evans  <dje@google.com>
772
773         PR server/15594
774         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
775         64 bits in 64-cross-32 environment.
776
777 2013-05-28  Pedro Alves  <palves@redhat.com>
778
779         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
780         (aarch64-without-fpu.c): Delete rule.
781         * configure.srv (aarch64*-*-linux*): Remove references to
782         aarch64-without-fpu.o and aarch64-without-fpu.xml.
783         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
784         declaration.
785
786 2013-05-24  Pedro Alves  <palves@redhat.com>
787
788         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
789         instead of strchr/decode_address.  Error if the range isn't split
790         with a ','.  Don't assume there's be a ':' in the action.
791
792 2013-05-23  Yao Qi  <yao@codesourcery.com>
793             Pedro Alves  <palves@redhat.com>
794
795         * linux-low.c (lwp_in_step_range): New function.
796         (linux_wait_1): If the thread was range stepping and stopped
797         outside the stepping range, report the stop to GDB.  Otherwise,
798         continue stepping.  Add range stepping debug output.
799         (linux_set_resume_request): Copy the step range from the resume
800         request to the lwp.
801         (linux_supports_range_stepping): New.
802         (linux_target_ops) <supports_range_stepping>: Set to
803         linux_supports_range_stepping.
804         * linux-low.h (struct linux_target_ops)
805         <supports_range_stepping>: New field.
806         (struct lwp_info) <step_range_start, step_range_end>: New fields.
807         * linux-x86-low.c (x86_supports_range_stepping): New.
808         (the_low_target) <supports_range_stepping>: Set to
809         x86_supports_range_stepping.
810         * server.c (handle_v_cont): Handle 'r' action.
811         (handle_v_requests): Append ";r" if the target supports range
812         stepping.
813         * target.h (struct thread_resume) <step_range_start,
814         step_range_end>: New fields.
815         (struct target_ops) <supports_range_stepping>:
816         New field.
817         (target_supports_range_stepping): New macro.
818
819 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
820
821         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
822         confusion in comment.
823
824 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
825
826         * lynx-low.c (struct process_info_private): New type.
827         (lynx_add_process): New function.
828         (lynx_create_inferior, lynx_attach): Replace calls to
829         add_process by calls to lynx_add_process.
830         (lynx_resume): If PTID is null, then try using
831         current_process()->private->last_wait_event_ptid.
832         Add comments.
833         (lynx_clear_inferiors): Delete.  The contents of that function
834         has been inlined in lynx_mourn;
835         (lynx_wait_1): Save the ptid in the process's private data.
836         (lynx_mourn): Free the process' private data.  Replace call
837         to lynx_clear_inferiors by call to clear_inferiors.
838
839 2013-05-17  Yao Qi  <yao@codesourcery.com>
840
841         * i386-low.c (i386_length_and_rw_bits): Move the comment to
842         the right place.
843
844 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
845
846         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
847         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
848         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
849         PT_TEXT_END_ADDR guards.  Update comments.
850         (linux_target_op) <read_offsets>: Conditionally define to
851         linux_read_offsets if the target is UCLIBC and if it defines
852         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
853
854 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
855             Andrew Jenner  <andrew@codesourcery.com>
856
857         * Makefile.in (SFILES): Add linux-nios2-low.c.
858         (clean): Add action to delete nios2-linux.c.
859         (nios2-linux.c): New rule.
860         * configure.srv: Add nios2*-*-linux*.
861         * linux-nios2-low.c: New.
862
863 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
864
865         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
866
867 2013-04-25  Hui Zhu  <hui@codesourcery.com>
868
869         PR gdb/15186
870         * ax.c (ax_printf): Add fflush.
871
872 2013-04-22  Tom Tromey  <tromey@redhat.com>
873
874         * Makefile.in (SFILES): Add filestuff.c.
875         (OBS): Add filestuff.o.
876         (filestuff.o): New target.
877         * config.in, configure: Rebuild.
878         * configure.ac: Check for fdwalk, pipe2.
879
880 2013-04-17  Pedro Alves  <palves@redhat.com>
881
882         * configure.ac (USE_THREAD_DB): Delete variable.
883         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
884         Don't AC_SUBST USE_THREAD_DB.
885         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
886         * config.in, configure: Regenerate.
887
888 2013-04-16  Pedro Alves  <palves@redhat.com>
889
890         * linux-low.h (struct lwp_info) <thread_known>: Move under
891         the USE_THREAD_DB #ifdef.
892
893 2013-04-16  Pedro Alves  <palves@redhat.com>
894
895         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
896         (linux-low.o): Delete rule.
897         * linux-low.h: Always include "gdb_thread_db.h" instead of
898         conditionally including thread_db.h.
899         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
900         HAVE_THREAD_DB_H.
901
902 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
903
904         * Makefile.in (install-only): Fix make install regression.
905
906 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
907
908         Convert man pages to texinfo, new gdbinit.5 texinfo page.
909         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
910         installation.
911         * gdbserver.1: Remove.
912
913 2013-03-22  Pedro Alves  <palves@redhat.com>
914
915         * linux-low.c (handle_extended_wait): Don't call
916         linux_enable_event_reporting.
917
918 2013-03-15  Tony Theodore  <tonyt@logyst.com>
919
920         PR build/9098:
921         * Makefile.in (SHELL): Use @SHELL@.
922
923 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
924
925         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
926         compiler warning.
927
928 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
929
930         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
931         Remove extraneous NULL element.
932
933 2013-03-13  Yao Qi  <yao@codesourcery.com>
934
935         * tracepoint.c (traceframe_read_tsv): Look for the last matched
936         'V' block in trace frame.
937
938 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
939
940         * target.h (struct target_ops): Add btrace ops.
941         (target_supports_btrace): New macro.
942         (target_enable_btrace): New macro.
943         (target_disable_btrace): New macro.
944         (target_read_btrace): New macro.
945         * gdbthread.h (struct thread_info): Add btrace field.
946         * server.c: Include btrace-common.h.
947         (handle_btrace_general_set): New function.
948         (handle_btrace_enable): New function.
949         (handle_btrace_disable): New function.
950         (handle_general_set): Call handle_btrace_general_set.
951         (handle_qxfer_btrace): New function.
952         (struct qxfer qxfer_packets[]): Add btrace entry.
953         * inferiors.c (remove_thread): Disable btrace.
954         * linux-low: Include linux-btrace.h.
955         (linux_low_enable_btrace): New function.
956         (linux_low_read_btrace): New function.
957         (linux_target_ops): Add btrace ops.
958         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
959         Add srv_linux_btrace=yes.
960         (x86_64-*-linux*): Add linux-btrace.o.
961         Add srv_linux_btrace=yes.
962         * configure.ac: Define HAVE_LINUX_BTRACE.
963         * config.in: Regenerated.
964         * configure: Regenerated.
965
966 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
967
968         * server.c (handle_qxfer): Preserve error message if -3 is
969         returned.
970         (qxfer): Document the -3 return value.
971
972 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
973
974         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
975         (linux_btrace_h): New variable.
976         (linux-btrace.o): New rule.
977
978 2013-03-08  Stan Shebs  <stan@codesourcery.com>
979             Hafiz Abid Qadeer  <abidh@codesourcery.com>
980
981         * tracepoint.c (trace_buffer_size): New global.
982         (DEFAULT_TRACE_BUFFER_SIZE): New define.
983         (init_trace_buffer): Change to one-argument function. Allocate
984         trace buffer memory.
985         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
986         handle QTBuffer:size packet.
987         (cmd_bigqtbuffer_size): New function.
988         (initialize_tracepoint): Call init_trace_buffer with
989         DEFAULT_TRACE_BUFFER_SIZE.
990         * server.c (handle_query): Add QTBuffer:size in the
991         supported packets.
992
993 2013-03-07  Yao Qi  <yao@codesourcery.com>
994
995         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
996         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
997         of -1.
998         (cmd_qtsp): Adjust condition.  Do post increment.
999         Set cur_action and cur_step_action back to 0.
1000
1001 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
1002
1003         PR server/15236
1004         * linux-low.c (linux_write_memory): Return early success if LEN is
1005         zero.
1006
1007 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
1008
1009         * configure.srv: Add x86_64-*-cygwin* as target.
1010
1011 2013-02-28  Tom Tromey  <tromey@redhat.com>
1012
1013         * configure.ac: Invoke AC_SYS_LARGEFILE.
1014         * configure, config.in: Rebuild.
1015
1016 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
1017
1018         * win32-low.c: Throughout, fix format strings and casts of
1019         printf-like functions to avoid type related warnings on all
1020         platforms.
1021         (get_child_debug_event): Print dwDebugEventCode as hex since
1022         that's how it's usually documented.
1023
1024 2013-02-28  Yao Qi  <yao@codesourcery.com>
1025
1026         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1027         pulongest.
1028
1029 2013-02-27  Jiong Wang  <jiwang@tilera.com>
1030
1031         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1032         (reg-tilegx32.c): New rule.
1033         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1034         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
1035         different register info initializer according to elf class.
1036         (init_registers_tilgx32): New function.  The tilegx32 register info
1037         initializer.
1038         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1039         (tile_store_gregset): Likewise.
1040
1041 2013-02-27  Yao Qi  <yao@codesourcery.com>
1042
1043         * server.c (process_point_options): Print debug message when
1044         debug_threads is true.
1045
1046 2013-02-26  Yao Qi  <yao@codesourcery.com>
1047
1048         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1049
1050 2013-02-19  Pedro Alves  <palves@redhat.com>
1051             Kai Tietz <ktietz@redhat.com>
1052
1053         PR gdb/15161
1054
1055         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1056         instead of strtoul to extract address from packet.
1057         (process_serial_event) <'z'>: Likewise.
1058
1059 2013-02-18  Yao Qi  <yao@codesourcery.com>
1060
1061         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1062
1063 2013-02-14  Pedro Alves  <palves@redhat.com>
1064
1065         Plug memory leak.
1066
1067         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1068         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1069
1070 2013-02-14  Pedro Alves  <palves@redhat.com>
1071
1072         * tracepoint.c (cmd_qtdpsrc): Use savestring.
1073
1074 2013-02-14  Pedro Alves  <palves@redhat.com>
1075
1076         * tracepoint.c (save_string): Delete.
1077         (add_tracepoint_action): Use savestring instead of save_string.
1078
1079 2013-02-12  Pedro Alves  <palves@redhat.com>
1080
1081         * linux-xtensa-low.c: Ditto.
1082         * xtensa-xtregs.c: Ditto.
1083
1084 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
1085
1086         * thread-db.c (thread_db_get_tls_address): NULL pointer check
1087         thread_db.
1088
1089 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1090
1091         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1092         aarch64_num_wp_regs and aarch64_num_bp_regs to
1093         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1094
1095 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1096
1097         * linux-aarch64-low.c (ps_get_thread_area): Replace
1098         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1099
1100 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
1101             Marcus Shawcroft  <marcus.shawcroft@arm.com>
1102             Nigel Stephens  <nigel.stephens@arm.com>
1103             Yufeng Zhang  <yufeng.zhang@arm.com>
1104
1105         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1106         (aarch64.c, aarch64-without-fpu.c): New targets.
1107         * configure.srv (aarch64*-*-linux*): New.
1108         * linux-aarch64-low.c: New file.
1109
1110 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1111
1112         * linux-low.c (handle_extended_wait, linux_create_inferior)
1113         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1114         (dequeue_one_deferred_signal, linux_resume_one_thread)
1115         (fetch_register, linux_write_memory, linux_enable_event_reporting)
1116         (linux_tracefork_grandchild, linux_test_for_tracefork)
1117         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1118         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1119         where the argument is 0.
1120
1121 2013-01-25  Yao Qi  <yao@codesourcery.com>
1122
1123         * event-loop.c: Include "queue.h".
1124         (gdb_event_p): New typedef.
1125         (struct gdb_event) <next_event>: Remove.
1126         (event_queue): Change to QUEUE(gdb_event_p).
1127         (async_queue_event): Remove.
1128         (gdb_event_xfree): New.
1129         (initialize_event_loop): New.
1130         (process_event): Use API from QUEUE.
1131         (wait_for_event): Likewise.
1132         * server.c (main): Call initialize_event_loop.
1133         * server.h (initialize_event_loop): Declare.
1134
1135 2013-01-18  Yao Qi  <yao@codesourcery.com>
1136
1137         * ax.h (struct eval_agent_expr_context): New.
1138         (gdb_eval_agent_expr): Update declaration.
1139         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1140         TFRAME.  Add new argument CTX.
1141         * server.h (struct eval_agent_expr_context): Declare.
1142         (agent_mem_read, agent_tsv_read): Update declaration.
1143         (agent_mem_read_string): Likewise.
1144         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1145         (add_traceframe_block): Add new argument TPOINT.
1146         Increase TPOINT->traceframe_usage.
1147         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1148         eval_tracepoint_agent_expr.
1149         (condition_true_at_tracepoint): Likewise.
1150         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
1151         (agent_mem_read_string, agent_tsv_read): Likewise.
1152
1153 2013-01-16  Yao Qi  <yao@codesourcery.com>
1154
1155         * linux-low.c (linux_resume_one_lwp): Don't check
1156         'lwp->bp_reinsert != 0'.
1157
1158 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
1159             Pedro Alves  <palves@redhat.com>
1160
1161         * lynx-low.c (ptrace_request_to_str): Define a temporary
1162         macro and use it to simplify this function's implementation.
1163
1164 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
1165
1166         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1167         sets errno.
1168
1169 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
1170
1171         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1172
1173 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
1174
1175         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1176
1177 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
1178
1179         * lynx-low.c (lynx_resume): Use the resume_info parameter
1180         to determine the ptid for the lynx_ptrace call, unless
1181         it is equal to minus_one_ptid, in which case we use the
1182         ptid of the current_inferior.
1183         (lynx_wait_1): After having received a thread create/exit
1184         event, resume the inferior's execution using the signaling
1185         thread's ptid, rather than the old ptid.
1186
1187 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
1188
1189         * lynx-low.c (lynx_resume): Delete variable ret.
1190
1191 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
1192
1193         * gdbreplay.c (gdbreplay_version): Update copyright year.
1194         * server.c (gdbserver_version): Likewise.
1195
1196 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
1197
1198         * lynx-low.c (lynx_wait_1): Add debug trace before adding
1199         new thread.
1200
1201 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
1202
1203         * lynx-low.c (ptrace_request_to_str): Add handling for
1204         PTRACE_GETTRACESIG.
1205
1206 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
1207
1208         * lynx-low.c (lynx_attach): Delete variable new_process.
1209
1210 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
1211
1212         * lynx-low.c (lynx_create_inferior): Delete variable
1213         new_process.
1214
1215 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
1216
1217         * lynx-low.c (ptrace_request_to_str): Do not handle
1218         PTRACE_GETTHREADLIST if this macro does not exist.
1219
1220 2012-12-15  Yao Qi  <yao@codesourcery.com>
1221
1222         * Makefile.in (OBS): Add notif.o.
1223         * notif.c, notif.h: New.
1224         * server.c: Include "notif.h".
1225         (struct vstop_notif) <next>: Remove.
1226         <base>: New field.
1227         (queue_stop_reply): Update.
1228         (push_event, send_next_stop_reply): Remove.
1229         (discard_queued_stop_replies): Update.
1230         (notif_stop): New variable.
1231         (handle_v_stopped): Remove.
1232         (handle_v_requests): Don't call handle_v_stopped.  Call
1233         handle_ack_notif instead.
1234         (queue_stop_reply_callback): Call notif_event_enque instead
1235         of queue_stop_reply.
1236         (handle_status): Don't call send_next_stop_reply, call
1237         notif_write_event instead.
1238         (kill_inferior_callback): Likewise.
1239         (detach_or_kill_inferior_callback): Likewise.
1240         (main): Call initialize_notif.
1241         (process_serial_event): Call QUEUE_is_empty.
1242         (handle_target_event): Call notif_push instead of push event.
1243         * server.h (push_event): Remove declaration.
1244
1245 2012-12-10  Tom Tromey  <tromey@redhat.com>
1246
1247         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1248         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1249         macros.
1250         (.c.o): Rewrite.
1251         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1252         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1253         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1254         (amd64-linux-ipa.o, ax.o): Rewrite.
1255         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1256         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1257         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1258         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1259         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1260         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1261         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1262         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1263         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1264         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1265         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1266         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1267         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1268         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1269         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1270         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1271         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1272         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1273         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1274         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1275         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1276         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1277         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1278         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1279         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1280         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1281         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1282         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1283         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1284         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1285         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1286         (reg-tilegx.o): Remove.
1287         (all_object_files): New macro.
1288         Include .deps files.
1289         * aclocal.m4, configure: Rebuild.
1290         * acinclude.m4: Include depstand.m4, lead-dot.m4.
1291         * configure.ac: Invoke ZW_CREATE_DEPDIR,
1292         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
1293
1294 2012-12-05  Tom Tromey  <tromey@redhat.com>
1295
1296         PR gdb/14917:
1297         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1298
1299 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
1300
1301         * configure.ac: Check for linux/perf_event.h.
1302         * config.in: Regenerated.
1303         * configure: Regenerated.
1304
1305 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
1306
1307         * hostio.c (handle_readlink): Decrease buffer size
1308         parameter passed to readlink by one byte.
1309
1310 2012-11-26  Yao Qi  <yao@codesourcery.com>
1311
1312         * configure.ac (build_warnings): Append '-Wempty-body'.
1313         * configure: Regenerated.
1314         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1315         body.
1316
1317 2012-11-15  Pierre Muller  <muller@sourceware.org>
1318
1319         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1320         * config.in: Regenerate.
1321         * configure: Regenerate.
1322         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1323         Use "gdb_wait.h" header instead of <sys/wait.h> header.
1324         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1325         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1326         header.
1327         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
1328         instead of <sys/wait.h> header.
1329         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1330
1331 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
1332
1333         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1334         (various make rules): Remove -DGDBSERVER
1335
1336 2012-11-09  Yao Qi  <yao@codesourcery.com>
1337
1338         * spu-low.c (current_ptid): Move it to ..
1339         * gdbthread.h: ... here.  New.
1340         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1341         * server.c (myresume, process_serial_event): Likewise.
1342         * thread-db.c (thread_db_find_new_threads): Likewise.
1343         * tracepoint.c (run_inferior_command): Likewise.
1344
1345 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
1346
1347         * server.c (handle_search_memory_1): Include access length in
1348         warning message.
1349
1350 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
1351
1352         * linux-crisv32-low.c: Fix compile errors.
1353
1354 2012-09-04  Yao Qi  <yao@codesourcery.com>
1355
1356         * tracepoint.c (cmd_qtsv): Adjust debug message.
1357         Don't check CUR_TPOINT.
1358
1359 2012-08-28  Yao Qi  <yao@codesourcery.com>
1360
1361         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1362         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1363         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1364         Remove declarations of xmalloc, xreallloc, xstrdup and
1365         freeargv.
1366         * Makefile.in (libiberty_h): New.
1367         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1368         (linux-bfin-low.o): Append dependency 'libiberty.h'.
1369
1370 2012-08-23  Yao Qi  <yao@codesourcery.com>
1371
1372         * server.h: Remove declaration of 'xsnprintf'.
1373
1374 2012-08-22  Keith Seitz  <keiths@redhat.com>
1375
1376         * server.h: Include build-gnulib-gbserver/config.h.
1377         * gdbreplay.c: Likewise.
1378
1379 2012-08-08  Doug Evans  <dje@google.com>
1380
1381         * Makefile.in (SFILES): Add gdb_vecs.c.
1382         (OBS): Add gdb_vecs.o.
1383         (gdb_vecs_h, host_defs_h): New variables.
1384         (thread-db.o): Add $(gdb_vecs_h) dependency.
1385         (gdb_vecs.o): New rule.
1386         * thread-db.c: #include "gdb_vecs.h".
1387         (thread_db_load_search): Use a vector to iterate over path elements.
1388         Handle text appearing after "$pdir".
1389
1390         * configure.ac: Add check for strstr.
1391         * config.in: Regenerate.
1392         * configure: Regenerate.
1393
1394 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
1395
1396         * hostio.c (handle_pread): If pread fails, fall back to attempting
1397         lseek/read.
1398         (handle_pwrite): Likewise for pwrite.
1399
1400 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
1401
1402         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1403         between unsupported TYPE and unimplementable ADDR/LEN combination.
1404         (arm_insert_point): Act on new return value.
1405
1406 2012-07-31  Pedro Alves  <palves@redhat.com>
1407
1408         * server.c (process_point_options): Only skip tokens if we find
1409         one that is unrecognized.  Don't treat 'X' specially while
1410         skipping unrecognized tokens.
1411
1412 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
1413
1414         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1415         to 4-byte-align HW breakpoint addresses for Thumb.
1416
1417 2012-07-27  Yao Qi  <yao@codesourcery.com>
1418
1419         PR remote/14161.
1420
1421         * server.h: Declare gdb_agent_about_to_close.
1422         * target.c (kill_inferior): Include "agent.h".
1423         New.  Send command 'kill'.
1424         * target.h (kill_inferior): Removed macro.
1425         * tracepoint.c (gdb_agent_about_to_close): New.
1426         (gdb_agent_helper_thread): Handle command 'close'.
1427         Wait endlessly until the inferior stops.
1428         Install gdb_agent_remove_socket to atexit hook.
1429         (agent_socket_name): New static variable.
1430         (gdb_agent_socket_init): Replace local variable 'name' with
1431         'agent_socket_name'.
1432         (gdb_agent_remove_socket): New.
1433
1434 2012-07-27  Yao Qi  <yao@codesourcery.com>
1435
1436         * server.c (process_point_options): Stop at 'X' when parsing.
1437
1438 2012-07-19  Michael Eager  <eager@eagercon.com>
1439
1440         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1441         to hw_execute.
1442         * linux-x86-low.c (x86_insert_point, x86_remove_point):
1443         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1444         hardware breakpoint.
1445
1446 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1447
1448         * gdbserver/linux-low.c (initialize_low): Call
1449         linux_ptrace_init_warnings.
1450
1451 2012-07-02  Doug Evans  <dje@google.com>
1452
1453         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1454         pointer to int.
1455
1456 2012-07-02  Stan Shebs  <stan@codesourcery.com>
1457
1458         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1459         (ax.o): Add it to build rule.
1460         (ax-ipa.o): Ditto.
1461         (OBS): Add format.o.
1462         (IPA_OBS): Add format.o.
1463         * server.c (handle_query): Claim support for breakpoint commands.
1464         (process_point_options): Add command case.
1465         (process_serial_event): Leave running if there are printfs in
1466         effect.
1467         * mem-break.h (any_persistent_commands): Declare.
1468         (add_breakpoint_commands): Declare.
1469         (gdb_no_commands_at_breakpoint): Declare.
1470         (run_breakpoint_commands): Declare.
1471         * mem-break.c (struct point_command_list): New struct.
1472         (struct breakpoint): New field command_list.
1473         (any_persistent_commands): New function.
1474         (add_commands_to_breakpoint): New function.
1475         (add_breakpoint_commands): New function.
1476         (gdb_no_commands_at_breakpoint): New function.
1477         (run_breakpoint_commands): New function.
1478         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1479         locally.
1480         * ax.c: Include format.h.
1481         (ax_printf): New function.
1482         (gdb_eval_agent_expr): Add printf opcode.
1483
1484 2012-06-13  Yao Qi  <yao@codesourcery.com>
1485
1486         * server.c (start_inferior): Remove duplicated writes to fields
1487         'last_resume_kind' and 'last_status' of 'current_inferior'.
1488
1489 2012-06-12  Yao Qi  <yao@codesourcery.com>
1490             Pedro Alves  <palves@redhat.com>
1491
1492         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
1493         comment.
1494         * server.c (handle_v_cont): Extend comment.
1495
1496 2012-06-11  Yao Qi  <yao@codesourcery.com>
1497
1498         * linux-low.c (linux_attach): Add 'static'.
1499
1500 2012-06-06  Yao Qi  <yao@codesourcery.com>
1501
1502         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1503
1504 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1505
1506         Fix gcc -flto compilation warning.
1507         * server.c (main): Make variable multi_mode and attach volatile.
1508
1509 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1510
1511         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1512         if the platform doesn't know about it.
1513
1514 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
1515
1516         * Makefile.in (SFILES): Add linux-tile-low.c.
1517         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1518         * configure.srv: Handle tilegx-*-linux*.
1519         * linux-tile-low.c: New file.
1520
1521 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
1522
1523         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1524
1525 2012-05-24  Pedro Alves  <palves@redhat.com>
1526
1527         PR gdb/7205
1528
1529         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1530
1531 2012-05-24  Pedro Alves  <palves@redhat.com>
1532
1533         PR gdb/7205
1534
1535         Replace target_signal with gdb_signal throughout.
1536
1537 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
1538
1539         * linux-low.c (linux_store_registers): Avoid the copying sequence
1540         when no data has been retrieved by ptrace.
1541
1542 2012-05-22  Will Deacon  <will.deacon@arm.com>
1543
1544         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1545         Include asm/ptrace.h.
1546         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1547         already defined.
1548
1549 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
1550
1551         * linux-low.c (linux_store_registers): Don't re-retrieve data
1552         with ptrace that has already been obtained from /proc.  Always
1553         copy any data retrieved with ptrace to the buffer supplied.
1554
1555 2012-05-11  Yao Qi  <yao@codesourcery.com>
1556             Pedro Alves  <palves@redhat.com>
1557
1558         * linux-low.c (enum stopping_threads_kind): New.
1559         (stopping_threads): Change type to `enum stopping_threads_kind'.
1560         (handle_extended_wait): If stopping and suspending threads, leave
1561         the new_lwp suspended too.
1562         (linux_wait_for_event): Adjust.
1563         (stop_all_lwps): Set `stopping_threads' to
1564         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1565         whether we're suspending threads or just stopping them.  Assert no
1566         recursion happens.
1567
1568 2012-04-29  Yao Qi  <yao@codesourcery.com>
1569
1570         * server.h: Move some code to ...
1571         * gdbthread.h: ... here.  New.
1572         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1573         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1574         (nto-low.o, win32-low.o): Likewise.
1575         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1576         * regcache.c, remote-utils.c, server.c: Likewise.
1577         * target.c, tracepoint.c, win32-low.c: Likewise.
1578
1579 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1580
1581         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1582         (PTRACE_ARG4_TYPE): Likewise.
1583         (PTRACE_XFER_TYPE): Likewise.
1584         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1585         ptrace to PTRACE_ARG3_TYPE.
1586         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1587         (PTRACE_ARG4_TYPE): Likewise.
1588         (PTRACE_XFER_TYPE): Likewise.
1589         (linux_detach_one_lwp): Cast fourth argument of
1590         ptrace to long then PTRACE_ARG4_TYPE.
1591         (regsets_fetch_inferior_registers): Cast third argument of
1592         ptrace to long then PTRACE_ARG3_TYPE.
1593         (regsets_store_inferior_registers): Likewise.
1594
1595 2012-04-20  Pedro Alves  <palves@redhat.com>
1596
1597         * configure: Regenerate.
1598
1599 2012-04-19  Pedro Alves  <palves@redhat.com>
1600
1601         * Makefile.in (GNULIB_BUILDDIR): New.
1602         (LIBGNU, INCGNU, GNULIB_H): Adjust.
1603         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1604         (all, install-only, uninstall, clean-info, all-lib, clean): No
1605         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
1606         (maintainer-clean realclean distclean): Use subdir_do.
1607         (subdir_do): New.
1608         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
1609         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
1610         * acinclude.m4: Include acx_configure_dir.m4.
1611         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1612         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
1613         ACX_CONFIGURE_DIR.
1614         (GNULIB): New.
1615         (GNULIB_STDINT_H): Adjust.
1616         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1617         * gdbreplay.c: Include build-gnulib/config.h.
1618         * server.h: Likewise.
1619         * aclocal.m4: Regenerate.
1620         * config.in: Regenerate.
1621         * configure: Regenerate.
1622
1623 2012-04-19  Pedro Alves  <palves@redhat.com>
1624
1625         * Makefile.in (LIBGNU, INCGNU): Adjust.
1626         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1627         (all, install-only, uninstall, clean-info, all-lib, clean)
1628         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1629         * configure.ac: Adjust AC_OUTPUT output.
1630         * aclocal.m4: Regenerate.
1631         * configure: Regenerate.
1632
1633 2012-04-19  Pedro Alves  <palves@redhat.com>
1634
1635         * Makefile.in (generated_files): New.
1636         (server_h): Remove the explicit dependency on config.h, and depend
1637         on $generated_files.
1638
1639 2012-04-19  Pedro Alves  <palves@redhat.com>
1640
1641         * Makefile.in (INCGNU): Add -Ignulib.
1642
1643 2012-04-19  Pedro Alves  <palves@redhat.com>
1644
1645         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1646         (INCGNU): ... this, and spell out -I here.
1647         (GNULIB_LIB): Rename to ...
1648         (LIBGNU): ... this.
1649         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1650
1651 2012-04-19  Pedro Alves  <palves@redhat.com>
1652
1653         * config.in: Regenerate.
1654
1655 2012-04-19  Pedro Alves  <palves@redhat.com>
1656
1657         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1658         * server.h (memmem): Remove declaration.
1659         * config.in: Regenerate.
1660         * configure: Regenerate.
1661
1662 2012-04-19  Yao Qi  <yao@codesourcery.com>
1663
1664         * Makefile.in (SFILES): Add common/vec.c.
1665         (OBS): Add vec.o.
1666         (vec.o): New rule.
1667
1668 2012-04-19  Yao Qi  <yao@codesourcery.com>
1669
1670         * remote-utils.c (prepare_resume_reply): Replace with macro
1671         target_core_of_thread.
1672         * server.c (handle_qxfer_threads_proper): Likewise.
1673         * target.h (traget_core_of_thread): New macro.
1674
1675 2012-04-18  Pedro Alves  <palves@redhat.com>
1676
1677         * aclocal.m4: Regenerate.
1678         * configure: Regenerate.
1679
1680 2012-04-16  Yao Qi  <yao@codesourcery.com>
1681
1682         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1683         duplicated on address.
1684
1685 2012-04-16  Yao Qi  <yao@codesourcery.com>
1686
1687         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1688         (struct tracepoint_action_ops) <send>: New field.
1689         (m_tracepoint_action_send, r_tracepoint_action_send): New.
1690         (agent_expr_send, x_tracepoint_action_send): New.
1691         (l_tracepoint_action_send): New.
1692         (cmd_qtdp): Download and install tracepoint
1693         according to `use_agent'.
1694         (run_inferior_command): Add one more parameter `len'.
1695         Update callers.
1696         (tracepoint_send_agent): New.
1697         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1698
1699 2012-04-16  Yao Qi  <yao@codesourcery.com>
1700
1701         * tracepoint.c (download_tracepoints): Moved to ...
1702         (cmd_qtstart): ... here.
1703
1704 2012-04-14  Yao Qi  <yao@codesourcery.com>
1705
1706         * tracepoint.c: Include inttypes.h.
1707         (struct collect_memory_action): Use sized types.
1708         (struct tracepoint): Likewise.
1709         (cmd_qtdp, stop_tracing): Update print specifiers.
1710         (cmd_qtp, response_tracepoint): Likewise.
1711         (collect_data_at_tracepoint): Likewise.
1712         (collect_data_at_step): Likewise.
1713
1714 2012-04-14  Yao Qi  <yao@codesourcery.com>
1715
1716         Import gnulib module inttypes.
1717         * aclocal.m4, config.in, configure: Regenerated.
1718
1719 2012-04-14  Yao Qi  <yao@codesourcery.com>
1720
1721         * Makefile.in (maintainer-clean, realclean, distclean): Remove
1722         Makefile and config.status at last.
1723
1724 2012-04-13  Yao Qi  <yao@codesourcery.com>
1725
1726         * tracepoint.c: Include stdint.h unconditionally.
1727
1728 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1729
1730         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1731         on BFD_HAVE_SYS_PROCFS_TYPE.
1732         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1733         * configure: Regenerate.
1734         * config.in: Likewise.
1735
1736 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
1737
1738         * Makefile.in (clean): Also remove x32.c x32-linux.c
1739         x32-avx.c x32-avx-linux.c.
1740         (x32.o): New target.
1741         (x32.c): Likewise.
1742         (x32-linux.o): Likewise.
1743         (x32-linux.c): Likewise.
1744         (x32-avx.o): Likewise.
1745         (x32-avx.c): Likewise.
1746         (x32-avx-linux.o): Likewise.
1747         (x32-avx-linux.c): Likewise.
1748
1749         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1750         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1751         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1752         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1753         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1754         i386/x32-avx-linux.xml.
1755
1756         * linux-x86-low.c (init_registers_x32_linux): New prototype.
1757         (init_registers_x32_avx_linux): Likwise.
1758         (x86_linux_update_xmltarget): Call init_registers_x32_linux
1759         or init_registers_x32_avx_linux if linux_is_elf64 is false.
1760
1761 2012-04-13  Pedro Alves  <palves@redhat.com>
1762
1763         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1764         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1765         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1766         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1767         the sub-make.
1768
1769 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
1770
1771         * linux-x86-low.c (compat_x32_clock_t): New.
1772         (compat_x32_siginfo_t): Likewise.
1773         (compat_x32_siginfo_from_siginfo): Likewise.
1774         (siginfo_from_compat_x32_siginfo): Likewise.
1775         (linux_is_elf64): Likewise.
1776         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1777         and siginfo_from_compat_x32_siginfo for x32.
1778         (x86_arch_setup): Set linux_is_elf64.
1779
1780 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
1781
1782         PR gdb/13969
1783         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1784         e_machine field.
1785         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1786         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1787         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1788         compatible with process.
1789
1790 2012-04-12  Yao Qi  <yao@codesourcery.com>
1791
1792         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1793         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1794         (install-only, install-info, clean): Handle sub dir gnulib.
1795         (all-lib, am--refresh): New targets.
1796         (memmem.o): Remove target.
1797         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1798         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
1799         (AC_REPLACE_FUNCS): Remove memmem.
1800         Invoke gl_INIT and AM_INIT_AUTOMAKE.
1801         (AC_OUTPUT): Generate Makefile in gnulib/.
1802         * aclocal.m4, config.in, configure: Regenerated.
1803
1804 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
1805
1806         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1807
1808 2012-04-05  Pedro Alves  <palves@redhat.com>
1809
1810         -Werror=strict-aliasing
1811
1812         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1813         pointer.
1814
1815 2012-04-04  Pedro Alves  <palves@redhat.com>
1816
1817         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1818         (sparc_store_gregset_from_stack, sparc_store_gregset)
1819         (sparc_breakpoint_at): Fix formatting.
1820
1821 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
1822
1823         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1824         are available.
1825         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1826         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1827         * config.in: Regenerate.
1828         * configure: Likewise.
1829
1830 2012-03-29  Pedro Alves  <palves@redhat.com>
1831
1832         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1833         Correct ptrace arguments.
1834
1835 2012-03-28  Pedro Alves  <palves@redhat.com>
1836
1837         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1838         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1839         (IA64_FR1_REGNUM): New defines.
1840         (ia64_fetch_register): New.
1841         (the_low_target): Install it.
1842         * linux-low.h (struct linux_target_ops) <fetch_register>: New
1843         field.
1844         * linux-low.c (linux_fetch_registers): Try the
1845         the_low_target.fetch_register hook first.
1846
1847         * linux-arm-low.c (the_low_target): Adjust.
1848         * linux-bfin-low.c (the_low_target): Adjust.
1849         * linux-cris-low.c (the_low_target): Adjust.
1850         * linux-crisv32-low.c (the_low_target): Adjust.
1851         * linux-m32r-low.c (the_low_target): Adjust.
1852         * linux-m68k-low.c (the_low_target): Adjust.
1853         * linux-mips-low.c (the_low_target): Adjust.
1854         * linux-ppc-low.c (the_low_target): Adjust.
1855         * linux-s390-low.c (the_low_target): Adjust.
1856         * linux-sh-low.c (the_low_target): Adjust.
1857         * linux-sparc-low.c (the_low_target): Adjust.
1858         * linux-tic6x-low.c (the_low_target): Adjust.
1859         * linux-x86-low.c (the_low_target): Adjust.
1860         * linux-xtensa-low.c (the_low_target): Adjust.
1861
1862 2012-03-26  Pedro Alves  <palves@redhat.com>
1863
1864         * server.c (handle_qxfer_libraries): Don't bail early if
1865         the_target->qxfer_libraries_svr4 is not NULL.
1866
1867 2012-03-26  Pedro Alves  <palves@redhat.com>
1868
1869         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1870
1871 2012-03-23  Pedro Alves  <palves@redhat.com>
1872
1873         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1874         "library-list-svr4" element's start tag when the the DSO list is
1875         empty.
1876
1877 2012-03-23  Pedro Alves  <palves@redhat.com>
1878
1879         * linux-low.c (read_one_ptr): Read the inferior's pointer through
1880         a variable whose type size is the same as the inferior's pointer
1881         size.
1882
1883 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
1884
1885         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1886         struct siginfo.
1887         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1888         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1889         * linux-low.h: Include <signal.h>.
1890         (struct siginfo): Remove forward declaration.
1891         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1892         struct siginfo.
1893
1894 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
1895
1896         * .gitignore: Ignore more files.
1897
1898 2012-03-19  Pedro Alves  <palves@redhat.com>
1899             Jan Kratochvil  <jan.kratochvil@redhat.com>
1900
1901         * server.c (cont_thread, general_thread): Add describing comments.
1902         (start_inferior): Clear `cont_thread'.
1903         (handle_v_cont): Don't set `cont_thread' if resuming all threads
1904         of a process.
1905
1906 2012-03-15  Yao Qi  <yao@codesourcery.com>
1907
1908         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1909         handling to ...
1910         (cmd_qtdp): ... here.
1911
1912 2012-03-15  Yao Qi  <yao@codesourcery.com>
1913
1914         * tracepoint.c (struct tracepoint_action_ops): New.
1915         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1916         (m_tracepoint_action_download): New.
1917         (r_tracepoint_action_download): New.
1918         (x_tracepoint_action_download): New.
1919         (l_tracepoint_action_download): New.
1920         (add_tracepoint_action): Install `action->ops' according type.
1921         (download_tracepoint_1): Move code `download' function pointer
1922         of various tracepoint_action_ops.
1923
1924 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1925
1926         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
1927         linux_ptrace_attach_warnings.
1928
1929 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1930
1931         * Makefile.in (linux-ptrace.o): New.
1932         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1933         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1934         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1935         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1936         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1937         of these targets.
1938         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1939
1940 2012-03-08  Yao Qi  <yao@codesourcery.com>
1941             Pedro Alves  <palves@redhat.com>
1942
1943         Fix PR server/13392.
1944         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1945         offset of JMP insn.
1946         * tracepoint.c (remove_tracepoint): New.
1947         (cmd_qtdp): Call remove_tracepoint when failed to install.
1948
1949 2012-03-07  Pedro Alves  <palves@redhat.com>
1950
1951         * linux-low.c (get_detach_signal): New.
1952         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1953         Pass on pending signals to PTRACE_DETACH.  Check the result of the
1954         ptrace call.
1955         * server.c (program_signals, program_signals_p): New.
1956         (handle_general_set): Handle QProgramSignals.
1957         * server.h (program_signals, program_signals_p): Declare.
1958
1959 2012-03-05  Pedro Alves  <palves@redhat.com>
1960             Jan Kratochvil  <jan.kratochvil@redhat.com>
1961
1962         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1963         New comment why.
1964
1965 2012-03-03  Yao Qi  <yao@codesourcery.com>
1966
1967         * tracepoint.c (tracepoint_look_up_symbols): Update call to
1968         agent_look_up_symbols.
1969
1970 2012-03-03  Yao Qi  <yao@codesourcery.com>
1971
1972         * Makefile.in (linux-low.o): Keep dependence on agent.h.
1973         (linux-x86-low.o): Likewise.
1974         * server.h: Remove in_process_agent_loaded.
1975         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
1976         common/agent.c.
1977         Update callers.
1978
1979 2012-03-03  Yao Qi  <yao@codesourcery.com>
1980
1981         * tracepoint.c (gdb_agent_capability): New global.
1982         (in_process_agent_loaded_ust): Renamed to
1983         `in_process_agent_supports_ust'.
1984         Update callers.
1985         (in_process_agent_supports_ust): Call agent_capability_check.
1986         (clear_installed_tracepoints): Assert that agent supports
1987         agent.
1988
1989 2012-03-03  Yao Qi  <yao@codesourcery.com>
1990
1991         * linux-low.c (linux_supports_agent): New.
1992         (linux_target_ops): Initialize field `supports_agent' with
1993         linux_supports_agent.
1994         * target.h (struct target_ops) <supports_agent>: New.
1995         (target_supports_agent): New macro.
1996         * server.c (handle_general_set): Handle packet 'QAgent'.
1997         (handle_query): Send `QAgent+'.
1998         * Makefile.in (server.o): Depends on agent.h.
1999
2000 2012-03-03  Yao Qi  <yao@codesourcery.com>
2001
2002         * Makefile.in (OBS): Add agent.o.
2003         Add new rule for agent.o.
2004         Track dependence of tracepoint.c on agent.h.
2005         * tracepoint.c (run_inferior_command_1):
2006         (run_inferior_command): Call agent_run_command.
2007         (gdb_ust_connect_sync_socket): Deleted.  Move it to
2008         common/agent.c.
2009         (resume_thread, stop_thread): Likewise.
2010         (gdb_ust_socket_init): Renamed to ...
2011         (gdb_agent_socket_init): ... New.
2012         (gdb_ust_thread): Renamed to ...
2013         (gdb_agent_helper_thread): ... New.
2014         (gdb_ust_init): Move some code to ...
2015         (gdb_agent_init): ... here.  New.
2016         [HAVE_UST]: Call gdb_ust_init.
2017         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
2018         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2019         * config.in, configure: Regenerated.
2020
2021 2012-03-02  Pedro Alves  <palves@redhat.com>
2022
2023         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2024         * linux-low.c (struct simple_pid_list): New.
2025         (stopped_pids): New a struct simple_pid_list pointer.
2026         (add_to_pid_list, pull_pid_from_list): New.
2027         (handle_extended_wait): Don't assume the first signal new children
2028         report is SIGSTOP.  Adjust call to pull_pid_from_list.
2029         (linux_wait_for_lwp): Adjust.
2030
2031 2012-03-02  Yao Qi  <yao@codesourcery.com>
2032
2033         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2034         debug log.
2035
2036 2012-03-02  Yao Qi  <yao@codesourcery.com>
2037
2038         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2039         `stop_pc' and `tpoint'.  Update caller.
2040
2041 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
2042
2043         * linux-low.h (linux_target_ops): Add regset_bitmap member.
2044         * linux-low.c (use_linux_regsets): New macro.
2045         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2046         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2047         (linux_register_in_regsets): New function.
2048         (usr_fetch_inferior_registers): Skip registers covered by
2049         regsets.
2050         (usr_store_inferior_registers): Likewise.
2051         (usr_fetch_inferior_registers): New macro.
2052         (usr_store_inferior_registers): Likewise.
2053         (linux_fetch_registers): Handle mixed regset/non-regset targets.
2054         (linux_store_registers): Likewise.
2055         * linux-mips-low.c (init_registers_mips_dsp_linux): New
2056         prototype.
2057         (init_registers_mips64_dsp_linux): Likewise.
2058         (init_registers_mips_linux): New macro.
2059         (init_registers_mips_dsp_linux): Likewise.
2060         (mips_dsp_num_regs): Likewise.
2061         (DSP_BASE, DSP_CONTROL): New fallback macros.
2062         (mips_base_regs): New macro.
2063         (mips_regmap): Use it.  Fix the size.
2064         (mips_dsp_regmap): New variable.
2065         (mips_dsp_regset_bitmap): Likewise.
2066         (mips_arch_setup): New function.
2067         (mips_cannot_fetch_register): Use the_low_target.regmap rather
2068         than mips_regmap.
2069         (mips_cannot_store_register): Likewise.
2070         (the_low_target): Update .arch_setup, .num_regs and .regmap
2071         initializers.  Add .regset_bitmap initializer.
2072         * linux-arm-low.c (the_low_target): Add .regset_bitmap
2073         initializer.
2074         * linux-bfin-low.c (the_low_target): Likewise.
2075         * linux-cris-low.c (the_low_target): Likewise.
2076         * linux-crisv32-low.c (the_low_target): Likewise.
2077         * linux-ia64-low.c (the_low_target): Likewise.
2078         * linux-m32r-low.c (the_low_target): Likewise.
2079         * linux-m68k-low.c (the_low_target): Likewise.
2080         * linux-ppc-low.c (the_low_target): Likewise.
2081         * linux-s390-low.c (the_low_target): Likewise.
2082         * linux-sh-low.c (the_low_target): Likewise.
2083         * linux-sparc-low.c (the_low_target): Likewise.
2084         * linux-tic6x-low.c (the_low_target): Likewise.
2085         * linux-x86-low.c (the_low_target): Likewise.
2086         * linux-xtensa-low.c (the_low_target): Likewise.
2087         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2088         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
2089         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2090         srv_xmlfiles.
2091         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2092         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2093
2094 2012-02-29  Yao Qi  <yao@codesourcery.com>
2095             Pedro Alves  <palves@redhat.com>
2096
2097         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2098         `step_over_finished' is true.
2099
2100 2012-02-27  Pedro Alves  <palves@redhat.com>
2101
2102         * linux-low.c (pid_is_stopped): Delete, moved to common/.
2103         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2104
2105 2012-02-27  Pedro Alves  <palves@redhat.com>
2106
2107         PR server/9684
2108         * linux-low.c (pid_is_stopped): New.
2109         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2110
2111 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
2112
2113         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2114         of conditions.
2115
2116 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
2117
2118         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2119
2120 2012-02-24  Luis Machado  <lgustavo@codesourcery>
2121
2122         * server.c (handle_query): Advertise support for target-side
2123         breakpoint condition evaluation.
2124         (process_point_options): New function.
2125         (process_serial_event): When inserting a breakpoint, check for
2126         a target-side condition that should be evaluated.
2127
2128         * mem-break.c: Include regcache.h and ax.h.
2129         (point_cond_list_t): New data structure.
2130         (breakpoint) <cond_list>: New field.
2131         (find_gdb_breakpoint_at): Make non-static.
2132         (delete_gdb_breakpoint_at): Clear any target-side
2133         conditions.
2134         (clear_gdb_breakpoint_conditions): New function.
2135         (add_condition_to_breakpoint): Likewise.
2136         (add_breakpoint_condition): Likewise.
2137         (gdb_condition_true_at_breakpoint): Likewise.
2138         (gdb_breakpoint_here): Return result directly instead
2139         of going through a local variable.
2140
2141         * mem-break.h (find_gdb_breakpoint_at): New prototype.
2142         (clear_gdb_breakpoint_conditions): Likewise.
2143         (add_breakpoint_condition): Likewise.
2144         (gdb_condition_true_at_breakpoint): Likewise.
2145
2146         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2147         (need_step_over_p): Take target-side breakpoint condition into
2148         consideration.
2149
2150 2012-02-24  Luis Machado  <lgustavo@codesourcery>
2151
2152         * server.h: Include tracepoint.h.
2153         (agent_mem_read, agent_get_trace_state_variable_value,
2154         agent_set_trace_state_variable_value,
2155         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2156         get_set_tsv_func_addr): New prototypes.
2157
2158         * ax.h: New include file.
2159         * ax.c: New source file.
2160
2161         * tracepoint.c: Include ax.h.
2162         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2163         agent_expr, eval_result_type): Move to ax.h.
2164         (parse_agent_expr): Rename to ...
2165         (gdb_parse_agent_expr): ... this, make it non-static and move
2166         to ax.h.
2167         (unparse_agent_expr) Rename to ...
2168         (gdb_unparse_agent_expr): ... this, make it non-static and move
2169         to ax.h.
2170         (eval_agent_expr): Rename to ...
2171         (eval_tracepoint_agent_expr): ... this.
2172         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2173         forward declarations.
2174         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2175         (agent_get_trace_state_variable_value): New function.
2176         (agent_set_trace_state_variable_value): New function.
2177         (cmd_qtdp): Call gdb_parse_agent_expr (...).
2178         (response_tracepoint): Call gdb_unparse_agent_expr (...).
2179         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2180         (condition_true_at_tracepoint): Likewise.
2181         (parse_agent_expr): Rename to ...
2182         (gdb_parse_agent_expr): ... this and move to ax.c.
2183         (unparse_agent_expr): Rename to ...
2184         (gdb_unparse_agent_expr): ... this and move to ax.c.
2185         (gdb_agent_op_name): Move to ax.c.
2186         (eval_agent_expr): Rename to ...
2187         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2188         and move to ax.c.
2189         (eval_tracepoint_agent_expr): New function.
2190         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2191         non-static.
2192         (current_insn_ptr, emit_error, struct bytecode_address): Move to
2193         ax.c.
2194         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2195         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2196         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2197         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2198         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2199         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2200         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2201         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2202         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2203         (compile_bytecodes): Remove forward declaration.
2204         (is_goto_target): Move to ax.c.
2205         (compile_bytecodes): Move to ax.c and call
2206         agent_get_trace_state_variable_value (...) and
2207         agent_set_trace_state_variable_value (...).
2208
2209         * Makefile.in: Update ax.c and IPA dependencies.
2210
2211 2012-02-24  Pedro Alves  <palves@redhat.com>
2212
2213         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2214         (cmd_bigqtbuffer_circular): ... this.  Only handle
2215         'QTBuffer:circular:'.
2216         (handle_tracepoint_general_set): Adjust.
2217
2218 2012-02-16  Yao Qi  <yao@codesourcery.com>
2219
2220         * inferiors.c: Move code to ...
2221         * dll.c: .... here.  New.
2222         * server.h: Declare clear_dlls.
2223         * Makefile.in (SFILES): Add dll.c.
2224         (OBS): Add dll.o
2225         (dll.o): New rule.
2226
2227 2012-02-11  Yao Qi  <yao@codesourcery.com>
2228
2229         * server.c: (handle_monitor_command): Add a new parameter
2230         `own_buf'.
2231         (handle_query): Update caller.
2232
2233 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
2234
2235         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2236         * configure, config.in: Regenerate.
2237         * hostio.c: Provide an alternate implementation if HAVE_READLINK
2238         is not defined.
2239
2240 2012-02-02  Pedro Alves  <palves@redhat.com>
2241
2242         Try SIGKILL first, then PTRACE_KILL.
2243         * linux-low.c (linux_kill_one_lwp): New.
2244         (linux_kill_one_lwp): Rename to ...
2245         (kill_one_lwp_callback): ... this.  Use the new
2246         linux_kill_one_lwp.
2247
2248 2012-02-02  Pedro Alves  <palves@redhat.com>
2249
2250         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2251         inferior.
2252
2253 2012-01-27  Pedro Alves  <palves@redhat.com>
2254
2255         * linux-low.c (linux_child_pid_to_exec_file): Delete.
2256         (elf_64_file_p): Make static.
2257         (linux_pid_exe_is_elf_64_file): New.
2258         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2259         Delete declarations.
2260         (linux_pid_exe_is_elf_64_file): Declare.
2261         * linux-x86-low.c (x86_arch_setup): Use
2262         linux_pid_exe_is_elf_64_file.
2263
2264 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
2265
2266         * linux-low.c (linux_wait_for_event_1): Rename to ...
2267         (linux_wait_for_event): ... here and merge it with former
2268         linux_wait_for_event - new variable wait_ptid, use it.
2269         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2270
2271 2012-01-23  Pedro Alves  <palves@redhat.com>
2272
2273         * server.c (main): Avoid yet another case of infinite loop while
2274         detaching/killing after a longjmp.
2275
2276 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
2277
2278         Code cleanup.
2279         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2280
2281 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
2282
2283         * hostio.c (handle_readlink): New function.
2284         (handle_vFile): Call it to handle "vFile:readlink" packets.
2285
2286 2012-01-20  Pedro Alves  <palves@redhat.com>
2287             Ulrich Weigand  <ulrich.weigand@linaro.org>
2288
2289         * server.c (handle_v_requests): Only support vAttach and vRun to
2290         start multiple processes when in extended protocol mode.
2291
2292 2012-01-17  Pedro Alves  <palves@redhat.com>
2293
2294         * tracepoint.c (initialize_tracepoint): Use mmap instead of
2295         memalign plus mprotect to allocate the scratch buffer.
2296
2297 2012-01-13  Pedro Alves  <palves@redhat.com>
2298
2299         * server.c (attach_inferior): Clear `cont_thread'.
2300
2301 2012-01-13  Pedro Alves  <palves@redhat.com>
2302
2303         * server.c (main): Avoid infinite loop while detaching/killing
2304         after a longjmp.
2305
2306 2012-01-09  Doug Evans  <dje@google.com>
2307
2308         * server.c (start_inferior): Set last_ptid in --wrapper case.
2309
2310 2012-01-06  Yao Qi  <yao@codesourcery.com>
2311
2312         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2313         defined.
2314         [IN_PROCESS_AGENT] (debug_agent): New global variable.
2315
2316 2012-01-04  Yao Qi  <yao@codesourcery.com>
2317
2318         * tracepoint.c (cmd_qtdp): Print debug message
2319         for static tracepoint.
2320
2321 2012-01-04  Yao Qi  <yao@codesourcery.com>
2322
2323         * tracepoint.c (trace_vdebug): Differentiate debug message
2324         between gdbserver and IPA.
2325
2326 2012-01-03  Yao Qi  <yao@codesourcery.com>
2327
2328         * tracepoint.c (tracepoint_was_hit): Don't collect for
2329         static tracepoint.
2330
2331 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
2332
2333         * terminal.h: Reformat copyright header.
2334
2335 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
2336
2337         * server.c (gdbserver_version): Update copyright year.
2338         * gdbreplay.c (gdbreplay_version): Likewise.
2339
2340 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
2341
2342         * linux-low.c (linux_create_inferior): Put empty if clause for write.
2343
2344         Revert:
2345         2011-12-18  Hui Zhu  <teawater@gmail.com>
2346         * linux-low.c (linux_create_inferior): Save return value to ret.
2347
2348 2011-12-18  Hui Zhu  <teawater@gmail.com>
2349
2350         * linux-low.c (linux_create_inferior): Save return value to ret.
2351
2352 2011-12-16  Doug Evans  <dje@google.com>
2353
2354         * linux-low.c (linux_create_inferior): If stdio connection,
2355         redirect stdin from /dev/null, stdout to stderr.
2356         * remote-utils.c (remote_is_stdio): New static global.
2357         (remote_connection_is_stdio): New function.
2358         (remote_prepare): Handle stdio connection.
2359         (remote_open): Ditto.
2360         (remote_close): Don't close stdin for stdio connections.
2361         (read_prim,write_prim): New functions.  Replace all calls to
2362         read/write to these.
2363         * server.c (main): Watch for "-" argument.  Move call to
2364         remote_prepare before start_inferior.
2365         * server.h (STDIO_CONNECTION_NAME): New macro.
2366         (remote_connection_is_stdio): Declare.
2367
2368         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2369         in debugging output.
2370
2371 2011-12-15  Yao Qi  <yao@codesourcery.com>
2372
2373         * tracepoint.c: Include sys/syscall.h.
2374         (gdb_ust_thread): Remove preprocessor conditional.
2375
2376 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
2377
2378         * linux-low.c (linux_detach_one_lwp): Call
2379         the_low_target.prepare_to_resume before detaching.
2380
2381 2011-12-14  Yao Qi  <yao@codesourcery.com>
2382
2383         * tracepoint.c (gdb_ust_thread): Don't ignore return value
2384         of write.
2385
2386 2011-12-14  Yao Qi  <yao@codesourcery.com>
2387
2388         * i386-low.c (i386_low_stopped_data_address): Initialize local
2389         variable `control'.
2390
2391 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
2392
2393         PR remote/13492
2394
2395         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2396         DR_CONTROL unless necessary.  Extend comments.
2397         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2398         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
2399
2400 2011-12-13  Yao Qi  <yao@codesourcery.com>
2401
2402         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2403         macros.
2404         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2405
2406 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
2407
2408         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2409         Print new debug message for such case.
2410
2411 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2412
2413         Fix overlapping memcpy.
2414         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
2415         the read_inferior_memory transfer.
2416         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
2417         write_inferior_memory transfer.
2418         (set_fast_tracepoint_jump): New variable buf.  Use it for the
2419         read_inferior_memory and write_inferior_memory transfers.
2420         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2421         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2422         Use it for the write_inferior_memory transfer.
2423         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2424         buffers.
2425
2426 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
2427
2428         * linux-low.c (fetch_register, store_register): Make code
2429         consistent, fix formatting.
2430
2431 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
2432
2433         * linux-low.c (usr_store_inferior_registers): Factor out code
2434         to handle individual registers into...
2435         (store_register): ... this new function.
2436
2437 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
2438
2439         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2440         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2441         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2442         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2443         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2444         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2445         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2446         (srv_xmlfiles): Add new XML files.
2447
2448         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2449         and <sys/uio.h>.
2450         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2451         (init_registers_s390_linux32v1): Add prototype.
2452         (init_registers_s390_linux32v2): Likewise.
2453         (init_registers_s390_linux64v1): Likewise.
2454         (init_registers_s390_linux64v2): Likewise.
2455         (init_registers_s390x_linux64v1): Likewise.
2456         (init_registers_s390x_linux64v2): Likewise.
2457         (s390_num_regs): Increment to 52.
2458         (s390_regmap): Add orig_r2 register.
2459         (s390_num_regs_3264): Increment to 68.
2460         (s390_regmap_3264): Add orig_r2 register.
2461         (s390_collect_ptrace_register): Handle orig_r2 register.
2462         (s390_supply_ptrace_register): Likewise.
2463         (s390_fill_last_break): New function.
2464         (s390_store_last_break): Likewise.
2465         (s390_fill_system_call): New function.
2466         (s390_store_system_call): Likewise.
2467         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2468         register sets.
2469         (s390_check_regset): New function.
2470         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2471         NT_S390_SYSTEM_CALL regsets and use appropriate description.
2472         Update target_regsets for available register sets.
2473
2474 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
2475             Jan Kratochvil  <jan.kratochvil@redhat.com>
2476
2477         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2478         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2479         New.
2480         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2481         * linux-low.h (struct process_info_private): New member r_debug.
2482         * server.c (handle_qxfer_libraries): Call
2483         the_target->qxfer_libraries_svr4.
2484         (handle_qxfer_libraries_svr4): New function.
2485         (qxfer_packets): New entry "libraries-svr4".
2486         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2487         * target.h (struct target_ops): New member qxfer_libraries_svr4.
2488         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2489         PACKET_qXfer_libraries_svr4.
2490
2491 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
2492
2493         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2494         PSW address/mask between 8-byte and 16-byte formats.
2495         (s390_supply_ptrace_register): Likewise.
2496         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2497         basic addressing mode bit.
2498
2499 2011-11-24  Stan Shebs  <stan@codesourcery.com>
2500
2501         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2502
2503 2011-11-17  Stan Shebs  <stan@codesourcery.com>
2504
2505         * tracepoint.c (struct tracepoint): New field traceframe_usage.
2506         (tracing_start_time): New global.
2507         (tracing_stop_time): New global.
2508         (tracing_user_name): New global.
2509         (tracing_notes): New global.
2510         (tracing_stop_note): New global.
2511         (cmd_qtstart): Set traceframe_usage, start_time.
2512         (stop_tracing): Set stop_time.
2513         (cmd_qtstatus): Report additional status.
2514         (cmd_qtp): New function.
2515         (handle_tracepoint_query): Call it.
2516         (cmd_qtnotes): New function.
2517         (handle_tracepoint_general_set): Call it.
2518         (get_timestamp): Rename from tsv_get_timestamp.
2519
2520 2011-11-14  Stan Shebs  <stan@codesourcery.com>
2521             Kwok Cheung Yeung  <kcy@codesourcery.com>
2522
2523         * linux-x86-low.c (small_jump_insn): New.
2524         (i386_install_fast_tracepoint_jump_pad): Add arguments for
2525         trampoline and error message, build a trampoline and issue a small
2526         jump instruction to it.
2527         (x86_install_fast_tracepoint_jump_pad): Add arguments for
2528         trampoline and error message.
2529         (x86_get_min_fast_tracepoint_insn_len): New.
2530         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2531         * linux-low.h (struct linux_target_ops): Add arguments to
2532         install_fast_tracepoint_jump_pad operation, add new operation.
2533         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2534         arguments.
2535         (linux_get_min_fast_tracepoint_insn_len): New function.
2536         (linux_target_op): Add new operation.
2537         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2538         (gdb_trampoline_buffer_end): Ditto.
2539         (gdb_trampoline_buffer_error): Ditto.
2540         (struct ipa_sym_addresses): Add fields for new IPA variables.
2541         (symbol_list): Add entries for new IPA variables.
2542         (struct tracepoint): Add fields to hold the address range of the
2543         trampoline used by the tracepoint.
2544         (trampoline_buffer_head): New static variable.
2545         (trampoline_buffer_tail): Ditto.
2546         (claim_trampoline_space): New function.
2547         (have_fast_tracepoint_trampoline_buffer): New function.
2548         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2549         structure.
2550         (install_fast_tracepoint): Ditto, also add error buffer argument.
2551         (cmd_qtminftpilen): New function.
2552         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2553         (fast_tracepoint_from_trampoline_address): New function.
2554         (fast_tracepoint_collecting): Handle trampoline as part of jump
2555         pad space.
2556         (set_trampoline_buffer_space): New function.
2557         (initialize_tracepoint): Initialize new IPA variables.
2558         * target.h (struct target_ops): Add arguments to
2559         install_fast_tracepoint_jump_pad operation, add new
2560         get_min_fast_tracepoint_insn_len operation.
2561         (target_get_min_fast_tracepoint_insn_len): New.
2562         (install_fast_tracepoint_jump_pad): Add arguments.
2563         * server.h (IPA_BUFSIZ): Define.
2564         * linux-i386-ipa.c: Include extra header files.
2565         (initialize_fast_tracepoint_trampoline_buffer): New function.
2566         (initialize_low_tracepoint): Call it.
2567         * server.h (set_trampoline_buffer_space): Declare.
2568         (claim_trampoline_space): Ditto.
2569         (have_fast_tracepoint_trampoline_buffer): Ditto.
2570
2571 2011-11-14  Yao Qi  <yao@codesourcery.com>
2572
2573         * server.c (handle_query): Handle InstallInTrace for qSupported.
2574         * tracepoint.c (add_tracepoint): Sort list.
2575         (install_tracepoint, download_tracepoint): New.
2576         (cmd_qtdp): Call them to install and download tracepoints.
2577         (sort_tracepoints): Removed.
2578         (cmd_qtstart): Update.
2579
2580 2011-11-14  Yao Qi  <yao@codesourcery.com>
2581
2582         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2583         * mem-break.h: Declare.
2584         * tracepoint.c (cmd_qtstart): Move some code to ...
2585         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2586         New.
2587         (download_tracepoints): Move some code to ...
2588         (download_tracepoint_1): ... here.  New.
2589
2590 2011-11-08  Yao Qi  <yao@codesourcery.com>
2591
2592         * remote-utils.c (relocate_instruction): A comment fix.
2593
2594 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
2595
2596         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2597         (i386_dr_low_get_control, i386_dr_low_get_status): Use
2598         dr_status_mirror and dr_control_mirror from debug_reg_state.
2599         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2600         (i386_initial_stuff): Remove use of deleted globals.
2601         (i386_get_thread_context, i386_set_thread_context,
2602         i386_thread_added): Use dr_status_mirror and dr_control_mirror
2603         from debug_reg_state.
2604
2605 2011-11-05  Yao Qi  <yao@codesourcery.com>
2606
2607         * tracepoint.c (gdb_collect): Loop over tracepoints of same
2608         address as TPOINT's.
2609
2610 2011-11-02  Stan Shebs  <stan@codesourcery.com>
2611
2612         * tracepoint.c (agent_mem_read_string): New function.
2613         (eval_agent_expr): Call it for tracenz.
2614         * server.c (handle_query): Report support for tracenz.
2615
2616 2011-11-02  Yao Qi  <yao@codesourcery.com>
2617
2618         * tracepoint.c (cmd_qtstart): Remove unused local variables.
2619
2620 2011-11-02  Yao Qi  <yao@codesourcery.com>
2621
2622         * target.h: Fix a typo in comment.
2623
2624 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
2625
2626         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
2627         clobber the breakpoints' shadows with fast tracepoint jumps.
2628         * mem-break.h (check_mem_write): Add `myaddr' parameter.
2629         * target.c (write_inferior_memory): Also pass MYADDR down to
2630         check_mem_write.
2631
2632 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
2633
2634         * configure.ac: Check support for personality routine.
2635         * configure: Regenerate.
2636         * config.in: Likewise.
2637         * linux-low.c: Include <sys/personality.h>.
2638         Define ADDR_NO_RANDOMIZE if necessary.
2639         (linux_create_inferior): Disable address space randomization when
2640         forking inferior, if requested.
2641         (linux_supports_disable_randomization): New function.
2642         (linux_target_ops): Install it.
2643         * server.h (disable_randomization): Declare.
2644         * server.c (disable_randomization): New global variable.
2645         (handle_general_set): Handle QDisableRandomization.
2646         (handle_query): Likewise for qSupported.
2647         (main): Support --disable-randomization and --no-disable-randomization
2648         command line arguments.
2649         * target.h (struct target_ops): Add supports_disable_randomization.
2650         (target_supports_disable_randomization): New macro.
2651
2652 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
2653
2654         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2655         ifdef check.
2656         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2657         [!PT_GETDSBT] (target_loadmap): New definition.
2658         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2659         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2660         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2661         and PT_GETDSBT to LINUX_LOADMAP.
2662         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2663         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2664
2665 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
2666
2667         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2668         (arm_linux_hwbp_cap): New static variable.
2669         (arm_linux_get_hwbp_cap): Replace by ...
2670         (arm_linux_init_hwbp_cap): ... this new function.
2671         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2672         (arm_linux_get_hw_watchpoint_count): Likewise.
2673         (arm_linux_get_hw_watchpoint_max_length): Likewise.
2674         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2675         (arm_prepare_to_resume): Use perror_with_name instead of error.
2676
2677 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
2678
2679         * linux-arm-low.c: Include <signal.h>.
2680         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2681         (struct arm_linux_hwbp_cap): New data type.
2682         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2683         (struct arm_linux_hw_breakpoint): New data type.
2684         (MAX_BPTS, MAX_WPTS): Define.
2685         (struct arch_process_info, struct arch_lwp_info): New data types.
2686         (arm_linux_get_hwbp_cap): New function.
2687         (arm_linux_get_hw_breakpoint_count): Likewise.
2688         (arm_linux_get_hw_watchpoint_count): Likewise.
2689         (arm_linux_get_hw_watchpoint_max_length): Likewise.
2690         (arm_hwbp_control_initialize): Likewise.
2691         (arm_hwbp_control_is_enabled): Likewise.
2692         (arm_hwbp_control_is_initialized): Likewise.
2693         (arm_hwbp_control_disable): Likewise.
2694         (arm_linux_hw_breakpoint_equal): Likewise.
2695         (arm_linux_hw_point_initialize): Likewise.
2696         (struct update_registers_data): New data structure.
2697         (update_registers_callback: New function.
2698         (arm_insert_point): Likewise.
2699         (arm_remove_point): Likewise.
2700         (arm_stopped_by_watchpoint): Likewise.
2701         (arm_stopped_data_address): Likewise.
2702         (arm_new_process): Likewise.
2703         (arm_new_thread): Likewise.
2704         (arm_prepare_to_resume): Likewise.
2705         (the_low_target): Register arm_insert_point, arm_remove_point,
2706         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2707         arm_new_thread, and arm_prepare_to_resume.
2708
2709 2011-09-15  Stan Shebs  <stan@codesourcery.com>
2710
2711         * server.h (struct emit_ops): Add compare-goto fields.
2712         * tracepoint.c (gdb_agent_op_sizes): New table.
2713         (emit_eq_goto): New function.
2714         (emit_ne_goto): New function.
2715         (emit_lt_goto): New function.
2716         (emit_le_goto): New function.
2717         (emit_gt_goto): New function.
2718         (emit_ge_goto): New function.
2719         (is_goto_target): New function.
2720         (compile_bytecodes): Recognize special cases of compare-goto
2721         combinations and call specialized emitters for them.
2722         * linux-x86-low.c (amd64_emit_eq_goto): New function.
2723         (amd64_emit_ne_goto): New function.
2724         (amd64_emit_lt_goto): New function.
2725         (amd64_emit_le_goto): New function.
2726         (amd64_emit_gt_goto): New function.
2727         (amd64_emit_ge_goto): New function.
2728         (amd64_emit_ops): Add the new functions.
2729         (i386_emit_eq_goto): New function.
2730         (i386_emit_ne_goto): New function.
2731         (i386_emit_lt_goto): New function.
2732         (i386_emit_le_goto): New function.
2733         (i386_emit_gt_goto): New function.
2734         (i386_emit_ge_goto): New function.
2735         (i386_emit_ops): Add the new functions.
2736
2737 2011-09-08  Stan Shebs  <stan@codesourcery.com>
2738
2739         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2740         (i386_emit_epilogue): Restore %ebx.
2741
2742 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
2743
2744         * server.c (step_thread): Remove definition.
2745         (process_serial_event): Don't handle Hs.
2746         * server.h (step_thread): Remove declaration.
2747         * target.c (set_desired_inferior): Remove use of step_thread.
2748
2749 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
2750
2751         * linux-low.c: Include linux-procfs.h.
2752         (linux_attach_lwp_1): Update comments.
2753         (linux_attach): Scan for existing threads when attaching to a
2754         process that is the tgid.
2755         * Makefile.in: Update dependencies.
2756
2757 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
2758
2759         * configure.srv: Add linux-procfs.o dependencies.
2760
2761 2011-08-14  Yao Qi  <yao@codesourcery.com>
2762
2763         * target.h (struct target_ops): Fix indent.
2764         * win32-low.c (win32_target_ops): Fix comment.
2765
2766 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
2767             Yao Qi  <yao@codesourcery.com>
2768
2769         * Makefile.in (clean): Remove tic6x-*.c files.
2770         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2771         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2772         (tic6x-c64xp-linux.c): Likewise.
2773         * configure.srv: Add support for tic6x-*-uclinux.
2774         * linux-tic6x-low.c: New.
2775         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2776
2777 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
2778             Yao Qi  <yao@codesourcery.com>
2779
2780         * target.h (struct target_ops): Add read_loadmap.
2781         * linux-low.c (struct target_loadseg): New type.
2782         (struct target_loadmap): New type.
2783         (linux_read_loadmap): New function.
2784         (linux_target_ops): Add linux_read_loadmap.
2785         * server.c (handle_query): Support qXfer:fdpic:read packet.
2786         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2787         to NULL.
2788
2789 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
2790
2791         * win32-low.c: Include <stdint.h>.
2792
2793 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
2794
2795         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2796         to the inferior here.
2797         (i386_remove_aligned_watchpoint): Ditto.
2798         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2799         fit part of the watchpoint in the debug registers.
2800         (i386_update_inferior_debug_regs): New.
2801         (i386_low_insert_watchpoint): Work on a local mirror of the debug
2802         registers, and only update the inferior on success.
2803         (i386_low_remove_watchpoint): Ditto.
2804
2805 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
2806
2807         * linux-low.c (compare_ints, unique, list_threads, show_process,
2808         linux_core_of_thread): Delete.
2809         (linux_target_ops): Change linux_core_of_thread to
2810         linux_common_core_of_thread.
2811         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2812         * utils.c (malloc_failure): Change type of argument.
2813         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2814         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2815         common/linux-osdata.c, common/ptid.c and common/buffer.c.
2816         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2817         (IPA_OBJS): Add common-utils-ipa.o.
2818         (ptid_h, linux_osdata_h): New macros.
2819         (server_h): Add common/common-utils.h, common/xml-utils.h,
2820         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2821         common/ptid.h.
2822         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2823         ptid.o, buffer.o): New rules.
2824         (linux-low.o): Add common/linux-osdata.h as a dependency.
2825         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2826         * configure.ac: Add AC_HEADER_DIRENT check.
2827         * config.in: Regenerate.
2828         * configure: Regenerate.
2829         * remote-utils.c (xml_escape_text): Delete.
2830         (buffer_grow, buffer_free, buffer_init, buffer_finish,
2831         buffer_xml_printf): Move to common/buffer.c.
2832         * server.c (main): Remove call to initialize_inferiors.
2833         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2834         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2835         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2836         internal_error, gdb_assert, gdb_assert_fail): Delete.
2837         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2838         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2839         common/buffer.h.
2840         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2841         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2842         initialize_inferiors): Delete.
2843
2844 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
2845
2846         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2847         symbol error.
2848
2849 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
2850
2851         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2852         assertion.
2853         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2854
2855 2011-05-26  Yao Qi  <yao@codesourcery.com>
2856
2857         * Makefile.in (thread-db.o): Track dependence to
2858         common/gdb_thread_db.h.
2859         * thread-db.c: include gdb_thread_db.h from right place.
2860
2861 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
2862
2863         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2864         __FILE__ and __LINE__ to internal_error.
2865
2866 2011-05-13  Doug Evans  <dje@google.com>
2867
2868         * thread-db.c (try_thread_db_load_from_sdir): New function.
2869         (try_thread_db_load_from_dir): New function.
2870         (thread_db_load_search): Handle $sdir, ignore $pdir.
2871         Remove trying of system directories if search of
2872         libthread-db-search-path fails, that is now done via $sdir.
2873
2874 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
2875
2876         * server.c (handle_query): Add EnableDisableTracepoints to the list
2877         of supported features.
2878         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2879         tracepoints.
2880         (cmd_qtenable_disable): New.
2881         (cmd_qtstart): Install tracepoints even if disabled.
2882         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2883         receiving a QTEnable or QTDisable packet.
2884         (gdb_collect): Skip data collection if fast tracepoint is disabled.
2885         (ust_marker_to_static_tracepoint): Do not ignore disabled static
2886         tracepoints.
2887         (gdb_probe): Skip data collection if static tracepoint is disabled.
2888
2889 2011-05-10  Doug Evans  <dje@google.com>
2890
2891         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2892
2893 2011-05-04  Doug Evans  <dje@google.com>
2894
2895         * linux-low.c (linux_join): Skip process lookup.
2896         * spu-low.c (spu_join): Ditto.
2897         * server.c (join_inferiors_callback): Delete.
2898         (process_serial_event): For 'D' packet (detach) call join_inferior
2899         directly.
2900
2901 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
2902
2903         * README: Don't mention xscale*-*-linux*.
2904         * configure.srv (xscale*-*-linux*): Don't handle target.
2905
2906 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
2907
2908         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2909         casting pointers.
2910         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2911         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2912         (i386_emit_void_call_2): Likewise.
2913
2914 2011-04-26  Yao Qi  <yao@codesourcery.com>
2915
2916         * linux-low.c: Move common macros to linux-ptrace.h.
2917         Include linux-ptrace.h.
2918         * Makefile.in (linux_ptrace_h): New.
2919         (linux-low.o): Depends on linux-ptrace.h.
2920
2921 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
2922
2923         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2924         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
2925         (remote_prepare): New function with most of the TCP code from ...
2926         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
2927         setting transport_is_reliable.
2928         * server.c (run_once): New variable.
2929         (gdbserver_usage): Document it.
2930         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
2931         the first run if RUN_ONCE.
2932         * server.h (run_once, remote_prepare): New declarations.
2933
2934 2011-04-19  Tom Tromey  <tromey@redhat.com>
2935
2936         * win32-low.c (handle_load_dll): Remove duplicate "the".
2937
2938 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
2939
2940         Remove support for old Cygwin 1.5 versions.
2941         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2942         function to avoid warning.
2943         (win32_add_one_solib): Use cygwin_conv_path function to avoid
2944         warning.
2945
2946 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
2947
2948         * gdbserver/server.h (Macro _): Define it if not available.
2949
2950 2011-03-14  Michael Snyder  <msnyder@vmware.com>
2951
2952         * hostio.c (handle_close): Remove unnecessary null test.
2953
2954 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
2955
2956         * Makefile.in (maintainer-clean realclean distclean): Remove
2957         "make ...  subdir_do" command.
2958
2959 2011-03-10  Michael Snyder  <msnyder@vmware.com>
2960
2961         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2962
2963         * server.c (handle_v_run): Free alloced buffer on early return.
2964
2965 2011-03-09  Yao Qi  <yao@codesourcery.com>
2966
2967         Revert:
2968         2011-03-04  Yao Qi  <yao@codesourcery.com>
2969
2970         * Makefile.in: Remove GNU make feature --directory.
2971
2972         2011-03-05  Yao Qi  <yao@codesourcery.com>
2973
2974         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2975         (subdir_do): New make target.  Copied from gdb/Makefile.
2976         (maintainer-clean, realclean, distclean, clean): Call corresponding
2977         make targets in common/Makefile.
2978
2979         2011-02-11  Yao Qi  <yao@codesourcery.com>
2980
2981         * configure.ac: Call AC_PROG_RANLIB.
2982         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
2983         * configure: Regenerate.
2984
2985 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2986
2987         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2988
2989 2011-03-06  Yao Qi  <yao@codesourcery.com>
2990
2991         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2992
2993 2011-03-05  Yao Qi  <yao@codesourcery.com>
2994
2995         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2996         (subdir_do): New make target.  Copied from gdb/Makefile.
2997         (maintainer-clean, realclean, distclean, clean): Call corresponding
2998         make targets in common/Makefile.
2999
3000 2011-03-04  Yao Qi  <yao@codesourcery.com>
3001
3002         * Makefile.in: Remove GNU make feature --directory.
3003
3004 2011-03-04  Michael Snyder  <msnyder@vmware.com>
3005
3006         * server.c (queue_stop_reply): Call xmalloc not malloc.
3007
3008 2011-03-02  Michael Snyder  <msnyder@vmware.com>
3009
3010         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3011
3012 2011-02-28  Michael Snyder  <msnyder@vmware.com>
3013
3014         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3015         (cmd_qtframe): Ditto.
3016         (cmd_qtbuffer): Ditto.
3017         (cmd_bigqtbuffer): Ditto.
3018
3019         * utils.c (decimal2str): Initialize 'width' to nine, then
3020         don't mess with it.
3021
3022 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
3023
3024         * hostio.c (require_data): Free *data, not data.
3025
3026 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3027
3028         * hostio.c (require_data): Use free, not xfree.
3029
3030 2011-02-27  Michael Snyder  <msnyder@vmware.com>
3031
3032         * server.c (handle_query): Discard unused value.
3033
3034         * hostio.c (require_data): Free malloc memory before returning
3035         error.
3036
3037 2011-02-26  Michael Snyder  <msnyder@vmware.com>
3038
3039         * linux-low.c (list_threads): Call closedir for dirent.
3040
3041 2011-02-27  Michael Snyder  <msnyder@vmware.com>
3042
3043         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3044         a case statement falls through.
3045
3046         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3047
3048         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3049         in comparison.
3050
3051 2011-02-26  Michael Snyder  <msnyder@vmware.com>
3052
3053         * utils.c (decimal2str): Eliminate dead code and dead param.
3054         (pulongest): Drop dead param from call to decimal2str.
3055         (plongest): Ditto.
3056
3057 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
3058
3059         Revert the following patch (not approved yet):
3060         2011-02-21  Hui Zhu  <teawater@gmail.com>
3061         * tracepoint.c (tp_printf): New function.
3062         (eval_agent_expr): Handle gdb_agent_op_printf.
3063
3064 2011-02-21  Hui Zhu  <teawater@gmail.com>
3065
3066         * tracepoint.c (tp_printf): New function.
3067         (eval_agent_expr): Handle gdb_agent_op_printf.
3068
3069 2011-02-18  Tom Tromey  <tromey@redhat.com>
3070
3071         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3072         (tracepoint.o): Likewise.
3073         * tracepoint.c (enum gdb_agent_op): Use ax.def.
3074         (gdb_agent_op_names): Likewise.
3075
3076 2011-02-18  Tom Tromey  <tromey@redhat.com>
3077
3078         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3079         gdb_agent_op_rot>: New constants.
3080         (gdb_agent_op_names): Add pick and roll.
3081         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3082         cases.
3083
3084 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
3085
3086         * aclocal.m4: Regenerated with aclocal-1.11.1.
3087
3088 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
3089
3090         * server.c (handle_qxfer_traceframe_info): New.
3091         (qxfer_packets): Register "traceframe-info".
3092         (handle_query): Report support for qXfer:traceframe-info:read+.
3093         * tracepoint.c (match_blocktype): New.
3094         (traceframe_find_block_type): Rename to ...
3095         (traceframe_walk_blocks): ... this.  Add callback filter argument,
3096         and use it.
3097         (traceframe_find_block_type): New, reimplemented on top of
3098         traceframe_walk_blocks.
3099         (build_traceframe_info_xml): New.
3100         (traceframe_read_info): New.
3101         * server.h (traceframe_read_info): Declare.
3102
3103 2011-02-11  Yao Qi  <yao@codesourcery.com>
3104
3105         * configure.ac: Call AC_PROG_RANLIB.
3106         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
3107         * configure: Regenerate.
3108
3109 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
3110
3111         * server.c (gdb_read_memory): Change return semantics to allow
3112         partial transfers.
3113         (handle_search_memory_1): Adjust.
3114         (process_serial_event) <'m' packet>: Handle partial transfers.
3115         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3116
3117 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
3118
3119         * regcache.c (init_register_cache): Initialize
3120         regcache->register_status.
3121         (free_register_cache): Release regcache->register_status.
3122         (regcache_cpy): Copy register_status.
3123         (registers_to_string): Print 'x's for unavailable registers.
3124         (supply_register): Mark the register's status valid or
3125         unavailable, depending on whether a buffer was passed in or not.
3126         (supply_register_zeroed): New.
3127         (supply_regblock): Mark the registers' status valid or
3128         unavailable, depending on whether a buffer was passed in or not.
3129         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3130         (struct regcache): New `register_status' field.
3131         (supply_register_zeroed): Declare.
3132         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3133         supply_register_zeroed, rather than passing a NULL buffer to
3134         supply_register.
3135         * tracepoint.c (fetch_traceframe_registers): Update comment.
3136
3137 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
3138
3139         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3140         buffer explicit.
3141
3142 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
3143
3144         * server.h (decode_xfer_write): Change prototype.
3145         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3146         and don't extract the annex here.
3147         * server.c (decode_xfer_read): Remove `annex' parameter,
3148         and don't extract the annex here.
3149         (decode_xfer): New.
3150         (struct qxfer): New.
3151         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3152         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3153         (handle_qxfer_statictrace): New functions, abstracted out from
3154         handle_query, and made to use the struct qxfer interface.
3155         (handle_threads_qxfer_proper): Rename to ...
3156         (handle_qxfer_threads_proper): ... this.
3157         (handle_threads_qxfer): Rename to ...
3158         (handle_qxfer_threads): ... this.  Adjust.
3159         (qxfer_packets): New array.
3160         (handle_qxfer): New function.
3161         (handle_query): Use handle_qxfer.
3162
3163 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
3164
3165         * gdbreplay.c: Shorten lines of >= 80 columns.
3166         * linux-low.c: Ditto.
3167         * linux-ppc-low.c: Ditto.
3168         * linux-s390-low.c: Ditto.
3169         * linux-sparc-low.c: Ditto.
3170         * linux-x86-low.c: Ditto.
3171         * linux-xtensa-low.c: Ditto.
3172         * mem-break.c: Ditto.
3173         * nto-low.c: Ditto.
3174         * regcache.h: Ditto.
3175         * remote-utils.c: Ditto.
3176         * server.c: Ditto.
3177         * server.h: Ditto.
3178         * thread-db.c: Ditto.
3179         * tracepoint.c: Ditto.
3180         * utils.c: Ditto.
3181         * win32-low.h: Ditto.
3182
3183 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
3184
3185         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3186         update.
3187
3188 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
3189
3190         * server.c (gdbserver_version): Update copyright year in version
3191         output.
3192         * gdbreplay.c (gdbreplay_version): Ditto.
3193
3194 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
3195
3196         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3197         * linux-bfin-low.c: New file.
3198         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3199         PT_DATA_ADDR for BFIN targets.
3200         * Makefile.in (SFILES): Add linux-bfin-low.c.
3201         (clean): Remove reg-bfin.c.
3202         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3203         * README: Mention supported Blackfin targets.
3204
3205 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
3206
3207         * .gitignore: New file.
3208
3209 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
3210
3211         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3212
3213 2010-10-22  Jie Zhang  <jie@codesourcery.com>
3214
3215         * Makefile.in: Add FLAGS_TO_PASS variable.
3216         (install): Remove dependency of install-only and recursively
3217         invoke make for install-only.
3218
3219 2010-10-04  Doug Evans  <dje@google.com>
3220
3221         * Makefile.in (uninstall): Use $(DESTDIR).
3222
3223 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
3224
3225         PR gdb/11842
3226
3227         * linux-x86-low.c (compat_siginfo_from_siginfo)
3228         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3229         si_code is < 0.  Check for si_code == SI_TIMER before checking for
3230         si_code < 0.
3231
3232 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
3233
3234         * lynx-i386-low.c: New file.
3235         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3236
3237 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
3238
3239         * lynx-low.c (ptrace_request_to_str): Remove handling for
3240         request values that have been removed in LynxOS 5.x.
3241
3242 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
3243
3244         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3245         <ptrace.h>
3246
3247 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
3248
3249         * configure.ac: Add --enable-inprocess-agent option.
3250         * configure: Rebuilt.
3251
3252 2010-09-06  Yao Qi  <yao@codesourcery.com>
3253
3254         * linux-low.c (linux_kill): Remove unused variable.
3255         (linux_stabilize_threads): Likewise.
3256         * server.c (start_inferior): Likewise.
3257         (queue_stop_reply_callback): Likewise.
3258         * tracepoint.c (do_action_at_tracepoint): Likewise.
3259
3260 2010-09-06  Yao Qi  <yao@codesourcery.com>
3261
3262         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3263         on return.
3264
3265 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3266
3267         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3268
3269 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
3270
3271         * Makefile.in (install-only): Replace $IPA_DEPFILES with
3272         "$(IPA_DEPFILES)".
3273
3274 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
3275
3276         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3277         gdbserver/lynx-ppc-low.c: New files.
3278         * Makefile.in (lynx_low_h): New variable.
3279         (lynx-low.o, lynx-ppc-low.o): New rules.
3280         * configure.ac: On LynxOS, link with -lnetinet.
3281         * configure.srv: Add handling of powerpc-*-lynxos* targets.
3282         * configure: regenerate.
3283
3284 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
3285
3286         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3287         * configure.ac: Add check for vasprintf and vsnprintf.
3288         * configure, config.in: Regenerate.
3289         * server.h (vasprintf, vsnprintf): Add conditional declarations.
3290
3291 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
3292
3293         * gdbreplay.c: Move include of alloca.h up, next to include of
3294         malloc.h.
3295         * server.h: Add include of malloc.h.
3296         * mem-break.c: Remove include of malloc.h.
3297         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3298
3299 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
3300
3301         * Makefile.in (memmem.o): Build with -Wno-error.
3302
3303 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
3304
3305         * utils.c (xsnprintf): Make non-static.
3306         * server.h: Add xsnprintf declaration.
3307         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3308         replace calls to snprintf by calls to xsnprintf throughout.
3309
3310 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
3311
3312         * configure.ac: Add configure check for alloca.
3313         * configure, config.in: Regenerate.
3314         * server.h: Include alloca.h if it exists.
3315         * gdbreplay.c: Include alloca.h if it exists.
3316
3317 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
3318
3319         * linux-low.c (__SIGRTMIN): Define if not already defined.
3320         (linux_create_inferior): Check for __ANDROID__ rather than
3321         __SIGRTMIN.
3322         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3323         are already deferred.
3324         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3325         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3326         stopped and already has a pending signal to report.
3327         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3328         a pending signal to report or is moving out of a jump pad.
3329         (linux_init_signals): Check for __ANDROID__ rather than
3330         __SIGRTMIN.
3331
3332 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
3333
3334         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3335         debug_threads check.  Avoid a linear search when not doing debug
3336         output.
3337
3338 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
3339
3340         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3341         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3342         (struct file_handler) <fd>: Change type to gdb_fildes_t.
3343         (process_event): Change local fd's type to gdb_fildes_t.
3344         (create_file_handler): Adjust prototype.
3345         (delete_file_handler): Adjust prototype.
3346         (handle_file_event): Adjust prototype.  Use pfildes.
3347         (create_file_event): Adjsut prototype.
3348         * remote-utils.c (remote_desc, listen_desc): Change type to
3349         gdb_fildes_t.
3350         * server.h: New gdb_fildes_t typedef.
3351         [USE_WIN32API]: Include winsock2.h.
3352         (delete_file_handler, add_file_handler): Adjust prototypes.
3353         (pfildes): Declare.
3354         * utils.c (pfildes): New.
3355
3356 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
3357
3358         * configure.ac (build_warnings): Add -Wno-char-subscripts.
3359         * configure: Regenerate.
3360
3361 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
3362
3363         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3364         (linux_done_accessing_memory): ... this.
3365         (linux_target_ops): Adjust.
3366         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3367         * nto-low.c (nto_target_ops): Adjust comment.
3368         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3369         * spu-low.c (spu_target_ops): Adjust comment.
3370         * target.h (target_ops): Rename unprepare_to_access_memory field
3371         to done_accessing_memory.
3372         (unprepare_to_access_memory): Rename to ...
3373         (done_accessing_memory): ... this.
3374
3375 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3376
3377         * linux-low.c (linux_prepare_to_access_memory): New.
3378         (linux_unprepare_to_access_memory): New.
3379         (linux_target_ops): Install them.
3380         * server.c (read_memory): Rename to ...
3381         (gdb_read_memory): ... this.  Use
3382         prepare_to_access_memory/prepare_to_access_memory.
3383         (write_memory): Rename to ...
3384         (gdb_write_memory): ... this.  Use
3385         prepare_to_access_memory/prepare_to_access_memory.
3386         (handle_search_memory_1): Adjust.
3387         (process_serial_event): Adjust.
3388         * target.h (struct target_ops): New fields
3389         prepare_to_access_memory and unprepare_to_access_memory.
3390         (prepare_to_access_memory, unprepare_to_access_memory): New.
3391         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3392         prepare_to_access_memory/prepare_to_access_memory.
3393         * nto-low.c (nto_target_ops): Adjust.
3394         * spu-low.c (spu_target_ops): Adjust.
3395         * win32-low.c (win32_target_ops): Adjust.
3396
3397 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3398
3399         * Makefile.in (WARN_CFLAGS): Get it from configure.
3400         (WERROR_CFLAGS): New.
3401         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3402         * configure.ac: Introduce --enable-werror, which adds -Werror to
3403         the compiler command line.  Enabled by default.  Disable with
3404         --disable-werror.  Add -Wdeclaration-after-statement
3405         Wpointer-arith and -Wformat-nonliteral to warning flags.
3406         * configure: Regenerate.
3407
3408 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3409
3410         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3411
3412 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
3413
3414         * gdbreplay.c (remote_error): New.
3415         (gdbchar): New.
3416         (expect): Use gdbchar.  Check for error reading from GDB.
3417         Clarify sync error output.
3418         (play): Check for errors writing to GDB.
3419         * linux-low.c (sigchld_handler): Really ignore `write' errors.
3420         * remote-utils.c (getpkt): Check for errors writing to the remote
3421         descriptor.
3422
3423 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
3424
3425         * linux-low.c (linux_wait_1): Move non-debugging code out of
3426         `debug_threads' control.
3427
3428 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
3429
3430         * linux-low.c (linux_wait_1): Don't set last_status here.
3431         * server.c (push_event, queue_stop_reply_callback): Assert we're
3432         not pushing a TARGET_WAITKIND_IGNORE event.
3433         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3434         (myresume, handle_target_event): Set the thread's last_resume_kind
3435         and last_status from the target returned status.
3436
3437 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
3438
3439         PR threads/10729
3440
3441         * linux-x86-low.c (update_debug_registers_callback): New.
3442         (i386_dr_low_set_addr): Use it.
3443         (i386_dr_low_get_addr): New.
3444         (i386_dr_low_set_control): Use update_debug_registers_callback.
3445         (i386_dr_low_get_control): New.
3446         (i386_dr_low_get_status): Adjust.
3447         * linux-low.c (linux_stop_lwp): New.
3448         * linux-low.h (linux_stop_lwp): Declare.
3449
3450         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3451         argument instead of a i386_debug_reg_state.
3452         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3453         a i386_debug_reg_state.
3454         (i386_insert_aligned_watchpoint): Adjust.
3455         (i386_remove_aligned_watchpoint): Adjust.
3456         (i386_low_stopped_data_address): Read the debug registers from the
3457         inferior instead of from the mirrors.
3458         * i386-low.h (struct i386_debug_reg_state): Extend comment.
3459         (i386_dr_low_get_addr): Declare.
3460         (i386_dr_low_get_control): Declare.
3461         (i386_dr_low_get_status): Change prototype.
3462
3463         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3464         (i386_dr_low_get_addr): New.
3465         (i386_dr_low_get_control): New.
3466         (i386_dr_low_get_status): Adjust prototype.  Return
3467         dr_status_mirror.
3468         (i386_initial_stuff): Clear dr_status_mirror and
3469         dr_control_mirror.
3470         (i386_get_thread_context): Adjust.
3471         (i386_set_thread_context): Adjust.
3472         (i386_thread_added): Adjust.
3473
3474 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
3475
3476         * linux-low.h (linux_thread_area): Delete declaration.
3477
3478 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
3479
3480         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3481         after its termination.
3482
3483 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
3484
3485         * linux-low.c (gdb_wants_lwp_stopped): Delete.
3486         (gdb_wants_all_stopped): Delete.
3487         (linux_wait_1): Don't call them.
3488         * server.c (handle_v_cont): Tag all threads as want-stopped.
3489         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
3490         stopped as "client-wants-stopped".
3491
3492 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
3493
3494         * Makefile.in (signals_h): New.
3495         (server_h): Depend on it.
3496         (server.o): Don't depend on $(signals_def).
3497         (signals.o): Depend on $(signals_def).
3498
3499 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
3500
3501         * Makefile.in (signals_def): New.
3502         (server_h): Append include/gdb/signals.h and signals_def.
3503         (server.o): Append signals_def.
3504
3505 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
3506
3507         * server.c (handle_target_event): Use target_signal_to_host for
3508         resume_info.sig initialization.
3509         * target.h (struct thread_resume) <sig>: New comment.
3510
3511 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
3512
3513         * server.c (handle_query): strcpy() the returned string from paddress()
3514         instead of sprintf().
3515         * utils.c (paddress): Return phex_nz().
3516
3517 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
3518
3519         * server.c (handle_v_cont): Call mourn_inferior if process
3520         just exited.
3521         (myresume): Likewise.
3522
3523 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
3524
3525         Static tracepoints, and integration with UST.
3526
3527         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
3528         * mem-break.c (uninsert_all_breakpoints)
3529         (reinsert_all_breakpoints): New.
3530         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3531         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3532         (gdb_agent_ust_loaded, helper_thread_id)
3533         (gdb_agent_helper_thread_id): New macros.
3534         (struct ipa_sym_addresses): Add addr_ust_loaded,
3535         addr_helper_thread_id, addr_cmd_buf.
3536         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3537         (in_process_agent_loaded_ust): New.
3538         (write_e_ust_not_loaded): New.
3539         (maybe_write_ipa_ust_not_loaded): New.
3540         (struct collect_static_trace_data_action): New.
3541         (enum tracepoint_type) <static_tracepoint>: New.
3542         (struct tracepoint) <handle>: Mention static tracepoints.
3543         (struct static_tracepoint_ctx): New.
3544         (CMD_BUF_SIZE): New.
3545         (add_tracepoint_action): Handle static tracepoint actions.
3546         (unprobe_marker_at): New.
3547         (clear_installed_tracepoints): Handle static tracepoints.
3548         (cmd_qtdp): Handle static tracepoints.
3549         (probe_marker_at): New.
3550         (cmd_qtstart): Handle static tracepoints.
3551         (response_tracepoint): Handle static tracepoints.
3552         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3553         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3554         (get_context_regcache): Handle static tracepoints.
3555         (do_action_at_tracepoint): Handle static tracepoint actions.
3556         (traceframe_find_block_type): Handle static trace data blocks.
3557         (traceframe_read_sdata): New.
3558         (download_tracepoints): Download static tracepoint actions.
3559         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3560         (GDB_PROBE_NAME): New.
3561         (ust_ops): New.
3562         (GET_UST_SYM): New.
3563         (USTF): New.
3564         (dlsym_ust): New.
3565         (ust_marker_to_static_tracepoint): New.
3566         (gdb_probe): New.
3567         (collect_ust_data_at_tracepoint): New.
3568         (gdb_ust_probe): New.
3569         (UNIX_PATH_MAX, SOCK_DIR): New.
3570         (gdb_ust_connect_sync_socket): New.
3571         (resume_thread, stop_thread): New.
3572         (run_inferior_command): New.
3573         (init_named_socket): New.
3574         (gdb_ust_socket_init): New.
3575         (cstr_to_hexstr): New.
3576         (next_st): New.
3577         (first_marker, next_marker): New.
3578         (response_ust_marker): New.
3579         (cmd_qtfstm, cmd_qtsstm): New.
3580         (unprobe_marker_at, probe_marker_at): New.
3581         (cmd_qtstmat, gdb_ust_thread): New.
3582         (gdb_ust_init): New.
3583         (initialize_tracepoint_ftlib): Call gdb_ust_init.
3584         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3585         (ST_REGENTRY): New.
3586         (x86_64_st_collect_regmap): New.
3587         (X86_64_NUM_ST_COLLECT_GREGS): New.
3588         (AMD64_RIP_REGNUM): New.
3589         (supply_static_tracepoint_registers): New.
3590         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3591         (ST_REGENTRY): New.
3592         (i386_st_collect_regmap): New.
3593         (i386_NUM_ST_COLLECT_GREGS): New.
3594         (supply_static_tracepoint_registers): New.
3595         * server.c (handle_query): Handle qXfer:statictrace:read.
3596         <qSupported>: Report support for StaticTracepoints, and
3597         qXfer:statictrace:read features.
3598         * server.h (traceframe_read_sdata)
3599         (supply_static_tracepoint_registers): Declare.
3600         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3601         (unpack_varlen_hex): Include in IPA build.
3602         * Makefile.in (ustlibs, ustinc): New.
3603         (IPA_OBJS): Add remote-utils-ipa.o.
3604         ($(IPA_LIB)): Link -ldl and -lpthread.
3605         (UST_CFLAGS): New.
3606         (IPAGENT_CFLAGS): Add UST_CFLAGS.
3607         * config.in, configure: Regenerate.
3608
3609 2010-06-20  Ian Lance Taylor  <iant@google.com>
3610             Pedro Alves  <pedro@codesourcery.com>
3611
3612         * linux-x86-low.c (always_true): Delete.
3613         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3614         trying to fool the compiler with always_true.
3615
3616 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
3617
3618         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3619         conditions in gdbserver.
3620
3621 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
3622
3623         * spu-low.c (spu_read_memory): Wrap around local store limit.
3624         (spu_write_memory): Likewise.
3625
3626 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
3627
3628         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3629         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3630         LONGEST uses.
3631         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3632         uses.
3633         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3634         uses with LONGEST uses.
3635
3636 2010-06-14  Stan Shebs  <stan@codesourcery.com>
3637             Pedro Alves  <pedro@codesourcery.com>
3638
3639         Bytecode compiler.
3640
3641         * linux-x86-low.c: Include limits.h.
3642         (add_insns): New.
3643         (always_true): New.
3644         (EMIT_ASM): New.
3645         (EMIT_ASM32): New.
3646         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3647         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3648         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3649         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3650         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3651         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3652         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3653         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3654         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3655         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3656         (amd64_emit_void_call_2): New.
3657         (amd64_emit_ops): New.
3658         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3659         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3660         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3661         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3662         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3663         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3664         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3665         (i386_emit_call, i386_emit_reg, i386_emit_pop)
3666         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3667         (i386_emit_stack_adjust, i386_emit_int_call_1)
3668         (i386_emit_void_call_2): New.
3669         (i386_emit_ops): New.
3670         (x86_emit_ops): New.
3671         (the_low_target): Install x86_emit_ops.
3672         * server.h (struct emit_ops): New.
3673         (get_raw_reg_func_addr): Declare.
3674         (current_insn_ptr, emit_error): Declare.
3675         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3676         (set_trace_state_variable_value): New defines.
3677         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3678         addr_get_trace_state_variable_value and
3679         addr_set_trace_state_variable_value.
3680         (symbol_list): New fields for get_raw_reg,
3681         get_trace_state_variable_value and set_trace_state_variable_value.
3682         (condfn): New typedef.
3683         (struct tracepoint): New field `compiled_cond'.
3684         (do_action_at_tracepoint): Clear compiled_cond.
3685         (get_trace_state_variable_value, set_trace_state_variable_value):
3686         Export in the IPA.
3687         (condition_true_at_tracepoint): If there's a compiled condition,
3688         run that.
3689         (current_insn_ptr, emit_error): New globals.
3690         (struct bytecode_address): New.
3691         (get_raw_reg_func_addr): New.
3692         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3693         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3694         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3695         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3696         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3697         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3698         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3699         (compile_tracepoint_condition, compile_bytecodes): New.
3700         * target.h (emit_ops): Forward declare.
3701         (struct target_ops): New field emit_ops.
3702         (target_emit_ops): New.
3703         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3704         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3705         * linux-low.c (linux_emit_ops): New.
3706         (linux_target_ops): Install it.
3707         * linux-low.h (struct linux_target_ops): New field emit_ops.
3708
3709 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
3710
3711         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3712         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3713
3714 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
3715             Stan Shebs  <stan@codesourcery.com>
3716
3717         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3718         (all): Depend on $(extra_libraries).
3719         (install-only): Install the IPA.
3720         (IPA_OBJS, IPA_LIB): New.
3721         (clean): Remove the IPA lib.
3722         (IPAGENT_CFLAGS): New.
3723         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3724         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3725         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3726         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3727         * configure.ac: Check for atomic builtins support in the compiler.
3728         (IPA_DEPFILES, extra_libraries): Define.
3729         * configure.srv (ipa_obj): Add description.
3730         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3731         (i[34567]86-*-linux*): Set ipa_obj.
3732         (x86_64-*-linux*): Set ipa_obj.
3733         * linux-low.c (stabilizing_threads): New.
3734         (supports_fast_tracepoints): New.
3735         (linux_detach): Stabilize threads before detaching.
3736         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
3737         the lwp is either not stabilizing, or is moving out of a jump pad.
3738         (linux_fast_tracepoint_collecting): New.
3739         (maybe_move_out_of_jump_pad): New.
3740         (enqueue_one_deferred_signal): New.
3741         (dequeue_one_deferred_signal): New.
3742         (linux_wait_for_event_1): If moving out of a jump pad, defer
3743         pending signals to later.
3744         (linux_stabilize_threads): New.
3745         (linux_wait_1): Check if threads need moving out of jump pads, and
3746         do it if so.
3747         (stuck_in_jump_pad_callback): New.
3748         (move_out_of_jump_pad_callback): New.
3749         (lwp_running): New.
3750         (linux_resume_one_lwp): Handle moving out of jump pads.
3751         (linux_set_resume_request): Dequeue deferred signals.
3752         (need_step_over_p): Also step over fast tracepoint jumps.
3753         (start_step_over): Also uninsert fast tracepoint jumps.
3754         (finish_step_over): Also reinsert fast tracepoint jumps.
3755         (linux_install_fast_tracepoint_jump): New.
3756         (linux_target_ops): Install linux_stabilize_threads and
3757         linux_install_fast_tracepoint_jump_pad.
3758         * linux-low.h (linux_target_ops) <get_thread_area,
3759         install_fast_tracepoint_jump_pad>: New fields.
3760         (struct lwp_info) <collecting_fast_tracepoint,
3761         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3762         (linux_get_thread_area): Declare.
3763         * linux-x86-low.c (jump_insn): New.
3764         (x86_get_thread_area): New.
3765         (append_insns): New.
3766         (push_opcode): New.
3767         (amd64_install_fast_tracepoint_jump_pad): New.
3768         (i386_install_fast_tracepoint_jump_pad): New.
3769         (x86_install_fast_tracepoint_jump_pad): New.
3770         (the_low_target): Install x86_get_thread_area and
3771         x86_install_fast_tracepoint_jump_pad.
3772         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3773         (struct fast_tracepoint_jump): New.
3774         (fast_tracepoint_jump_insn): New.
3775         (fast_tracepoint_jump_shadow): New.
3776         (find_fast_tracepoint_jump_at): New.
3777         (fast_tracepoint_jump_here): New.
3778         (delete_fast_tracepoint_jump): New.
3779         (set_fast_tracepoint_jump): New.
3780         (uninsert_fast_tracepoint_jumps_at): New.
3781         (reinsert_fast_tracepoint_jumps_at): New.
3782         (set_breakpoint_at): Use write_inferior_memory.
3783         (uninsert_raw_breakpoint): Use write_inferior_memory.
3784         (check_mem_read): Mask out fast tracepoint jumps.
3785         (check_mem_write): Mask out fast tracepoint jumps.
3786         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3787         (set_fast_tracepoint_jump): Declare.
3788         (delete_fast_tracepoint_jump)
3789         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3790         (reinsert_fast_tracepoint_jumps_at): Declare.
3791         * regcache.c: Don't compile many functions when building the
3792         in-process agent library.
3793         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3794         the register buffer in the heap.
3795         (free_register_cache): If the register buffer isn't owned by the
3796         regcache, don't free it.
3797         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3798         pre-existing register caches.
3799         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3800         type.
3801         (convert_ascii_to_int): : Constify `from' parameter type.
3802         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3803         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
3804         the needed buffer in-place.
3805         (relocate_instruction): New.
3806         * server.c (handle_query) <qSymbols>: If the target supports
3807         tracepoints, give it a chance of looking up symbols.  Report
3808         support for fast tracepoints.
3809         (handle_status): Stabilize threads.
3810         (process_serial_event): Adjust.
3811         * server.h (struct fast_tracepoint_jump): Forward declare.
3812         (struct process_info) <fast_tracepoint_jumps>: New field.
3813         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3814         (decode_X_packet, decode_M_packet): Adjust.
3815         (relocate_instruction): Declare.
3816         (in_process_agent_loaded): Declare.
3817         (tracepoint_look_up_symbols): Declare.
3818         (struct fast_tpoint_collect_status): Declare.
3819         (fast_tracepoint_collecting): Declare.
3820         (force_unlock_trace_buffer): Declare.
3821         (handle_tracepoint_bkpts): Declare.
3822         (initialize_low_tracepoint)
3823         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3824         * target.h (struct target_ops) <stabilize_threads,
3825         install_fast_tracepoint_jump_pad>: New fields.
3826         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3827         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3828         [HAVE_STDINT_H]: Include stdint.h.
3829         (trace_debug_1): Rename to ...
3830         (trace_vdebug): ... this.
3831         (trace_debug): Rename to ...
3832         (trace_debug_1): ... this.  Add `level' parameter.
3833         (trace_debug): New.
3834         (ATTR_USED, ATTR_NOINLINE): New.
3835         (IP_AGENT_EXPORT): New.
3836         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3837         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3838         (about_to_request_buffer_space, trace_buffer_is_full)
3839         (stopping_tracepoint, expr_eval_result, error_tracepoint)
3840         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3841         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3842         (traceframe_write_count, traceframes_created)
3843         (trace_state_variables)
3844         New renaming defines.
3845         (struct ipa_sym_addresses): New.
3846         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3847         (symbol_list): New.
3848         (ipa_sym_addrs): New.
3849         (all_tracepoint_symbols_looked_up): New.
3850         (in_process_agent_loaded): New.
3851         (write_e_ipa_not_loaded): New.
3852         (maybe_write_ipa_not_loaded): New.
3853         (tracepoint_look_up_symbols): New.
3854         (debug_threads) [IN_PROCESS_AGENT]: New.
3855         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3856         (UNKNOWN_SIDE_EFFECTS): New.
3857         (stop_tracing): New.
3858         (flush_trace_buffer): New.
3859         (stop_tracing_bkpt): New.
3860         (flush_trace_buffer_bkpt): New.
3861         (read_inferior_integer): New.
3862         (read_inferior_uinteger): New.
3863         (read_inferior_data_pointer): New.
3864         (write_inferior_data_pointer): New.
3865         (write_inferior_integer): New.
3866         (write_inferior_uinteger): New.
3867         (struct collect_static_trace_data_action): Delete.
3868         (enum tracepoint_type): New.
3869         (struct tracepoint) <type>: New field `type'.
3870         <actions_str, step_actions, step_actions_str>: Only include in
3871         GDBserver.
3872         <orig_size, obj_addr_on_target, adjusted_insn_addr>
3873         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3874         (tracepoints): Use IP_AGENT_EXPORT.
3875         (last_tracepoint): Don't include in the IPA.
3876         (stopping_tracepoint): Use IP_AGENT_EXPORT.
3877         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3878         (alloced_trace_state_variables): New.
3879         (trace_state_variables): Use IP_AGENT_EXPORT.
3880         (traceframe_t): Delete unused variable.
3881         (circular_trace_buffer): Don't include in the IPA.
3882         (trace_buffer_start): Delete.
3883         (struct trace_buffer_control): New.
3884         (trace_buffer_free): Delete.
3885         (struct ipa_trace_buffer_control): New.
3886         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3887         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3888         New.
3889         (trace_buffer_ctrl): New.
3890         (TRACE_BUFFER_CTRL_CURR): New.
3891         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3892         Reimplement as macros.
3893         (trace_buffer_wrap): Delete.
3894         (traceframe_write_count, traceframe_read_count)
3895         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3896         (struct tracepoint_hit_ctx) <type>: New field.
3897         (struct fast_tracepoint_ctx): New.
3898         (memory_barrier): New.
3899         (cmpxchg): New.
3900         (record_tracepoint_error): Update atomically in the IPA.
3901         (clear_inferior_trace_buffer): New.
3902         (about_to_request_buffer_space): New.
3903         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3904         updating the same buffer.
3905         (add_tracepoint): Default the tracepoint's type to trap
3906         tracepoint, and orig_size to -1.
3907         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3908         internal variables.
3909         (create_trace_state_variable): New parameter `gdb'.  Handle it.
3910         (clear_installed_tracepoints): Clear fast tracepoint jumps.
3911         (cmd_qtdp): Handle fast tracepoints.
3912         (cmd_qtdv): Adjust.
3913         (max_jump_pad_size): New.
3914         (gdb_jump_pad_head): New.
3915         (get_jump_space_head): New.
3916         (claim_jump_space): New.
3917         (sort_tracepoints): New.
3918         (MAX_JUMP_SIZE): New.
3919         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
3920         IPA.
3921         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3922         support.  Upload fast traceframes, and delete internal IPA
3923         breakpoints.
3924         (stop_tracing_handler): New.
3925         (flush_trace_buffer_handler): New.
3926         (cmd_qtstop): Upload fast tracepoints.
3927         (response_tracepoint): Handle fast tracepoints.
3928         (tracepoint_finished_step): Upload fast traceframes.  Set the
3929         tracepoint hit context's tracepoint type.
3930         (handle_tracepoint_bkpts): New.
3931         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3932         type.  Add comment about fast tracepoints.
3933         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3934         non-existing action_str field.
3935         (get_context_regcache): Handle fast tracepoints.
3936         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3937         to the regcache.
3938         (fast_tracepoint_from_jump_pad_address): New.
3939         (fast_tracepoint_from_ipa_tpoint_address): New.
3940         (collecting_t): New.
3941         (force_unlock_trace_buffer): New.
3942         (fast_tracepoint_collecting): New.
3943         (collecting): New.
3944         (gdb_collect): New.
3945         (write_inferior_data_ptr): New.
3946         (target_tp_heap): New.
3947         (target_malloc): New.
3948         (download_agent_expr): New.
3949         (UALIGN): New.
3950         (download_tracepoints): New.
3951         (download_trace_state_variables): New.
3952         (upload_fast_traceframes): New.
3953         (IPA_FIRST_TRACEFRAME): New.
3954         (IPA_NEXT_TRACEFRAME_1): New.
3955         (IPA_NEXT_TRACEFRAME): New.
3956         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3957         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3958         (gdb_jump_pad_buffer_end): New.
3959         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3960         (initialize_tracepoint): Adjust.
3961         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3962         buffer.  Initialize the low module.
3963         * utils.c (PREFIX, TOOLNAME): New.
3964         (malloc_failure): Use PREFIX.
3965         (error): In the IPA, an error causes an exit.
3966         (fatal, warning): Use PREFIX.
3967         (internal_error): Use TOOLNAME.
3968         (NUMCELLS): Increase to 10.
3969         * configure, config.in: Regenerate.
3970
3971 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
3972
3973         * server.c (handle_query) <qSupported>: Do two passes over the
3974         qSupported string to avoid nesting strtok.
3975
3976 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3977
3978         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3979         (CDEPS): New.
3980         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
3981         -Wl,--dynamic-list.
3982         * configure: Regenerate.
3983         * proc-service.list: New.
3984
3985 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3986
3987         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3988         New comment.
3989
3990 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
3991
3992         * gdbreplay.c (remote_open): Check error return from socket() call by
3993         its equality to -1 not by it being negative.
3994         * remote-utils.c (remote_open): Likewise.
3995
3996 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
3997
3998         * config.h: Regenerate.
3999
4000 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
4001
4002         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4003         doesn't provide PTRACE_GET_THREAD_AREA.
4004
4005 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
4006
4007         * linux-m68k-low.c: Include <asm/ptrace.h>
4008         (ps_get_thread_area): Implement.
4009
4010 2010-05-03  Doug Evans  <dje@google.com>
4011
4012         * event-loop.c (struct callback_event): New struct.
4013         (callback_list): New global.
4014         (append_callback_event, delete_callback_event): New functions.
4015         (process_callback): New function.
4016         (start_event_loop): Call it.
4017         * remote-utils.c (NOT_SCHEDULED): Define.
4018         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4019         moved out of readchar.
4020         (readchar): Rewrite.  Call reschedule before returning.
4021         (reset_readchar): New function.
4022         (remote_close): Call it.
4023         (process_remaining, reschedule): New functions.
4024         * server.h (callback_handler_func): New typedef.
4025         (append_callback_event, delete_callback_event): Declare.
4026
4027 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
4028
4029         * proc-service.c (ps_pglobal_lookup): Use
4030         thread_db_look_up_one_symbol.
4031         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4032         parameter.  Use it instead of all_symbols_looked_up.
4033         * server.h (struct process_info) <all_symbols_looked_up>: Delete
4034         field.
4035         (all_symbols_looked_up): Don't declare.
4036         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4037         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4038         field.
4039         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4040         Set all_symbols_looked_up here.
4041         (thread_db_look_up_one_symbol): New.
4042         (thread_db_get_tls_address): Adjust.
4043         (thread_db_load_search, try_thread_db_load_1): Always allocate the
4044         thread_db object on the heap, and tentatively set it in the
4045         process structure.
4046         (thread_db_init): Don't set all_symbols_looked_up here.
4047         * linux-low.h (thread_db_look_up_one_symbol): Declare.
4048
4049 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
4050
4051         * linux-low.c (linux_kill, linux_detach): Adjust.
4052         (status_pending_p_callback): Remove redundant statement.  Check
4053         for !TARGET_WAITIKIND_IGNORE, instead of
4054         TARGET_WAITKIND_STOPPED.
4055         (handle_tracepoints): Make sure LWP is locked.  Adjust.
4056         (linux_wait_for_event_1): Adjust.
4057         (linux_cancel_breakpoints): New.
4058         (unsuspend_one_lwp): New.
4059         (unsuspend_all_lwps): New.
4060         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4061         (send_sigstop_callback): Change return type to int, add new
4062         `except' parameter and handle it.
4063         (suspend_and_send_sigstop_callback): New.
4064         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4065         pass them down.  If SUSPEND, also increment the lwp's suspend
4066         count.
4067         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4068         (need_step_over_p): Don't consider suspended LWPs.
4069         (start_step_over): Adjust.
4070         (proceed_one_lwp): Change return type to int, add new `except'
4071         parameter and handle it.
4072         (unsuspend_and_proceed_one_lwp): New.
4073         (proceed_all_lwps): Use find_inferior instead of
4074         for_each_inferior.
4075         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
4076         also decrement the suspend count of LWPs.  Pass `except' down,
4077         instead of hacking its suspend count.
4078         (linux_pause_all): Add `freeze' parameter.  Adjust.
4079         (linux_unpause_all): New.
4080         (linux_target_ops): Install linux_unpause_all.
4081         * server.c (handle_status): Adjust.
4082         * target.h (struct target_ops): New fields `unpause_all' and
4083         `cancel_breakpoints'.  Add new parameter to `pause_all'.
4084         (pause_all): Add new `freeze' parameter.
4085         (unpause_all): New.
4086         (cancel_breakpoints): New.
4087         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4088         cancel breakpoints.
4089         (cmd_qtstart): Pause threads.
4090         (stop_tracing): Pause threads, and cancel breakpoints.
4091         * win32-low.c (win32_target_ops): Adjust.
4092
4093 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
4094
4095         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4096         the inferior right away from here...
4097         (linux_wait_1): ... to here, and adjust to check the thread's
4098         last_resume_kind instead of the lwp's step or stop_expected flags.
4099
4100 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
4101
4102         * README: Use consistent `GDB' and `GDBserver' spellings.
4103
4104 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
4105
4106         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4107         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
4108         (linux_detach_one_lwp): Assume the lwp is stopped.
4109         (any_thread_of): Delete.
4110         (linux_detach): Stop all lwps here.  Don't blindly delete all
4111         breakpoints.
4112         (delete_lwp_callback): New.
4113         (linux_mourn): Delete all lwps of the process that is gone.
4114         (linux_wait_1): Don't delete the last lwp of the process here.
4115         * mem-break.h (mark_breakpoints_out): Declare.
4116         * mem-break.c (mark_breakpoints_out): New.
4117         (free_all_breakpoints): Use it.
4118         * server.c (handle_target_event): If the process is gone, mark
4119         breakpoints out.
4120         * thread-db.c (struct thread_db) <create_bp>: New field.
4121         (thread_db_enable_reporting): Fix prototype.  Store a thread event
4122         breakpoint reference in the thread_db struct.
4123         (thread_db_load_search): Clear the thread_db object.
4124         (try_thread_db_load_1): Ditto.
4125         (switch_to_process): New.
4126         (disable_thread_event_reporting): Use it.
4127         (remove_thread_event_breakpoints): New.
4128         (thread_db_detach, thread_db_mourn): Use it.
4129
4130 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
4131
4132         * linux-low.c (linux_enable_event_reporting): New.
4133         (linux_wait_for_event_1, handle_extended_wait): Use it.
4134
4135 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
4136
4137         * linux-low.c (linux_kill_one_lwp, linux_kill)
4138         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4139         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
4140         SIGSTOP even if the LWP is stopped.
4141         (send_sigstop_callback): New.
4142         (stop_all_lwps): Use send_sigstop_callback instead.
4143         (linux_resume_one_thread): Adjust.
4144         (proceed_one_lwp): Still proceed an LWP that the client has
4145         requested to stop, if we haven't reported it as stopped yet.  Make
4146         sure that LWPs the client want stopped, have a pending SIGSTOP.
4147
4148 2010-04-26  Doug Evans  <dje@google.com>
4149
4150         * server.c (handle_general_set): Make static.
4151
4152         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4153         Print received char after testing for error/eof instead of before.
4154         (input_interrupt): Tweak comment.
4155
4156 2010-04-23  Doug Evans  <dje@google.com>
4157
4158         * server.c (start_inferior): Print inferior argv if --debug.
4159
4160 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
4161
4162         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4163         * nto-x86-low.c: Include server.h
4164
4165 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
4166
4167         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4168         be consistent with other sources of this directory.
4169         (init_registers_amd64): Correct name of source file of this function
4170         in the comment.
4171
4172 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
4173
4174         * configure.srv (x86_64-*-mingw*): New configuration for Windows
4175         64-bit executables.
4176
4177 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
4178
4179         * win32-i386-low.c: Add 64-bit support.
4180         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4181         (init_registers_amd64): Declare.
4182         (mappings): Add 64-bit version of array.
4183         (init_windows_x86): New function.
4184         (the_low_target): Change init_arch field to init_windows_x86.
4185
4186 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
4187
4188         * win32-low.c: Adapt to support also 64-bit architecture.
4189         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4190         (get_image_name): Use SIZE_T type for local variable `done'.
4191         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4192         (toolhelp_get_dll_name): Idem.
4193         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4194         Use uintptr_t typecast to avoid warning.
4195         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4196         (handle_exception): Use phex_nz to avoid warning.
4197         (win32_wait): Remove unused local variable `process'.
4198
4199 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
4200
4201         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4202         `amd64-avx.o'.
4203
4204 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
4205
4206         * configure.ac: Use `ws2_32' library for srv_mingw.
4207         * configure: Regenerate.
4208         * gdbreplay.c: Include winsock2.h instead of winsock.h.
4209         * remote-utils.c: Likewise.
4210
4211 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
4212
4213         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4214         if __x86_64__ is defined.
4215
4216 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
4217
4218         * configure: Regenerate.
4219
4220 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
4221
4222         * server.c (handle_query): Handle 'qGetTIBAddr' query.
4223         * target.h (target_ops): New get_tib_address field.
4224         * win32-low.h (win32_thread_info): Add thread_local_base field.
4225         * win32-low.c (child_add_thread): Add tlb argument.
4226         Set thread_local_base field to TLB.
4227         (get_child_debug_event): Adapt to child_add_thread change.
4228         (win32_get_tib_address): New function.
4229         (win32_target_ops): Set get_tib_address field to
4230         win32_get_tib_address.
4231         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4232
4233 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
4234
4235         * linux-low.c (linux_mourn): Also remove the process.
4236         * server.c (handle_target_event): Don't remove the process here.
4237         * nto-low.c (nto_mourn): New.
4238         (nto_target_ops): Install it.
4239         * spu-low.c (spu_mourn): New.
4240         (spu_target_ops): Install it.
4241         * win32-low.c (win32_mourn): New.
4242         (win32_target_ops): Install it.
4243
4244 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
4245
4246         * server.h (buffer_xml_printf): Remove redundant `;'.
4247
4248 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
4249
4250         * regcache.c (set_register_cache): Invalidate regcaches before
4251         changing the register cache layout.
4252         (regcache_invalidate_one): Allow a NULL regcache.
4253         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4254         regcaches before changing the register cache layout or the target
4255         regsets.
4256
4257 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
4258
4259         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4260         variable warning on Linux/x86-64.
4261
4262 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
4263
4264         GDBserver disconnected tracing support.
4265
4266         * linux-low.c (linux_remove_process): Delete.
4267         (add_lwp): Don't set last_resume_kind here.
4268         (linux_kill): Use `mourn'.
4269         (linux_detach): Use `thread_db_detach', and `mourn'.
4270         (linux_mourn): New.
4271         (linux_attach_lwp_1): Adjust comment.
4272         (linux_attach): last_resume_kind moved the thread_info; adjust.
4273         (status_pending_p_callback): Adjust.
4274         (linux_wait_for_event_1): Adjust.
4275         (count_events_callback, select_singlestep_lwp_callback)
4276         (select_event_lwp_callback, cancel_breakpoints_callback)
4277         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4278         (proceed_one_lwp): Adjust.
4279         (linux_async): Add debug output.
4280         (linux_thread_stopped): New.
4281         (linux_pause_all): New.
4282         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4283         linux_pause_all.
4284         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4285         (thread_db_free): Delete declaration.
4286         (thread_db_detach, thread_db_mourn): Declare.
4287         * thread-db.c (thread_db_init): Use thread_db_mourn.
4288         (thread_db_free): Delete, split in two.
4289         (disable_thread_event_reporting): New.
4290         (thread_db_detach): New.
4291         (thread_db_mourn): New.
4292
4293         * server.h (struct thread_info) <last_resume_kind>: New field.
4294         <attached>: Add comment.
4295         <gdb_detached>: New field.
4296         (handler_func): Change return type to int.
4297         (handle_serial_event, handle_target_event): Ditto.
4298         (gdb_connected): Declare.
4299         (tracing): Delete.
4300         (disconnected_tracing): Declare.
4301         (stop_tracing): Declare.
4302
4303         * server.c (handle_query) <qSupported>: Report support for
4304         disconnected tracing.
4305         (queue_stop_reply_callback): Account for running threads.
4306         (gdb_wants_thread_stopped): New.
4307         (gdb_wants_all_threads_stopped): New.
4308         (gdb_reattached_process): New.
4309         (handle_status): Clear the `gdb_detached' flag of all processes.
4310         In all-stop, stop all threads.
4311         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
4312         (process_serial_event): If the remote connection breaks, or if an
4313         exit was forced with "monitor exit", force an event loop exit.
4314         Handle disconnected tracing on detach.
4315         (handle_serial_event): Adjust.
4316         (handle_target_event): If GDB isn't connected, forward events back
4317         to the inferior, unless the last process exited, in which case,
4318         exit gdbserver.  Adjust interface.
4319
4320         * remote-utils.c (remote_open): Don't block in accept.  Instead
4321         register an event loop source on the listen socket file
4322         descriptor.  Refactor bits into ...
4323         (listen_desc): ... this new global.
4324         (gdb_connected): ... this new function.
4325         (enable_async_notification): ... this new function.
4326         (handle_accept_event): ... this new function.
4327         (remote_close): Clear remote_desc.
4328
4329         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4330
4331         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4332         New fields.
4333         (mourn_inferior): Define.
4334         (target_process_qsupported): Avoid the dangling else problem.
4335         (thread_stopped): Define.
4336         (pause_all): Define.
4337         (target_waitstatus_to_string): Declare.
4338         * target.c (target_waitstatus_to_string): New.
4339
4340         * tracepoint.c (tracing): Make extern.
4341         (disconnected_tracing): New.
4342         (stop_tracing): Make extern.  Handle tracing stops due to GDB
4343         disconnecting.
4344         (cmd_qtdisconnected): New.
4345         (cmd_qtstatus): Report disconnected tracing status in trace reply.
4346         (handle_tracepoint_general_set): Handle QTDisconnected.
4347
4348         * event-loop.c (event_handler_func): Change return type to int.
4349         (process_event): Bail out if the event handler wants the event
4350         loop to stop.
4351         (handle_file_event): Ditto.
4352         (start_event_loop): Bail out if the event handler wants the event
4353         loop to stop.
4354
4355         * nto-low.c (nto_target_ops): Adjust.
4356         * spu-low.c (spu_wait): Don't remove the process here.
4357         (spu_target_ops): Adjust.
4358         * win32-low.c (win32_wait): Don't remove the process here.
4359         (win32_target_ops): Adjust.
4360
4361 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
4362
4363         * regcache.c (realloc_register_cache): Invalidate inferior's
4364         regcache before recreating it.
4365
4366 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
4367
4368         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4369
4370 2010-04-09  Stan Shebs  <stan@codesourcery.com>
4371             Pedro Alves  <pedro@codesourcery.com>
4372
4373         * server.h (LONGEST): New.
4374         (struct thread_info) <while_stepping>: New field.
4375         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4376         Declare.
4377         (initialize_tracepoint, handle_tracepoint_general_set)
4378         (handle_tracepoint_query, tracepoint_finished_step)
4379         (tracepoint_was_hit, release_while_stepping_state_list):
4380         (current_traceframe): Declare.
4381         * server.c (handle_general_set): Handle tracepoint packets.
4382         (read_memory): New.
4383         (write_memory): New.
4384         (handle_search_memory_1): Use read_memory.
4385         (handle_query): Report support for conditional tracepoints, trace
4386         state variables, and tracepoint sources.  Handle tracepoint
4387         queries.
4388         (main): Initialize the tracepoints module.
4389         (process_serial_event): Handle traceframe reads/writes.
4390
4391         * linux-low.c (handle_tracepoints): New.
4392         (linux_wait_1): Call it.
4393         (linux_resume_one_lwp): Handle while-stepping.
4394         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4395         (linux_target_ops): Install them.
4396         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4397         New field.
4398         * linux-x86-low.c (x86_supports_tracepoints): New.
4399         (the_low_target). Install it.
4400
4401         * mem-break.h (delete_breakpoint): Declare.
4402         * mem-break.c (delete_breakpoint): Make external.
4403
4404         * target.h (struct target_ops): Add `supports_tracepoints',
4405         `read_pc', and `write_pc' fields.
4406         (target_supports_tracepoints): Define.
4407         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4408         (phex_nz): New.
4409
4410         * regcache.h (struct regcache) <registers_owned>: New field.
4411         (init_register_cache, regcache_cpy): Declare.
4412         (regcache_read_pc, regcache_write_pc): Declare.
4413         (register_cache_size): Declare.
4414         (supply_regblock): Declare.
4415         * regcache.c (init_register_cache): New.
4416         (new_register_cache): Use it.
4417         (regcache_cpy): New.
4418         (register_cache_size): New.
4419         (supply_regblock): New.
4420         (regcache_read_pc, regcache_write_pc): New.
4421
4422         * tracepoint.c: New.
4423
4424         * Makefile.in (OBS): Add tracepoint.o.
4425         (tracepoint.o): New rule.
4426
4427 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
4428
4429         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4430         (i386-mmx.o): New.
4431         (i386-mmx.c): Likewise.
4432         (i386-mmx-linux.o): Likewise.
4433         (i386-mmx-linux.c): Likewise.
4434
4435         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4436         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4437         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4438         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4439
4440         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4441         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4442         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4443
4444 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
4445
4446         * Makefile.in (clean): Updated.
4447         (i386-avx.o): New.
4448         (i386-avx.c): Likewise.
4449         (i386-avx-linux.o): Likewise.
4450         (i386-avx-linux.c): Likewise.
4451         (amd64-avx.o): Likewise.
4452         (amd64-avx.c): Likewise.
4453         (amd64-avx-linux.o): Likewise.
4454         (amd64-avx-linux.c): Likewise.
4455
4456         * configure.srv (srv_i386_regobj): Add i386-avx.o.
4457         (srv_i386_linux_regobj): Add i386-avx-linux.o.
4458         (srv_amd64_regobj): Add amd64-avx.o.
4459         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4460         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4461         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4462         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4463         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4464         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4465         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4466
4467         * i387-fp.c: Include "i386-xstate.h".
4468         (i387_xsave): New.
4469         (i387_cache_to_xsave): Likewise.
4470         (i387_xsave_to_cache): Likewise.
4471         (x86_xcr0): Likewise.
4472
4473         * i387-fp.h (i387_cache_to_xsave): Likewise.
4474         (i387_xsave_to_cache): Likewise.
4475         (x86_xcr0): Likewise.
4476
4477         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4478         * linux-crisv32-low.c (target_regsets): Likewise.
4479         * linux-m68k-low.c (target_regsets): Likewise.
4480         * linux-mips-low.c (target_regsets): Likewise.
4481         * linux-ppc-low.c (target_regsets): Likewise.
4482         * linux-s390-low.c (target_regsets): Likewise.
4483         * linux-sh-low.c (target_regsets): Likewise.
4484         * linux-sparc-low.c (target_regsets): Likewise.
4485         * linux-xtensa-low.c (target_regsets): Likewise.
4486
4487         * linux-low.c: Include <sys/uio.h>.
4488         (regsets_fetch_inferior_registers): Support nt_type.
4489         (regsets_store_inferior_registers): Likewise.
4490         (linux_process_qsupported): New.
4491         (linux_target_ops): Add linux_process_qsupported.
4492
4493         * linux-low.h (regset_info): Add nt_type.
4494         (linux_target_ops): Add process_qsupported.
4495
4496         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4497         and <sys/uio.h>.
4498         (init_registers_i386_avx_linux): New.
4499         (init_registers_amd64_avx_linux): Likewise.
4500         (xmltarget_i386_linux_no_xml): Likewise.
4501         (xmltarget_amd64_linux_no_xml): Likewise.
4502         (PTRACE_GETREGSET): Likewise.
4503         (PTRACE_SETREGSET): Likewise.
4504         (x86_fill_xstateregset): Likewise.
4505         (x86_store_xstateregset): Likewise.
4506         (use_xml): Likewise.
4507         (x86_linux_update_xmltarget): Likewise.
4508         (x86_linux_process_qsupported): Likewise.
4509         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4510         (x86_arch_setup): Don't call init_registers_amd64_linux nor
4511         init_registers_i386_linux here.  Call
4512         x86_linux_update_xmltarget.
4513         (the_low_target): Add x86_linux_process_qsupported.
4514
4515         * server.c (handle_query): Call target_process_qsupported.
4516
4517         * target.h (target_ops): Add process_qsupported.
4518         (target_process_qsupported): New.
4519
4520 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
4521
4522         * inferiors.c (add_thread): Set last_status kind to
4523         TARGET_WAITKIND_IGNORE.
4524         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4525         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
4526         (linux_wait_1): Move `thread' local definition to block that uses
4527         it.  Don't NULL initialize `event_child'.
4528         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4529         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4530         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4531
4532 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
4533
4534         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4535         an extended waitstatus, or by a watchpoint.
4536         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4537         thread was stepping or has been stopped by a watchpoint.
4538
4539 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
4540
4541         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4542         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4543         of another, then delete the previous, and validate all
4544         breakpoints.
4545         (validate_inserted_breakpoint): New.
4546         (delete_disabled_breakpoints): New.
4547         (validate_breakpoints): New.
4548         (check_mem_read): Validate breakpoints before trusting their
4549         shadow.  Delete disabled breakpoints.
4550         (check_mem_write): Validate breakpoints before trusting they
4551         should be inserted.  Delete disabled breakpoints.
4552         * mem-break.h (validate_breakpoints):
4553         * server.c (handle_query): Validate breakpoints when we see a
4554         qSymbol query.
4555
4556 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
4557
4558         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4559         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
4560         if we could tell there's a GDB breakpoint at stop_pc.
4561         (need_step_over_p): Don't do a step over if we find a GDB
4562         breakpoint at the resume PC.
4563
4564         * mem-break.c (struct raw_breakpoint): New.
4565         (enum bkpt_type): New type `gdb_breakpoint'.
4566         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4567         fields.  New field `raw'.
4568         (find_raw_breakpoint_at): New.
4569         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
4570         breakpoint instead.
4571         (set_breakpoint_at): Adjust.
4572         (delete_raw_breakpoint): New.
4573         (release_breakpoint): New.
4574         (delete_breakpoint): Rename to...
4575         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
4576         release_breakpoint.  Return ENOENT.
4577         (delete_breakpoint): Reimplement.
4578         (find_breakpoint_at): Delete.
4579         (find_gdb_breakpoint_at): New.
4580         (delete_breakpoint_at): Delete.
4581         (set_gdb_breakpoint_at): New.
4582         (delete_gdb_breakpoint_at): New.
4583         (gdb_breakpoint_here): New.
4584         (set_reinsert_breakpoint): Use release_breakpoint.
4585         (uninsert_breakpoint): Rename to ...
4586         (uninsert_raw_breakpoint): ... this.
4587         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4588         (reinsert_raw_breakpoint): Change parameter type to
4589         raw_breakpoint.
4590         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4591         instead.
4592         (check_breakpoints): Adjust.  Use release_breakpoint.
4593         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4594         (breakpoint_inserted_here): Ditto.
4595         (check_mem_read): Adjust to iterate over raw breakpoints instead.
4596         Don't trust the breakpoint's shadow if it is not inserted.
4597         (check_mem_write): Adjust to iterate over raw breakpoints instead.
4598         (delete_all_breakpoints): Adjust.
4599         (free_all_breakpoints): Mark all breakpoints as uninserted, and
4600         use delete_breakpoint_1.
4601
4602         * mem-break.h (breakpoints_supported): Delete declaration.
4603         (set_gdb_breakpoint_at): Declare.
4604         (gdb_breakpoint_here): Declare.
4605         (delete_breakpoint_at): Delete.
4606         (delete_gdb_breakpoint_at): Declare.
4607
4608         * server.h (struct raw_breakpoint): Forward declare.
4609         (struct process_info): New field `raw_breakpoints'.
4610
4611         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4612         breakpoints.
4613
4614 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4615
4616         * linux-low.c (status_pending_p_callback): Fix comment.
4617         (linux_wait_for_event_1): Move most of the internal breakpoint
4618         handling from here...
4619         (linux_wait_1): ... to here.
4620         (count_events_callback): New.
4621         (select_singlestep_lwp_callback): New.
4622         (select_event_lwp_callback): New.
4623         (cancel_breakpoints_callback): New.
4624         (select_event_lwp): New.
4625         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
4626         priority to all LWPs that have had events that should be reported
4627         to the client.  Cancel breakpoints when about to reporting the
4628         event to the client, not while stopping lwps.  No longer cancel
4629         finished single-steps here.
4630         (cancel_finished_single_step): Delete.
4631         (cancel_finished_single_steps): Delete.
4632
4633 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4634
4635         * mem-break.c (enum bkpt_type): New.
4636         (struct breakpoint): New field `type'.
4637         (set_breakpoint_at): Change return type to struct breakpoint
4638         pointer.  Set type to `other_breakpoint' by default.
4639         (delete_breakpoint): Rewrite, supporting more than one breakpoint
4640         in the breakpoint list.
4641         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4642         (reinsert_breakpoint): Rename to ...
4643         (reinsert_raw_breakpoint): ... this.
4644         (reinsert_breakpoints_at): Adjust.
4645         * mem-break.h (struct breakpoint): Declare.
4646         (set_breakpoint_at): Change return type to struct breakpoint
4647         pointer.
4648
4649 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4650
4651         * server.c (handle_query): Assign, not compare.
4652
4653 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
4654
4655         Teach linux gdbserver to step-over-breakpoints.
4656
4657         * linux-low.c (can_hardware_single_step): New.
4658         (supports_breakpoints): New.
4659         (handle_extended_wait): If stopping threads, read the stop pc of
4660         the new cloned LWP.
4661         (get_pc): New.
4662         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
4663         low target doesn't support retrieving the PC.
4664         (add_lwp): Set last_resume_kind to resume_continue.
4665         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
4666         (linux_attach): Don't clear stop_expected.  Set the lwp's
4667         last_resume_kind to resume_stop.
4668         (linux_detach_one_lwp): Don't check for removed breakpoints.
4669         (check_removed_breakpoint): Delete.
4670         (status_pending_p): Rename to ...
4671         (status_pending_p_callback): ... this.  Don't check for removed
4672         breakpoints.  Don't consider threads that are stopped from GDB's
4673         perspective.
4674         (linux_wait_for_lwp): Always read the stop_pc here.
4675         (cancel_breakpoint): New.
4676         (step_over_bkpt): New global.
4677         (linux_wait_for_event_1): Implement stepping over breakpoints.
4678         (gdb_wants_lwp_stopped): New.
4679         (gdb_wants_all_stopped): New.
4680         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
4681         single-step traps here.  Store the thread's last reported target
4682         wait status.
4683         (send_sigstop): Don't clear stop_expected.  Always set it,
4684         instead.
4685         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4686         (cancel_finished_single_step): New.
4687         (cancel_finished_single_steps): New.
4688         (wait_for_sigstop): Don't cancel finished single-step traps here.
4689         (linux_resume_one_lwp): Don't check for removed breakpoints.
4690         Don't set `step' on non-hardware step archs.
4691         (linux_set_resume_request): Ignore resume_stop requests if already
4692         stopping or stopped.  Set the lwp's last_resume_kind.
4693         (resume_status_pending_p): Don't check for removed breakpoints.
4694         (need_step_over_p): New.
4695         (start_step_over): New.
4696         (finish_step_over): New.
4697         (linux_resume_one_thread): Always queue a sigstop for resume_stop
4698         requests.  Clear the thread's last reported target waitstatus.
4699         Don't use the `suspended' flag.  Don't consider pending breakpoints.
4700         (linux_resume): Start a step-over if necessary.
4701         (proceed_one_lwp): New.
4702         (proceed_all_lwps): New.
4703         (unstop_all_lwps): New.
4704         * linux-low.h (struct lwp_info): Rewrite comment for the
4705         `suspended' flag.  Add the `stop_pc' field.  Delete the
4706         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
4707         Add `'last_resume_kind' and `need_step_over' fields.
4708         * inferiors.c (struct thread_info): Delete, moved elsewhere.
4709         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4710         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
4711         (set_raw_breakpoint_at): New.
4712         (set_breakpoint_at): Rewrite to use it.
4713         (reinsert_breakpoint_handler): Delete.
4714         (set_reinsert_breakpoint): New.
4715         (reinsert_breakpoint_by_bp): Delete.
4716         (delete_reinsert_breakpoints): New.
4717         (uninsert_breakpoint): Rewrite.
4718         (uninsert_breakpoints_at): New.
4719         (reinsert_breakpoint): Rewrite.
4720         (reinsert_breakpoints_at): New.
4721         (check_breakpoints): Rewrite.
4722         (breakpoint_here): New.
4723         (breakpoint_inserted_here): New.
4724         (check_mem_read): Adjust.
4725         * mem-break.h (breakpoints_supported, breakpoint_here)
4726         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4727         (reinsert_breakpoint_by_bp): Delete declaration.
4728         (delete_reinsert_breakpoints): Declare.
4729         (reinsert_breakpoint): Delete declaration.
4730         (reinsert_breakpoints_at): Declare.
4731         (uninsert_breakpoint): Delete declaration.
4732         (uninsert_breakpoints_at): Declare.
4733         (check_breakpoints): Adjust prototype.
4734         * server.h: Adjust include order.
4735         (struct thread_info): Declare here.  Add a `last_status' field.
4736
4737 2010-03-23  Michael Snyder  <msnyder@vmware.com>
4738
4739         * server.c (crc32): New function.
4740         (handle_query): Add handling for 'qCRC:' request.
4741
4742 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
4743
4744         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4745         lwp had been stopped by a watchpoint.
4746
4747 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
4748
4749         * server.h (internal_error): Declare.
4750         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4751         * utils.c (internal_error): New function.
4752
4753 2010-03-15  Andreas Schwab  <schwab@redhat.com>
4754
4755         * configure.srv: Fix typo setting srv_regobj.
4756
4757 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
4758
4759         * linux-low.c (fetch_register): Avoid passing a non string literal
4760         format to `error'.
4761         (usr_store_inferior_registers): Ditto.
4762
4763 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
4764
4765         * linux-low.c (linux_write_memory): Bail out early if peeking
4766         memory failed.
4767
4768 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
4769
4770         * linux-low.h (struct lwp_info): New fields
4771         `stopped_by_watchpoint' and `stopped_data_address'.
4772         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4773         here, and cache them in the lwp object.
4774         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4775         directly.
4776         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4777         field.
4778         (linux_stopped_by_watchpoint): Rewrite.
4779         (linux_stopped_data_address): Rewrite.
4780
4781 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
4782
4783         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4784         switching the current inferior, not before.
4785
4786 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
4787
4788         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4789         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4790         i386-linux.c and amd64-linux.c.
4791         (reg-i386.o): Removed.
4792         (reg-i386.c): Likewise.
4793         (reg-i386-linux.o): Likewise.
4794         (reg-i386-linux.c): Likewise.
4795         (reg-x86-64.o): Likewise.
4796         (reg-x86-64.c): Likewise.
4797         (reg-x86-64-linux.o): Likewise.
4798         (reg-x86-64-linux.c): Likewise.
4799         (i386.o): New.
4800         (i386.c): Likewise.
4801         (i386-linux.o): Likewise.
4802         (i386-linux.c): Likewise.
4803         (amd64.o): Likewise.
4804         (amd64.c): Likewise.
4805         (amd64-linux.o): Likewise.
4806         (amd64-linux.c): Likewise.
4807
4808         * configure.srv (srv_i386_regobj): New.
4809         (srv_i386_linux_regobj): Likewise.
4810         (srv_amd64_regobj): Likewise.
4811         (srv_amd64_linux_regobj): Likewise.
4812         (srv_i386_32bit_xmlfiles): Likewise.
4813         (srv_i386_64bit_xmlfiles): Likewise.
4814         (srv_i386_xmlfiles): Likewise.
4815         (srv_amd64_xmlfiles): Likewise.
4816         (srv_i386_linux_xmlfiles): Likewise.
4817         (srv_amd64_linux_xmlfiles): Likewise.
4818         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
4819         srv_xmlfiles to $srv_i386_xmlfiles.
4820         (i[34567]86-*-mingw32ce*): Likewise.
4821         (i[34567]86-*-mingw*): Likewise.
4822         (i[34567]86-*-nto*): Likewise.
4823         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4824         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
4825         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4826         (x86_64-*-linux*): Likewise.
4827
4828         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4829         (init_registers_amd64_linux): New.
4830         (x86_arch_setup): Replace init_registers_x86_64_linux with
4831         init_registers_amd64_linux.
4832
4833 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
4834
4835         * configure.ac: Check for libdl.  If it is not available link against
4836         static libthread_db.
4837         * configure: Regenerate.
4838
4839 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
4840
4841         PR9605
4842
4843         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4844         handing a read watchpoint.
4845         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4846
4847 2010-02-12  Doug Evans  <dje@google.com>
4848
4849         * linux-low.c (linux_supports_tracefork_flag): Document.
4850         (linux_look_up_symbols): Add comment.
4851
4852 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
4853
4854         * regcache.c (supply_register): Clear regcache if buf is NULL.
4855
4856 2010-02-02  Nicolas Roche  <roche@sourceware.org>
4857             Joel Brobecker  <brobecker@adacore.com>
4858
4859         * inferiors.c (find_inferior): Add function documentation.
4860         (unloaded_dll): Handle the case where the unloaded dll has not
4861         been previously registered in the dll list.
4862
4863 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
4864
4865         * linux-arm-low.c (thumb_breakpoint_len): Delete.
4866         (thumb2_breakpoint): New.
4867         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4868
4869 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
4870
4871         * linux-low.c (get_stop_pc): Check for SIGTRAP.
4872         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4873         breakpoints.
4874
4875 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
4876
4877         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4878
4879 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4880
4881         * linux-s390-low.c (s390_collect_ptrace_register)
4882         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4883
4884 2010-01-21  Doug Evans  <dje@google.com>
4885
4886         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4887         (PTRACE_ARG4_TYPE): New macro.
4888         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4889         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4890         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4891         (usr_store_inferior_registers): Ditto.
4892         (linux_read_memory, linux_write_memory): Ditto.
4893         (linux_test_for_tracefork): Ditto.
4894
4895         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4896         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4897
4898 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
4899
4900         * proc-service.c (ps_lgetregs): Don't refetch registers from the
4901         target.
4902
4903 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
4904
4905         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4906         prototype to take a regcache.  Adjust.
4907
4908 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
4909
4910         * regcache.h (struct thread_info): Forward declare.
4911         (struct regcache): New.
4912         (new_register_cache): Adjust prototype.
4913         (get_thread_regcache): Declare.
4914         (free_register_cache): Adjust prototype.
4915         (registers_to_string, registers_from_string): Ditto.
4916         (supply_register, supply_register_by_name, collect_register)
4917         (collect_register_as_string, collect_register_by_name): Ditto.
4918         * regcache.c (struct inferior_regcache_data): Delete.
4919         (get_regcache): Rename to ...
4920         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
4921         fetching registers.
4922         (regcache_invalidate_one): Adjust.
4923         (regcache_invalidate): Fix prototype.
4924         (new_register_cache): Return the new register cache.
4925         (free_register_cache): Change prototype.
4926         (realloc_register_cache): Adjust.
4927         (registers_to_string): Change prototype to take a regcache.  Adjust.
4928         (registers_from_string): Ditto.
4929         (register_data): Ditto.
4930         (supply_register): Ditto.
4931         (supply_register_by_name): Ditto.
4932         (collect_register): Ditto.
4933         (collect_register_as_string): Ditto.
4934         (collect_register_by_name): Ditto.
4935         * server.c (process_serial_event): Adjust.
4936         * linux-low.h (regset_fill_func, regset_store_func): Change
4937         prototype.
4938         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4939         Change prototype.
4940         * linux-low.c (get_stop_pc): Adjust.
4941         (check_removed_breakpoint): Adjust.
4942         (linux_wait_for_event): Adjust.
4943         (linux_resume_one_lwp): Adjust.
4944         (fetch_register): Add regcache parameter.  Adjust.
4945         (usr_store_inferior_registers): Ditto.
4946         (regsets_fetch_inferior_registers): Ditto.
4947         (regsets_store_inferior_registers): Ditto.
4948         (linux_fetch_registers, linux_store_registers): Ditto.
4949         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4950         regcache.  Adjust.
4951         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4952         Ditto.
4953         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4954         prototype to take a regcache.
4955         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4956         * remote-utils.c (convert_ascii_to_int, outreg)
4957         (prepare_resume_reply): Change prototype to take a regcache.
4958         Adjust.
4959         * target.h (struct target_ops) <fetch_registers, store_registers>:
4960         Change prototype to take a regcache.
4961         (fetch_inferior_registers, store_inferior_registers): Change
4962         prototype to take a regcache.  Adjust.
4963         * proc-service.c (ps_lgetregs): Adjust.
4964         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4965         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4966         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4967         take a regcache.  Adjust.
4968         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4969         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4970         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4971         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
4972         * linux-cris-low.c (cris_get_pc, cris_set_pc)
4973         (cris_cannot_fetch_register):
4974         (cris_breakpoint_at): Change prototype to take a regcache.
4975         Adjust.
4976         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4977         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4978         to take a regcache.  Adjust.
4979         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4980         Adjust.
4981         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4982         take a regcache.  Adjust.
4983         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4984         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4985         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
4986         * linux-mips-low.c (mips_get_pc):
4987         (mips_set_pc): Change prototype to take a regcache.  Adjust.
4988         (mips_reinsert_addr): Adjust.
4989         (mips_collect_register): Change prototype to take a regcache.
4990         Adjust.
4991         (mips_supply_register):
4992         (mips_collect_register_32bit, mips_supply_register_32bit)
4993         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4994         (mips_store_fpregset): Ditto.
4995         * linux-ppc-low.c (ppc_supply_ptrace_register)
4996         (ppc_supply_ptrace_register): Ditto.
4997         (parse_spufs_run): Adjust.
4998         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4999         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5000         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5001         take a regcache.  Adjust.
5002         * linux-s390-low.c (s390_collect_ptrace_register)
5003         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5004         (s390_set_pc): Change prototype to take a regcache.  Adjust.
5005         (s390_arch_setup): Adjust.
5006         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5007         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
5008         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5009         (sparc_fill_gregset, sparc_store_gregset_from_stack)
5010         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5011         regcache.  Adjust.
5012         (sparc_breakpoint_at): Adjust.
5013         * linux-xtensa-low.c (xtensa_fill_gregset):
5014         (xtensa_store_gregset):
5015         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5016         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
5017         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5018         prototype to take a regcache.  Adjust.
5019         * win32-arm-low.c (arm_fetch_inferior_register)
5020         (arm_store_inferior_register): Change prototype to take a
5021         regcache.  Adjust.
5022         * win32-i386-low.c (i386_fetch_inferior_register)
5023         (i386_store_inferior_register): Change prototype to take a
5024         regcache.  Adjust.
5025         * win32-low.c (child_fetch_inferior_registers)
5026         (child_store_inferior_registers): Change prototype to take a
5027         regcache.  Adjust.
5028         (win32_wait): Adjust.
5029         (win32_fetch_inferior_registers): Change prototype to take a
5030         regcache.  Adjust.
5031         (win32_store_inferior_registers): Adjust.
5032         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5033         store_inferior_register>: Change prototype to take a regcache.
5034
5035 2010-01-20  Doug Evans  <dje@google.com>
5036
5037         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5038         #ifdef.
5039         (linux_wait_for_event1, linux_init_signals): Ditto.
5040         (W_STOPCODE): Provide definition if missing.
5041
5042 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
5043
5044         * linux-low.c (linux_core_of_thread): New.
5045         (compare_ints, show_process, list_threads): New.
5046         (linux_qxfer_osdata): Report threads and cores.
5047         (linux_target_op): Register linux_core_of_thread.
5048         * remote-utils.c (prepare_resume_reply): Report the core.
5049         (buffer_xml_printf): Support %d specifier.
5050         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5051         New.
5052         (handle_query): Handle qXfer:threads.  Announce availability
5053         thereof.
5054         * target.h (struct target_ops): New field core_of_thread.
5055
5056 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
5057
5058         * Makefile.in (clean): Remove new generated files.
5059         (reg-s390.o, reg-s390.c): Remove rules.
5060         (reg-s390x.o, reg-s390x.c): Likewise.
5061         (s390-linux32.o, s390-linux32.c): Add rules.
5062         (s390-linux64.o, s390-linux64.c): Likewise.
5063         (s390x-linux64.o, s390x-linux64.c): Likewise.
5064         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5065         * linux-s390-low.c: Include <elf.h>.
5066         (HWCAP_S390_HIGH_GPRS): Define if undefined.
5067         (init_registers_s390): Remove prototype.
5068         (init_registers_s390x): Likewise.
5069         (init_registers_s390_linux32): Add prototype.
5070         (init_registers_s390_linux64): Likewise.
5071         (init_registers_s390x_linux64): Likewise.
5072         (s390_num_regs_3264): New define.
5073         (s390_regmap_3264): New global variable.
5074         (s390_cannot_fetch_register): Remove obsolete check.
5075         (s390_cannot_store_register): Likewise.
5076         (s390_collect_ptrace_register): Handle upper/lower register halves.
5077         (s390_supply_ptrace_register): Likewise.
5078         (s390_fill_gregset): Update to register number changes.
5079         (s390_get_hwcap): New routine.
5080         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5081         Install appropriate regmap and register set.
5082
5083 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
5084
5085         * server.c (gdbserver_version): Update copyright year to 2010.
5086         * gdbreplay.c (gdbreplay_version): Likewise.
5087
5088 2009-12-28  Doug Evans  <dje@google.com>
5089
5090         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5091         elf/external.h.  Include <elf.h> instead but only if necessary.
5092
5093 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
5094
5095         * linux-low.c (linux_remove_process): Remove `detaching'
5096         parameter.  Don't release/detach from thread_db here.
5097         (linux_kill): Release/detach from thread_db here, ...
5098         (linux_detach): ... and here, before actually detaching.
5099         (linux_wait_1): ... and here, when a process exits.
5100         * thread-db.c (any_thread_of): New.
5101         (thread_db_free): Switch the current inferior to a thread of the
5102         passed in process.
5103
5104 2009-12-21  Doug Evans  <dje@google.com>
5105
5106         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5107
5108         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5109         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5110         warning ifndef __NR_tkill.  Move setting of errno there too.
5111         Delete unnecessary resetting of errno after syscall.
5112         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5113
5114         * configure.ac: Check for dladdr.
5115         * config.in: Regenerate.
5116         * configure: Regenerate.
5117         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5118         (try_thread_db_load): Update.
5119
5120         * linux-low.c (my_waitpid): Delete unnecessary prototype.
5121
5122 2009-12-18  Doug Evans  <dje@google.com>
5123
5124         * event-loop.c: Include unistd.h if it exists.
5125
5126         * linux-low.c (my_waitpid): Move definition away from being in
5127         between linux_tracefork_child/linux_test_for_tracefork.
5128
5129         * gdb_proc_service.h (psaddr_t): Fix type.
5130         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5131         signature to match glibc.
5132
5133 2009-12-16  Doug Evans  <dje@google.com>
5134
5135         * linux-low.c (linux_read_memory): Fix argument to read.
5136
5137 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
5138
5139         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5140         events, don't leave current_inferior pointing at null.
5141
5142 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
5143
5144         * win32-low.c (LOG): Delete.
5145         (OUTMSG): Output to stderr.
5146         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5147         on compile time LOG macro.
5148         (win32_wait): Fix debug output.
5149
5150 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
5151
5152         * win32-low.c (win32_add_one_solib): If the dll name is
5153         "ntdll.dll", prepend the system directory to the dll path.
5154
5155 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
5156
5157         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5158
5159 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5160             Vladimir Prus  <vladimir@codesourcery.com>
5161
5162         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5163         * configure.ac: Check for __mcoldfire__ and set
5164         gdb_cv_m68k_is_coldfire.
5165         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5166         reg-cf.o and reg-m68k.o.
5167         * configure: Regenerated.
5168
5169 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
5170
5171         * linux-low.c (linux_remove_process): Add `detaching' parameter.
5172         Pass it to thread_db_free.
5173         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5174         proper `detaching' argument to linux_remove_process.
5175         * linux-low.h (thread_db_free): Add `detaching' parameter.
5176         * thread-db.c (thread_db_init): Pass false as `detaching' argument
5177         to thread_db_free.
5178         (thread_db_free): Add `detaching' parameter.  Only
5179         call td_ta_clear_event if detaching from process.
5180
5181 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
5182
5183         * thread-db.c (thread_db_free): Fix typo.
5184
5185 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
5186
5187         PR gdb/10838
5188         * thread-db.c (thread_db_free): Call td_ta_clear_event.
5189
5190 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
5191
5192         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5193         with an i686 compiler.
5194         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5195         needed.
5196         * configure: Rebuilt.
5197
5198 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
5199
5200         PR gdb/10783
5201
5202         * server.c (handle_search_memory_1): Correct read_addr initialization
5203         in loop for searching subsequent chunks.
5204
5205 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
5206
5207         * configure.ac: New --with-libthread-db option.
5208         * thread-db.c: Allow direct dependence on libthread_db.
5209         (thread_db_free): Adjust.
5210         * config.in: Regenerate.
5211         * configure: Likewise.
5212
5213 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
5214
5215         PR gdb/10757
5216         * thread-db.c (attach_thread): New function.
5217         (maybe_attach_thread): Return success/failure.
5218         (find_new_threads_callback): Adjust.
5219         (thread_db_find_new_threads): Loop until no new threads.
5220
5221 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
5222
5223         * proc-service.c (ps_lgetregs): Formatting.
5224
5225 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
5226
5227         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5228         * configure.ac: Adjust.
5229         * linux-low.h (struct process_info_private): Move members to struct
5230         thread_db.
5231         (thread_db_free, thread_db_handle_monitor_command): New prototype.
5232         * linux-low.c (linux_remove_process): Adjust.
5233         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5234         * server.c (handle_query): Move code ...
5235         (handle_monitor_command): ... here. New function.
5236         * target.h (struct target_ops): New member.
5237         * thread-db.c (struct thread_db): New.
5238         (libthread_db_search_path): New variable.
5239         (thread_db_create_event, thread_db_enable_reporting)
5240         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5241         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5242         (try_thread_db_load_1, dladdr_to_soname): New functions.
5243         (try_thread_db_load, thread_db_load_search): New functions.
5244         (thread_db_init): Search for libthread_db.
5245         (thread_db_free): New function.
5246         (thread_db_handle_monitor_command): Likewise.
5247         * config.in: Regenerate.
5248         * configure: Regenerate.
5249
5250 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5251
5252         * spu-low.c (spu_kill): Wait for inferior to terminate.
5253         Call clear_inferiors.
5254         (spu_detach): Call clear_inferiors.
5255
5256 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5257
5258         * aclocal.m4: Regenerate.
5259         * config.in: Likewise.
5260         * configure: Likewise.
5261
5262 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
5263
5264         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5265         (parse_spufs_run): New function.
5266         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5267         (ppc_breakpoint_at): Handle SPU breakpoints.
5268
5269 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
5270
5271         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5272         (SPUFS_MAGIC): Define.
5273         (spu_enumerate_spu_ids): New function.
5274         (linux_qxfer_spu): New function.
5275         (linux_target_ops): Install linux_qxfer_spu.
5276
5277 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
5278
5279         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5280         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
5281         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5282         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5283         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5284         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5285         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5286         (init_registers_powerpc_cell32l): Add prototype.
5287         (init_registers_powerpc_cell64l): Likewise.
5288         (ppc_arch_setup): Detect Cell/B.E. architecture.
5289
5290 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5291
5292         * Makefile.in (datarootdir): New variable.
5293
5294 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
5295
5296         * linux-low.c (linux_write_memory): Update debugging output.
5297         * Makefile.in (clean): Add new descriptions.
5298         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5299         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5300         * configure.srv: Add new files for arm*-*-linux*.
5301         * linux-arm-low.c: Add new declarations.
5302         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5303         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5304         (HWCAP_VFPv3D16): New.
5305         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5306         instead of __IWMMXT__.
5307         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5308         (arm_arch_setup): New.
5309         (target_regsets): Remove #ifdef.  Add VFP regset.
5310         (the_low_target): Use arm_arch_setup.
5311
5312 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
5313
5314         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5315         the main thread again.
5316
5317 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
5318
5319         Adding Neutrino gdbserver.
5320         * configure: Regenerated.
5321         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5322         * configure.srv (i[34567]86-*-nto*): New target.
5323         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5324         * remote-utils.c [__QNX__]: Include sys/iomgr.h
5325         (nto_comctrl) [__QNX__]: New function.
5326         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5327
5328 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
5329
5330         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5331         srv_tgtobj.
5332
5333 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
5334             Pedro Alves  <pedro@codesourcery.com>
5335
5336         * win32-i386-low.c (i386_get_thread_context): Handle systems that
5337         don't support CONTEXT_EXTENDED_REGISTERS.
5338         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5339         (the_low_target): Install them.
5340         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5341         failing with ERROR_PIPE_NOT_CONNECTED.
5342
5343 2009-06-30  Doug Evans  <dje@google.com>
5344             Pierre Muller  <muller@ics.u-strasbg.fr>
5345
5346         Add h/w watchpoint support to x86-linux, win32-i386.
5347         * Makefile.in (SFILES): Add i386-low.c
5348         (i386_low_h): Define.
5349         (i386-low.o): Add dependencies.
5350         (linux-x86-low.o): Add i386-low.h dependency.
5351         (win32-i386-low.o): Ditto.
5352         * i386-low.c: New file.
5353         * i386-low.h: New file.
5354         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5355         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5356         * linux-low.c (linux_add_process): Initialize arch_private.
5357         (linux_remove_process): Free arch_private.
5358         (add_lwp): Initialize arch_private.
5359         (delete_lwp): Free arch_private.
5360         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5361         provided.
5362         * linux-low.h (process_info_private): New member arch_private.
5363         (lwp_info): New member arch_private.
5364         (linux_target_ops): New members new_process, new_thread,
5365         prepare_to_resume.
5366         (ptid_of): New macro.
5367         * linux-x86-low.c: Include stddef.h, i386-low.h.
5368         (arch_process_info): New struct.
5369         (arch_lwp_info): New struct.
5370         (x86_linux_dr_get, x86_linux_dr_set): New functions.
5371         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5372         (i386_dr_low_get_status): New function.
5373         (x86_insert_point, x86_remove_point): New functions.
5374         (x86_stopped_by_watchpoint): New function.
5375         (x86_stopped_data_address): New function.
5376         (x86_linux_new_process, x86_linux_new_thread): New functions.
5377         (x86_linux_prepare_to_resume): New function.
5378         (the_low_target): Add entries for insert_point, remove_point,
5379         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5380         prepare_to_resume.
5381         * server.c (debug_hw_points): New global.
5382         (monitor_show_help): Document set debug-hw-points.
5383         (handle_query): Process "set debug-hw-points".
5384         * server.h (debug_hw_points): Declare.
5385         (paddress): Declare.
5386         * utils.c (NUMCELLS, CELLSIZE): New macros.
5387         (get_sell, xsnprintf, paddress): New functions.
5388         * win32-arm-low.c (the_low_target): Add entries for insert_point,
5389         remove_point, stopped_by_watchpoint, stopped_data_address.
5390         * win32-i386-low.c: Include i386-low.h.
5391         (debug_reg_state): Replaces dr.
5392         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5393         (i386_dr_low_get_status): New function.
5394         (i386_insert_point, i386_remove_point): New functions.
5395         (i386_stopped_by_watchpoint): New function.
5396         (i386_stopped_data_address): New function.
5397         (i386_initial_stuff): Update.
5398         (get_thread_context,set_thread_context,i386_thread_added): Update.
5399         (the_low_target): Add entries for insert_point,
5400         remove_point, stopped_by_watchpoint, stopped_data_address.
5401         * win32-low.c (win32_insert_watchpoint): New function.
5402         (win32_remove_watchpoint): New function.
5403         (win32_stopped_by_watchpoint): New function.
5404         (win32_stopped_data_address): New function.
5405         (win32_target_ops): Add entries for insert_watchpoint,
5406         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5407         * win32-low.h (win32_target_ops): New members insert_point,
5408         remove_point, stopped_by_watchpoint, stopped_data_address.
5409
5410 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
5411
5412         * server.c (process_serial_event): Re-return unsupported, not
5413         error, if the type isn't recognized.  Re-allow supporting only
5414         insert or remove packets.  Also call require_running for
5415         breakpoints.  Add missing break statement to default case.  Tidy.
5416         * target.h (struct target_ops): Rename insert_watchpoint to
5417         insert_point, and remove_watchpoint to remove_point.
5418
5419         * linux-low.h (struct linux_target_ops): Likewise.
5420         * linux-low.c (linux_insert_watchpoint): Rename to ...
5421         (linux_insert_point): ... this.  Adjust.
5422         (linux_remove_watchpoint): Rename to ...
5423         (linux_remove_point): ... this.  Adjust.
5424         (linux_target_ops): Adjust.
5425         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5426         (cris_insert_point): ... this.
5427         (cris_remove_watchpoint): Rename to ...
5428         (cris_remove_point): ... this.
5429         (the_low_target): Adjust.
5430
5431 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
5432
5433         * server.c (handle_v_kill): Pass signal_pid to
5434         kill_inferior if multi_process is zero.
5435
5436 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
5437
5438         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5439         * target.h (target_ops): Comment for *_watchpoint to make it clear
5440         the functions can get types '0' and '1'.
5441
5442 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
5443
5444         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5445         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5446         * regcache.c (get_regcache): Likewise.
5447         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5448         * win32-low.c (child_fetch_inferior_registers): Remove check for
5449         regno 0.
5450
5451 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
5452             Pedro Alves <pedro@codesourcery.com>
5453
5454         * target.h (struct target_ops) <supports_multi_process>: New
5455         callback.
5456         (target_supports_multi_process): New.
5457         * server.c (handle_query): Even if GDB reports support, only
5458         enable multi-process if the target also supports it.  Report
5459         multi-process support only if the target backend supports it.
5460         * linux-low.c (linux_supports_multi_process): New function.
5461         (linux_target_ops): Install it as target_supports_multi_process
5462         callback.
5463
5464 2009-05-24  Doug Evans  <dje@google.com>
5465
5466         Global renaming of find_thread_pid to find_thread_ptid.
5467         * server.h (find_thread_ptid): Renamed from find_thread_pid.
5468         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5469         All callers updated.
5470
5471         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5472         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5473         directly.
5474
5475         * linux-low.c (get_stop_pc): Print pc if debug_threads.
5476         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5477         (linux_resume_one_lwp): Ditto.
5478
5479 2009-05-23  Doug Evans  <dje@google.com>
5480
5481         * linux-low.c (linux_resume_one_lwp): Change type of first arg
5482         from struct inferior_list_entry * to struct lwp_info *.
5483         All callers updated.
5484
5485 2009-05-13  Doug Evans  <dje@google.com>
5486
5487         * linux-x86-low.c: Don't include assert.h.
5488         (x86_siginfo_fixup): Use fatal, not assert.
5489         (x86_arch_setup): Fix comment.
5490
5491 2009-05-12  Doug Evans  <dje@google.com>
5492
5493         Biarch support for i386/amd64 gdbserver.
5494         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5495         Add linux-x86-low.c.
5496         (linux-i386-low.o, linux-x86-64-low.o): Delete.
5497         (linux-x86-low.o): Add.
5498         * linux-x86-64-low.c: Delete.
5499         * linux-i386-low.c: Delete.
5500         * linux-x86-low.c: New file.
5501         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5502         linux-x86-low.o.
5503         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5504         linux-x86-low.o.
5505         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5506         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5507         (linux_child_pid_to_exec_file): New function.
5508         (elf_64_header_p, elf_64_file_p): New functions.
5509         (siginfo_fixup): New function.
5510         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
5511         give target a chance to convert layout.
5512         * linux-low.h (linux_target_ops): New member siginfo_fixup.
5513         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5514
5515 2009-05-07  Doug Evans  <dje@google.com>
5516
5517         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5518         (regsets_store_inferior_registers): Ditto.
5519
5520 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
5521
5522         PR server/10048
5523
5524         * linux-low.c (must_set_ptrace_flags): Delete.
5525         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5526         of the global.
5527         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
5528         `lwp->must_set_ptrace_flags' instead.
5529         (linux_wait_for_event_1): Set ptrace options here.
5530         (linux_wait_1): ... not here.
5531
5532 2009-04-30  Doug Evans  <dje@google.com>
5533
5534         * inferiors.c (started_inferior_callback): New function.
5535         (attached_inferior_callback): New function.
5536         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5537         * server.c (print_started_pid, print_attached_pid): New functions.
5538         (detach_or_kill_for_exit): New function.
5539         (main): Call it instead of for_each_inferior (kill_inferior_callback).
5540         * server.h (have_started_inferiors_p): Declare.
5541         (have_attached_inferiors_p): Declare.
5542
5543         * inferiors.c (remove_process): Fix memory leak, free process.
5544         * linux-low.c (linux_remove_process): New function.
5545         (linux_kill): Call it instead of remove_process.
5546         (linux_detach, linux_wait_1): Ditto.
5547
5548 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
5549
5550         * configure.srv: Add x86 Windows CE target.
5551
5552 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
5553
5554         * inferiors.c (get_thread_process): Make global.
5555         * server.h (get_thread_process): Add prototype.
5556         * thread-db.c (find_one_thread): Use get_thread_process
5557         instead of current_process.
5558         (thread_db_get_tls_address): Do not crash if called when
5559         thread layer is not yet initialized.
5560
5561 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
5562
5563         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5564         * spu-low.c (current_tid): Rename to ...
5565         (current_ptid): ... this.
5566         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5567         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5568         ptid_get_lwp (current_ptid) instead of current_tid.
5569         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5570         instead of current_tid.  Use find_process_pid to verify pid
5571         argument is valid.  Pass proper argument to remove_process.
5572         (spu_thread_alive): Compare current_ptid instead of current_tid.
5573         (spu_resume): Likewise.
5574
5575 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
5576
5577         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5578         variable.
5579
5580 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5581
5582         Implement the multiprocess extensions, and add linux multiprocess
5583         support.
5584
5585         * server.h (ULONGEST): Declare.
5586         (struct ptid, ptid_t): New.
5587         (minus_one_ptid, null_ptid): Declare.
5588         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5589         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5590         (struct inferior_list_entry): Change `id' type from unsigned from
5591         to ptid_t.
5592         (struct sym_cache, struct breakpoint, struct
5593         process_info_private): Forward declare.
5594         (struct process_info): Declare.
5595         (current_process): Declare.
5596         (all_processes): Declare.
5597         (initialize_inferiors): Declare.
5598         (add_thread): Adjust to use ptid_t.
5599         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5600         (add_process, remove_process, find_thread_pid): Declare.
5601         (find_inferior_id): Adjust to use ptid_t.
5602         (cont_thread, general_thread, step_thread): Change type to ptid_t.
5603         (multi_process): Declare.
5604         (push_event): Adjust to use ptid_t.
5605         (read_ptid, write_ptid): Declare.
5606         (prepare_resume_reply): Adjust to use ptid_t.
5607         (clear_symbol_cache): Declare.
5608         * inferiors.c (all_processes): New.
5609         (null_ptid, minus_one_ptid): New.
5610         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5611         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5612         (add_thread): Change unsigned long to ptid.  Remove gdb_id
5613         parameter.  Adjust.
5614         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5615         (gdb_id_to_thread): Rename to ...
5616         (find_thread_pid): ... this.  Change unsigned long to ptid.
5617         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5618         (loaded_dll, pull_pid_from_list): Adjust.
5619         (add_process, remove_process, find_process_pid)
5620         (get_thread_process, current_process, initialize_inferiors): New.
5621         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5622         (struct target_waitstatus) <related_pid>: Ditto.
5623         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
5624         return type to int.
5625         (struct target_ops) <join>: Add `pid' argument.
5626         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5627         (struct target_ops) <wait>: Add `ptid' field.  Change return type
5628         to ptid.
5629         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5630         (mywait): Add `ptid' argument.  Change return type to ptid_t.
5631         (target_pid_to_str): Declare.
5632         * target.c (set_desired_inferior): Adjust to use ptids.
5633         (mywait): Add new `ptid' argument.  Adjust.
5634         (target_pid_to_str): New.
5635         * mem-break.h (free_all_breakpoints): Declare.
5636         * mem-break.c (breakpoints): Delelete.
5637         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5638         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5639         to use per-process breakpoint list.
5640         (free_all_breakpoints): New.
5641         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5642         (symbol_cache, all_symbols_looked_up): Delete.
5643         (hexchars): New.
5644         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5645         read_ptid): New.
5646         (prepare_resume_reply): Change ptid argument's type from unsigned
5647         long to ptid_t.  Adjust.  Implement W;process and X;process.
5648         (free_sym_cache, clear_symbol_cache): New.
5649         (look_up_one_symbol): Adjust to per-process symbol cache.  *
5650         * server.c (cont_thread, general_thread, step_thread): Change type
5651         to ptid_t.
5652         (attached): Delete.
5653         (multi_process): New.
5654         (last_ptid): Change type to ptid_t.
5655         (struct vstop_notif) <ptid>: Change type to ptid_t.
5656         (queue_stop_reply, push_event): Change `ptid' argument's type to
5657         ptid_t.
5658         (discard_queued_stop_replies): Add `pid' argument.
5659         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
5660         changes.  Don't reference the `attached' global.
5661         (attach_inferior): Adjust to mywait interface changes.
5662         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
5663         features.  Handle and report "multiprocess+".  Handle
5664         "qAttached:PID".
5665         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
5666         changes.
5667         (handle_v_kill): New.
5668         (handle_v_stopped): Adjust to use target_pid_to_str.
5669         (handle_v_requests): Allow multiple attaches and runs when
5670         multiprocess extensions are in effect.  Handle "vKill".
5671         (myresume): Adjust to use ptids.
5672         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
5673         (handle_status): Adjust to discard_queued_stop_replies interface
5674         change.
5675         (first_thread_of, kill_inferior_callback)
5676         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5677         (main): Call initialize_inferiors.  Adjust to use ptids, killing
5678         and detaching from all inferiors.  Handle multiprocess packet
5679         variants.
5680         * linux-low.h: Include gdb_proc_service.h.
5681         (struct process_info_private): New.
5682         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5683         <lwpid_of>: Use ptid_get_lwp.
5684         (get_lwp_thread): Adjust.
5685         (struct lwp_info): Add `dead' member.
5686         (find_lwp_pid): Declare.
5687         * linux-low.c (thread_db_active): Delete.
5688         (new_inferior): Adjust comment.
5689         (inferior_pid): Delete.
5690         (linux_add_process): New.
5691         (handle_extended_wait): Adjust.
5692         (add_lwp): Change unsigned long to ptid.
5693         (linux_create_inferior): Add process to processes table.  Adjust
5694         to use ptids.  Don't set new_inferior here.
5695         (linux_attach_lwp): Rename to ...
5696         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
5697         it.  Adjust to use ptids.
5698         (linux_attach_lwp): New.
5699         (linux_attach): Add process to processes table.  Don't set
5700         new_inferior here.
5701         (struct counter): New.
5702         (second_thread_of_pid_p, last_thread_of_process_p): New.
5703         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
5704         multiple processes.
5705         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
5706         processes.  Remove process from process table.
5707         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
5708         to multiple processes.
5709         (any_thread_of): New.
5710         (linux_detach): Add `pid' argument, and handle it.  Remove process
5711         from processes table.
5712         (linux_join): Add `pid' argument.  Handle it.
5713         (linux_thread_alive): Change unsighed long argument to ptid_t.
5714         Consider dead lwps as not being alive.
5715         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
5716         threads we're not interested in.
5717         (same_lwp, find_lwp_pid): New.
5718         (linux_wait_for_lwp): Change `pid' argument's type from int to
5719         ptid_t.  Adjust.
5720         (linux_wait_for_event): Rename to ...
5721         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
5722         from int to ptid_t.  Adjust.
5723         (linux_wait_for_event): New.
5724         (linux_wait_1): Add `ptid' argument.  Change return type to
5725         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
5726         that exit from the process table.
5727         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
5728         Adjust.
5729         (mark_lwp_dead): New.
5730         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
5731         stopping all threads, mark its main lwp as dead.
5732         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5733         ptids.
5734         (fetch_register, usr_store_inferior_registers)
5735         (regsets_fetch_inferior_registers)
5736         (regsets_store_inferior_registers, linux_read_memory)
5737         (linux_write_memory): Inline `inferior_pid'.
5738         (linux_look_up_symbols): Adjust to use per-process
5739         `thread_db_active'.
5740         (linux_request_interrupt): Adjust to use ptids.
5741         (linux_read_auxv): Inline `inferior_pid'.
5742         (initialize_low): Don't reference thread_db_active.
5743         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5744         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5745         (ps_getpid): Return the pid of the current inferior.
5746         * thread-db.c (proc_handle, thread_agent): Delete.
5747         (thread_db_create_event, thread_db_enable_reporting): Adjust to
5748         per-process data.
5749         (find_one_thread): Change argument type to ptid_t.  Adjust to
5750         per-process data.
5751         (maybe_attach_thread): Adjust to per-process data and ptids.
5752         (thread_db_find_new_threads): Ditto.
5753         (thread_db_init): Ditto.
5754         * spu-low.c (spu_create_inferior, spu_attach): Add process to
5755         processes table.  Adjust to use ptids.
5756         (spu_kill, spu_detach): Adjust interface.  Remove process from
5757         processes table.
5758         (spu_join, spu_thread_alive): Adjust interface.
5759         (spu_wait): Adjust interface.  Remove process from processes
5760         table.  Adjust to use ptids.
5761         * win32-low.c (current_inferior_tid): Delete.
5762         (current_inferior_ptid): New.
5763         (debug_event_ptid): New.
5764         (thread_rec): Take a ptid.  Adjust.
5765         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
5766         (child_delete_thread): Ditto.
5767         (do_initial_child_stuff): Add `attached' argument.  Add process to
5768         processes table.
5769         (child_fetch_inferior_registers, child_store_inferior_registers):
5770         Adjust.
5771         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5772         (win32_attach): Pass 1 to do_initial_child_stuff.
5773         (win32_kill): Adjust interface.  Remove process from processes
5774         table.
5775         (win32_detach): Ditto.
5776         (win32_join): Adjust interface.
5777         (win32_thread_alive): Take a ptid.
5778         (win32_resume): Adjust to use ptids.
5779         (get_child_debug_event): Ditto.
5780         (win32_wait): Adjust interface.  Remove exiting process from
5781         processes table.
5782
5783 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5784
5785         Non-stop mode support.
5786
5787         * server.h (non_stop): Declare.
5788         (gdb_client_data, handler_func): Declare.
5789         (delete_file_handler, add_file_handler, start_event_loop):
5790         Declare.
5791         (handle_serial_event, handle_target_event, push_event)
5792         (putpkt_notif): Declare.
5793         * target.h (enum resume_kind): New.
5794         (struct thread_resume): Replace `step' field by `kind' field.
5795         (TARGET_WNOHANG): Define.
5796         (struct target_ops) <wait>: Add `options' argument.
5797         <supports_non_stop, async, start_non_stop>: New fields.
5798         (target_supports_non_stop, target_async): New.
5799         (start_non_stop): Declare.
5800         (mywait): Add `options' argument.
5801         * target.c (mywait): Add `options' argument.  Print child exit
5802         notifications here.
5803         (start_non_stop): New.
5804         * server.c (non_stop, own_buf, mem_buf): New globals.
5805         (struct vstop_notif): New.
5806         (notif_queue): New global.
5807         (queue_stop_reply, push_event, discard_queued_stop_replies)
5808         (send_next_stop_reply): New.
5809         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
5810         interface changes.
5811         (attach_inferior): In non-stop mode, don't wait for the target
5812         here.
5813         (handle_general_set): Handle QNonStop.
5814         (handle_query): When handling qC, return the current general
5815         thread, instead of the first thread of the list.
5816         (handle_query): If the backend supports non-stop mode, include
5817         QNonStop+ in the qSupported query response.
5818         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
5819         and non-stop mode.
5820         (handle_v_attach, handle_v_run): Handle non-stop mode.
5821         (handle_v_stopped): New.
5822         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
5823         (myresume): Adjust to use resume_kind.  Handle non-stop.
5824         (queue_stop_reply_callback): New.
5825         (handle_status): Handle non-stop mode.
5826         (main): Clear non_stop flag on reconnection.  Use the event-loop.
5827         Refactor serial protocol handling from here ...
5828         (process_serial_event): ... to this new function.  When GDB
5829         selects any thread, select one here.  In non-stop mode, wait until
5830         GDB acks all pending events before exiting.
5831         (handle_serial_event, handle_target_event): New.
5832         * remote-utils.c (remote_open): Install remote_desc in the event
5833         loop.
5834         (remote_close): Remove remote_desc from the event loop.
5835         (putpkt_binary): Rename to...
5836         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
5837         (putpkt_binary): New as wrapper around putpkt_binary_1.
5838         (putpkt_notif): New.
5839         (prepare_resume_reply): In non-stop mode, don't change the
5840         general_thread.
5841         * event-loop.c: New.
5842         * Makefile.in (OBJ): Add event-loop.o.
5843         (event-loop.o): New rule.
5844
5845         * linux-low.h (pid_of): Moved here.
5846         (lwpid_of): New.
5847         (get_lwp_thread): Use lwpid_of.
5848         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
5849         * linux-low.c (pid_of): Delete.
5850         (inferior_pid): Use lwpid_of.
5851         (linux_event_pipe): New.
5852         (target_is_async_p): New.
5853         (delete_lwp): New.
5854         (handle_extended_wait): Use lwpid_of.
5855         (add_lwp): Don't set lwpid field.
5856         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
5857         (linux_kill_one_lwp): If killing a running lwp, stop it first.
5858         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
5859         (linux_detach_one_lwp): If detaching from a running lwp, stop it
5860         first.  Adjust to linux_wait_for_event interface changes.  Use
5861         lwpid_of.
5862         (linux_detach): Don't delete the main lwp here.
5863         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
5864         (status_pending_p): Don't consider explicitly suspended lwps.
5865         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5866         pointer.  Add OPTIONS argument.  Change return type to int.  Use
5867         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
5868         (linux_wait_for_event): Take an integer pid instead of a lwp_info
5869         pointer.  Add status pointer argument.  Return a pid instead of a
5870         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
5871         changes.  In non-stop mode, don't switch to a random thread.
5872         (linux_wait): Rename to...
5873         (linux_wait_1): ... this.  Add target_options argument, and handle
5874         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
5875         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
5876         clean exit and signal exit code.  Don't stop all threads in
5877         non-stop mode.  In all-stop mode, only stop all threads when
5878         reporting a stop to GDB.  Handle explicit thread stop requests.
5879         (async_file_flush, async_file_mark): New.
5880         (linux_wait): New.
5881         (send_sigstop): Use lwpid_of.
5882         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
5883         interface changes.  In non-stop mode, don't switch to a random
5884         thread.
5885         (linux_resume_one_lwp): Use lwpid_of.
5886         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5887         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
5888         non-stop mode, don't look for pending flag in all threads.
5889         (resume_status_pending_p): Don't consider explicitly suspended
5890         threads.
5891         (my_waitpid): Reimplement.  Emulate __WALL.
5892         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5893         Use lwpid_of.
5894         (sigchld_handler, linux_supports_non_stop, linux_async)
5895         (linux_start_non_stop): New.
5896         (linux_target_ops): Register linux_supports_non_stop, linux_async
5897         and linux_start_non_stop.
5898         (initialize_low): Install SIGCHLD handler.
5899         * thread-db.c (thread_db_create_event, find_one_thread)
5900         (thread_db_get_tls_address): Use lwpid_of.
5901         * win32-low.c (win32_detach): Adjust to use resume_kind.
5902         (win32_wait): Add `options' argument.
5903         * spu-low.c (spu_resume): Adjust to use resume_kind.
5904         (spu_wait): Add `options' argument.
5905
5906 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5907
5908         Decouple target code from remote protocol.
5909
5910         * target.h (enum target_waitkind): New.
5911         (struct target_waitstatus): New.
5912         (struct target_ops) <wait>: Return an unsigned long.  Take a
5913         target_waitstatus pointer instead of a char pointer.
5914         (mywait): Likewise.
5915         * target.c (mywait): Change prototype to return an unsigned long.
5916         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
5917         * server.h (thread_from_wait, old_thread_from_wait): Delete
5918         declarations.
5919         (prepare_resume_reply): Change prototype to take a
5920         target_waitstatus.
5921         * server.c (thread_from_wait, old_thread_from_wait): Delete.
5922         (last_status, last_ptid): New.
5923         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
5924         pid instead of a signal.
5925         (attach_inferior): Remove "status" and "signal" parameters.
5926         Adjust.
5927         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5928         not as an address.
5929         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5930         (handle_v_requests, myresume): Remove "status" and "signal"
5931         parameters.  Adjust.
5932         (handle_status): New.
5933         (main): Delete local `status'.  Adjust.
5934         * remote-utils.c: Include target.h.
5935         (prepare_resume_reply): Change prototype to take a
5936         target_waitstatus.  Adjust.
5937
5938         * linux-low.c (linux_wait): Adjust to new target_ops->wait
5939         interface.
5940         * spu-low.c (spu_wait): Adjust.
5941         * win32-low.c (enum target_waitkind, struct target_waitstatus):
5942         Delete.
5943         (win32_wait): Adjust.
5944
5945 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5946
5947         * target.h (struct thread_resume): Delete leave_stopped member.
5948         (struct target_ops): Add a `n' argument to the `resume' callback.
5949         * server.c (start_inferior): Adjust.
5950         (handle_v_cont, myresume): Adjust.
5951         * linux-low.c (check_removed_breakpoint): Adjust to resume
5952         interface change, and to removed leave_stopped field.
5953         (resume_ptr): Delete.
5954         (struct thread_resume_array): New.
5955         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
5956         resume interface change.
5957         (linux_continue_one_thread, linux_queue_one_thread)
5958         (resume_status_pending_p): Check if the resume field is NULL
5959         instead of checking the leave_stopped member.
5960         (linux_resume): Adjust to the target resume interface change.
5961         * spu-low.c (spu_resume): Adjust to the target resume interface
5962         change.
5963         * win32-low.c (win32_detach, win32_resume): Ditto.
5964
5965 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
5966
5967         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5968         flag.
5969         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5970         pending.
5971         (linux_continue_one_thread): Only preserve the stepping flag if
5972         there's a pending breakpoint.
5973
5974 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
5975
5976         * server.c (main): After the inferior having exited, call
5977         remote_close before exiting gdbserver.
5978
5979 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
5980
5981         Fix size of FPSCR in Power 7 processors.
5982         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5983         (PPC_FEATURE_HAS_DFP): New #define.
5984         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5985         size of the FPSCR.
5986
5987 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
5988
5989         * server.c (handle_query) Whitespace and formatting.
5990
5991 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
5992
5993         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5994         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5995         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5996         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5997         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5998         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5999         Makefile.in, configure.ac: Fix whitespace throughout.
6000         * configure: Regenerate.
6001
6002 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
6003
6004         * inferiors.c (find_inferior): Make it safe for the callback
6005         function to delete the currently iterated inferior.
6006
6007 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
6008
6009         * Makefile.in (linuw_low_h): Move higher.
6010         (thread-db.o): Depend on $(linux_low_h).
6011
6012 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
6013
6014         Rename "process" to "lwp" throughout.
6015
6016         * linux-low.c (all_processes): Rename to...
6017         (all_lwps): ... this.
6018         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6019         (add_process): Rename to ...
6020         (add_lwp): ... this.  Adjust.
6021         (linux_create_inferior): Adjust.
6022         (linux_attach_lwp): Adjust.
6023         (linux_attach): Adjust.
6024         (linux_kill_one_process): Rename to ...
6025         (linux_kill_one_lwp): ... this.  Adjust.
6026         (linux_kill): Adjust.
6027         (linux_detach_one_process): Rename to ...
6028         (linux_detach_one_lwp): ... this.  Adjust.
6029         (linux_detach): Adjust.
6030         (check_removed_breakpoint): Adjust.
6031         (status_pending_p): Adjust.
6032         (linux_wait_for_process): Rename to ...
6033         (linux_wait_for_lwp): ... this.  Adjust.
6034         (linux_wait_for_event): Adjust.
6035         (send_sigstop): Adjust.
6036         (wait_for_sigstop): Adjust.
6037         (stop_all_processes): Rename to ...
6038         (stop_all_lwps): ... this.
6039         (linux_resume_one_process): Rename to ...
6040         (linux_resume_one_lwp): ... this.  Adjust.
6041         (linux_set_resume_request, linux_continue_one_thread)
6042         (linux_queue_one_thread, resume_status_pending_p)
6043         (usr_store_inferior_registers, regsets_store_inferior_registers)
6044         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6045         Adjust.
6046         * linux-low.h (get_process): Rename to ...
6047         (get_lwp): ... this.  Adjust.
6048         (get_thread_process): Rename to ...
6049         (get_thread_lwp): ... this.  Adjust.
6050         (get_process_thread): Rename to ...
6051         (get_lwp_thread): ... this.  Adjust.
6052         (struct process_info): Rename to ...
6053         (struct lwp_info): ... this.
6054         (all_processes): Rename to ...
6055         (all_lwps): ... this.
6056         * proc-service.c (ps_lgetregs): Adjust.
6057         * thread-db.c (thread_db_create_event, find_one_thread)
6058         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6059
6060 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
6061
6062         * server.c (handle_query): Handle "qAttached".
6063
6064 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
6065
6066         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6067         GPLv3, update license URL.
6068
6069 2009-03-01  Doug Evans  <dje@google.com>
6070
6071         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6072         (server_h): Add gdb_signals.h.
6073         (signals.o): Update.
6074         * server.h (target_signal_from_host,target_signal_to_host_p)
6075         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6076
6077 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
6078
6079         * remote-utils.c (getpkt): Also generate remote-debug
6080         information if noack_mode is set.
6081
6082 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6083
6084         * server.c (handle_query): Report qXfer:siginfo:read and
6085         qXfer:siginfo:write as supported and handle them.
6086         * target.h (struct target_ops) <qxfer_siginfo>: New field.
6087         * linux-low.c (linux_xfer_siginfo): New.
6088         (linux_target_ops): Set it.
6089
6090 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
6091
6092         * server.c (gdbserver_usage): Mention --remote-debug.
6093         (main): Accept '--remote-debug' switch.
6094
6095 2009-01-18  Doug Evans  <dje@google.com>
6096
6097         * regcache.c (new_register_cache): No need to check result of xcalloc.
6098         * server.c (handle_search_memory): Back out calls to xmalloc,
6099         result is checked and error is returned to user upon failure.
6100         (handle_query): Ditto.  Add more checks for result of malloc.
6101         (handle_v_cont): Check result of malloc, report error back to
6102         user upon failure.
6103         (handle_v_run): Ditto.  Call freeargv.
6104         * server.h (freeargv): Declare.
6105         * utils.c (freeargv): New fn.
6106
6107 2009-01-15  Doug Evans  <dje@google.com>
6108
6109         * gdbreplay.c (perror_with_name): Make arg const char *.
6110         * server.h (target_signal_to_name): Make return type const char *.
6111         * thread-db.c (thread_db_err_str): Make return type const char *.
6112         * utils.c (perror_with_name): Make arg const char *.
6113
6114 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
6115
6116         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6117         when handling a EXIT_PROCESS_DEBUG_EVENT.
6118
6119 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
6120
6121         * gdbreplay.c (gdbreplay_version): Update copyright year.
6122         * server.c (gdbserver_version): Likewise.
6123
6124 2009-01-05  Doug Evans  <dje@google.com>
6125
6126         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6127         (handle_extended_wait): Improve comment.
6128
6129 2008-12-13  Doug Evans  <dje@google.com>
6130
6131         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6132         * server.h (ATTR_MALLOC): New macro.
6133         (xmalloc,xcalloc,xstrdup): Declare.
6134         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6135         * inferiors.c: Ditto.
6136         * linux-low.c: Ditto.
6137         * mem-break.c: Ditto.
6138         * regcache.c: Ditto.
6139         * remote-utils.c: Ditto.
6140         * server.c: Ditto.
6141         * target.c: Ditto.
6142         * win32-low.c: Ditto.
6143
6144 2008-12-12  Doug Evans  <dje@google.com>
6145
6146         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6147         in debugging printf.
6148
6149         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6150
6151 2008-12-09  Doug Evans  <dje@google.com>
6152
6153         * linux-low.h (struct process_info): Delete member tid, unused.
6154         * thread-db.c (find_one_thread): Update.
6155         (maybe_attach_thread): Update.
6156
6157 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
6158
6159         * target.h (struct target_ops): Add qxfer_osdata member.
6160         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6161         and dirent.h.
6162         (linux_qxfer_osdata): New functions.
6163         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6164         callback.
6165         * server.c (handle_query): Handle "qXfer:osdata:read:".
6166         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6167         (buffer_xml_printf): New functions.
6168         * server.h (struct buffer): New.
6169         (buffer_grow_str, buffer_grow_str0): New macros.
6170         (buffer_grow, buffer_free, buffer_init, buffer_finish)
6171         (buffer_xml_printf): Declare.
6172
6173 2008-11-24  Doug Evans  <dje@google.com>
6174
6175         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6176
6177 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
6178
6179         * server.c (handle_v_run): Always use the supplied argument list.
6180
6181 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
6182
6183         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6184         (xtensa_regmap_table): Add entry for scompare1.
6185
6186 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6187
6188         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6189         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6190         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6191         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6192         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6193         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6194         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6195         XML target descriptions.
6196         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6197         when inferior is running on an ISA 2.05 or later processor.  Add
6198         special case to return offset for full 64-bit slot of FPSCR when
6199         in 32-bits.
6200
6201 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
6202
6203         * Makefile.in (SFILES, clean): Added sparc64 files.
6204         (reg-sparc64.o, reg-sparc64.c): New.
6205         * configure.srv (sparc*-*-linux*): New configuration.
6206         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6207         syscall arguments for SPARC.
6208         (regsets_store_inferior_registers): Likewise.
6209         * linux-sparc-low.c: New file.
6210
6211 2008-10-21  Doug Evans  <dje@google.com>
6212
6213         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6214         (READLINE_DIR,READLINE_DEP): Delete.
6215         (INTERNAL_CFLAGS): Update.
6216         (LINTFLAGS): Update.
6217
6218 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
6219
6220         * server.c (handle_v_run): If GDB didn't specify an argv, use the
6221         whole argv from the last run, not just argv[0].
6222
6223 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
6224
6225         * regcache.c (new_register_cache): Return NULL if the register
6226         cache size isn't known yet.
6227         (free_register_cache): Avoid dereferencing a NULL regcache.
6228
6229 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
6230
6231         * configure.srv: Merge MIPS and MIPS64.
6232
6233 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
6234
6235         * Makefile.in (uninstall): Apply $(EXEEXT) too.
6236
6237 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
6238
6239         * Makefile.in: Add required vsx dependencies.
6240
6241         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6242         Declare init_registers_powerpc_vsx32l.
6243         Declare init_registers_powerpc_vsx64l.
6244         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6245         (ppc_arch_setup): Check for VSX in hwcap.
6246         (ppc_fill_vsxregset): New function.
6247         (ppc_store_vsxregset): New function.
6248         Add new VSX entry in regset_info target_regsets.
6249
6250         * configure.srv: Add new VSX dependencies.
6251
6252 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
6253
6254         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6255         (remote_open): Set or clear transport_is_reliable.
6256         (putpkt_binary): Don't expect acks in noack mode.
6257         (getpkt): Don't send ack/nac in noack mode.
6258         * server.c (handle_general_set): Handle QStartNoAckMode.
6259         (handle_query): If connected by tcp pass QStartNoAckMode+ in
6260         qSupported.
6261         (main): Reset noack_mode on every connection.
6262         * server.h (noack_mode): Declare.
6263
6264 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6265
6266         * Makefile.in (GDBREPLAY_OBS): New variable.
6267         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6268
6269 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
6270             Daniel Jacobowitz  <dan@codesourcery.com>
6271
6272         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6273         (usr_store_inferior_registers): Likewise.
6274         (regsets_store_inferior_registers): Likewise.
6275
6276 2008-07-31  Rolf Jansen  <rj@surtec.com>
6277             Pedro Alves  <pedro@codesourcery.com>
6278
6279         * configure.ac: Check for memmem declaration.
6280         * server.c [HAVE_MALLOC_H]: Include malloc.h.
6281         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6282         (disable_packet_qfThreadInfo): Unconditionally compile.
6283         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6284         * configure, config.in: Regenerate.
6285
6286 2008-07-28  Doug Kwan  <dougkwan@google.com>
6287
6288         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6289         (linux_write_memory): Remove declaration of errno.
6290
6291 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
6292
6293         * linux-low.c (handle_extended_wait): Do not use "status"
6294         variable uninitialized.
6295
6296 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
6297
6298         * server.c (handle_v_attach): Inhibit reporting dll changes.
6299
6300 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
6301
6302         * remote-utils.c (prepare_resume_reply): If requested, don't
6303         output "thread:TID" in the T stop reply.
6304
6305         * server.c (disable_packet_vCont, disable_packet_Tthread)
6306         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6307         (handle_query): If requested, disable support for qC, qfThreadInfo
6308         and qsThreadInfo.
6309         (handle_v_requests): If requested, disable support for vCont.
6310         (gdbserver_show_disableable): New.
6311         (main): Handle --disable-packet and --disable-packet=LIST.
6312
6313         * server.h (disable_packet_vCont, disable_packet_Tthread)
6314         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6315
6316 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
6317
6318         * server.c (gdbserver_usage): Mention --version.
6319
6320 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
6321
6322         * Makefile.in (gdbreplay.o): New rule.
6323
6324 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
6325
6326         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6327         message, not gdbserver.
6328
6329 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
6330             Nathan Sidwell  <nathan@codesourcery.com>
6331             Joseph Myers  <joseph@codesourcery.com>
6332
6333         * acinclude.m4: Include ../../config/acx.m4.
6334         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6335         * configure, config.in: Regenerate.
6336         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6337         * server.c (gdbserver_version): Print PKGVERSION.
6338         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
6339         (main): Adjust gdbserver_usage calls.
6340         * gdbreplay.c (version, host_name): Add declarations.
6341         (gdbreplay_version, gdbreplay_usage): New.
6342         (main): Accept --version and --help options.
6343
6344 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
6345
6346         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6347         (arm_breakpoint_at): Handle Thumb.
6348         (the_low_target): Add comment.
6349
6350 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
6351
6352         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6353
6354 2008-05-09  Doug Evans  <dje@google.com>
6355
6356         * server.h (decode_search_memory_packet): Declare.
6357         * remote-utils.c (decode_search_memory_packet): New fn.
6358         * server.c (handle_search_memory_1): New fn.
6359         (handle_search_memory): New fn.
6360         (handle_query): Process qSearch:memory packets.
6361
6362 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6363
6364         * regcache.c (registers_length): Remove.
6365         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6366         full register packet.
6367         * regcache.h (registers_length): Remove prototype.
6368         * server.h (PBUFSIZ): Define to 16384.
6369
6370 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
6371
6372         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6373         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6374         powerpc-64l.o, and powerpc-altivec64l.o.
6375         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6376         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6377         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6378         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6379         rs6000/power-linux.xml, and rs6000/power64-linux.xml
6380         to srv_xmlfiles.
6381
6382         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6383         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6384         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6385         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6386         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6387         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6388         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6389         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6390         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6391         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6392         (clean): Update.
6393
6394         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6395         (init_registers_powerpc_32l): ... this new prototype.
6396         (init_registers_powerpc_32): Remove, replace by ...
6397         (init_registers_powerpc_altivec32l): ... this new prototype.
6398         (init_registers_powerpc_e500): Remove, replace by ...
6399         (init_registers_powerpc_e500l): ... this new prototype.
6400         (init_registers_ppc64): Remove, replace by ...
6401         (init_registers_powerpc_64l): ... this new prototype.
6402         (init_registers_powerpc_64): Remove, replace by ...
6403         (init_registers_powerpc_altivec64l): ... this new prototype.
6404         (ppc_num_regs): Set to 73.
6405         (PT_ORIG_R3, PT_TRAP): Define if necessary.
6406         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6407         (ppc_cannot_store_register): Handle orig_r3 and trap.
6408         (ppc_arch_setup): Update init_registers_... calls.
6409         (ppc_fill_gregset): Handle orig_r3 and trap.
6410
6411         * inferiors.c (clear_inferiors): Reset current_inferior.
6412
6413 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
6414
6415         * acinclude.m4: Add override.m4.
6416         * configure: Regenerate.
6417
6418 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
6419
6420         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6421         initial call to init_register_ppc64.
6422
6423 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
6424
6425         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6426         single powerpc*-*-linux* case.
6427         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6428
6429 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
6430
6431         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6432         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6433         from reg_xmlfiles.
6434         * linux-ppc-low.c: Include <elf.h>.
6435         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6436         (ppc_hwcap): New global variable.
6437         (ppc_regmap): Remove __SPE__ #ifdef sections.
6438         (ppc_regmap_e500): New global variable.
6439         (ppc_cannot_store_register): Update __SPE__ special case.
6440         (ppc_get_hwcap): New function.
6441         (ppc_arch_setup): Use it to determine whether inferior supports
6442         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
6443         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6444         Do not access registers if target does not support AltiVec.
6445         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6446         Do not access registers if target does not support SPE.
6447         (target_regsets): Unconditionally include AltiVec and SPE regsets.
6448
6449 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
6450
6451         * linux-low.c (disabled_regsets, num_regsets): New.
6452         (use_regsets_p): Delete.
6453         (linux_wait_for_process): Clear disabled_regsets.
6454         (regsets_fetch_inferior_registers): Check and set it.
6455         (regsets_store_inferior_registers): Likewise.
6456         (linux_fetch_registers, linux_store_registers): Do not use
6457         use_regsets_p.
6458         (initialize_low): Allocate disabled_regsets.
6459
6460 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
6461
6462         * Makefile.in (LIBOBJS): New.
6463         (OBS): Use LIBOBJS.
6464         (memmem.o): New rule.
6465         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6466         * configure: Regenerated.
6467
6468 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
6469
6470         * server.c (handle_query): Never return "unsupported" for
6471         qXfer:features:read queries.
6472
6473 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
6474
6475         * server.c (get_features_xml): Fix inverted condition.
6476         (handle_query): Always support qXfer:feature:read.
6477
6478 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
6479
6480         * server.c (wrapper_argv): New.
6481         (start_inferior): Handle wrapper_argv.  If set, expect an extra
6482         trap.
6483         (gdbserver_usage): Document --wrapper.
6484         (main): Parse --wrapper.
6485
6486 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6487
6488         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6489         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6490         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6491         (ppc_set_pc): Likewise.
6492         (ppc_arch_setup): New function.
6493         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6494         of collect_register.
6495         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6496
6497 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6498
6499         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6500         instead of linux-ppc64-low.o.
6501         * linux-ppc64-low.c: Remove file.
6502         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6503         (linux-ppc64-low.o): Remove rule.
6504
6505         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6506         (init_registers_powerpc_64): Likewise.
6507         (ppc_regmap): Conditionally define depending on __powerpc64__.
6508         (ppc_cannot_store_register): Do not special-case "fpscr" when
6509         compiled on __powerpc64__.
6510         (ppc_collect_ptrace_register): New function.
6511         (ppc_supply_ptrace_register): New function.
6512         (ppc_breakpoint): Change type to "unsigned int".
6513         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6514         (the_low_target): Conditionally provide initializers for the
6515         arch_setup member depending on __powerpc64__.  Install
6516         collect_ptrace_register and supply_ptrace_register members.
6517
6518 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6519
6520         * regcache.h (gdbserver_xmltarget): Add extern declaration.
6521         * server.c (gdbserver_xmltarget): Define.
6522         (get_features_xml): Use it to replace "target.xml" and arch_string.
6523
6524         * configure.srv: Remove srv_xmltarget.  Add XML files that were
6525         mentioned there to srv_xmlfiles instead.  Remove conditional tests
6526         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6527         srv_xmlfiles and srv_regobj to include all possible choices.
6528         * configure.ac (srv_xmltarget): Remove.
6529         (srv_xmlfiles): Do not add "target.xml".
6530         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6531         checks for supplementary target information.
6532         * configure: Regenerate.
6533         * Makefile.in (XML_TARGET): Remove.
6534         (target.xml): Remove rule.
6535         (clean): Do not clean up target.xml.
6536         (.PRECIOUS): Do not mention target.xml.
6537
6538         * target.h (struct target_ops): Remove arch_string member.
6539         * linux-low.c (linux_arch_string): Remove.
6540         (linux_target_ops): Remove arch_string initializer.
6541         * linux-low.h (struct linux_target_ops): Remove arch_string member.
6542         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6543         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6544         * spu-low.c (spu_arch_string): Remove.
6545         (spu_target_ops): Remove arch_string initializer.
6546         * win32-low.c (win32_arch_string): Remove.
6547         (win32_target_ops): Remove arch_string initializer.
6548         * win32-low.h (struct win32_target_ops): Remove arch_string member.
6549         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6550         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6551
6552 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6553
6554         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6555         by collect_ptrace_register and supply_ptrace_register hooks.
6556         * linux-low.c (fetch_register): Use supply_ptrace_register callback
6557         instead of checking for the_low_target.left_pad_xfer.
6558         (usr_store_inferior_registers): Use collect_ptrace_register callback
6559         instead of checking for the_low_target.left_pad_xfer.
6560
6561         * linux-s390-low.c (s390_collect_ptrace_register): New function.
6562         (s390_supply_ptrace_register): Likewise.
6563         (s390_fill_gregset): Call s390_collect_ptrace_register.
6564         (the_low_target): Update.
6565
6566         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6567         (ppc_supply_ptrace_register): Likewise.
6568         (the_low_target): Update.
6569
6570         * linux-i386-low.c (the_low_target): Update.
6571         * linux-x86-64-low.c (the_low_target): Update.
6572
6573 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6574
6575         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6576         reg-s390.o and reg-s390x.o.
6577
6578         * linux-low.c (new_inferior): New global variable.
6579         (linux_create_inferior, linux_attach): Set it.
6580         (linux_wait_for_process): Call the_low_target.arch_setup after the
6581         target has stopped for the first time.
6582         (initialize_low): Do not call the_low_target.arch_setup.
6583
6584         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6585         (s390_set_pc): Likewise.
6586         (s390_arch_setup): New function.
6587         (the_low_target): Use s390_arch_setup as arch_setup routine.
6588
6589         * regcache.c (realloc_register_cache): New function.
6590         (set_register_cache): Call it for each existing regcache.
6591
6592 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6593
6594         * server.h (init_registers): Remove prototype.
6595
6596         * linux-low.h (struct linux_target_ops): Add arch_setup field.
6597         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6598         instead of init_registers ().
6599         * linux-arm-low.c (init_registers_arm): Add prototype.
6600         (init_registers_arm_with_iwmmxt): Likewise.
6601         (the_low_target): Add initializer for arch_setup field.
6602         * linux-cris-low.c (init_registers_cris): Add prototype.
6603         (the_low_target): Add initializer for arch_setup field.
6604         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6605         (the_low_target): Add initializer for arch_setup field.
6606         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6607         (the_low_target): Add initializer for arch_setup field.
6608         * linux-ia64-low.c (init_registers_ia64): Add prototype.
6609         (the_low_target): Add initializer for arch_setup field.
6610         * linux-m32r-low.c (init_registers_m32r): Add prototype.
6611         (the_low_target): Add initializer for arch_setup field.
6612         * linux-m68k-low.c (init_registers_m68k): Add prototype.
6613         (the_low_target): Add initializer for arch_setup field.
6614         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6615         (init_registers_mips64_linux): Likewise.
6616         (the_low_target): Add initializer for arch_setup field.
6617         * linux-ppc-low.c (init_registers_ppc): Add prototype.
6618         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6619         (the_low_target): Add initializer for arch_setup field.
6620         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6621         (init_registers_powerpc_64): Likewise.
6622         (the_low_target): Add initializer for arch_setup field.
6623         * linux-s390-low.c (init_registers_s390): Add prototype.
6624         (init_registers_s390x): Likewise.
6625         (the_low_target): Add initializer for arch_setup field.
6626         * linux-sh-low.c (init_registers_sh): Add prototype.
6627         (the_low_target): Add initializer for arch_setup field.
6628         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6629         (the_low_target): Add initializer for arch_setup field.
6630         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6631         (the_low_target): Add initializer for arch_setup field.
6632
6633         * win32-low.h (struct win32_target_ops): Add arch_setup field.
6634         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6635         instead of init_registers ().
6636         * win32-arm-low.c (init_registers_arm): Add prototype.
6637         (the_low_target): Add initializer for arch_setup field.
6638         * win32-i386-low.c (init_registers_i386): Add prototype.
6639         (the_low_target): Add initializer for arch_setup field.
6640
6641         * spu-low.c (init_registers_spu): Add prototype.
6642         (initialize_low): Call initialie_registers_spu () instead of
6643         initialize_registers ().
6644
6645 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
6646
6647         * server.c (handle_v_requests): When handling the vRun and vAttach
6648         packets, if already debugging a process, don't kill it.  Return an
6649         error instead.
6650
6651 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
6652
6653         * server.c (handle_query): Correct length check.
6654
6655 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
6656
6657         * win32-low.c (do_initial_child_stuff): Add process handle
6658         parameter.  Set current_process_handle and current_process_id from the
6659         parameters. Clear globals.
6660         (win32_create_inferior): Don't set current_process_handle and
6661         current_process_id here.  Instead pass them on the call to
6662         do_initial_child_stuff.
6663         (win32_attach): Likewise.
6664         (win32_clear_inferiors): New.
6665         (win32_kill): Don't close the current process handle or the
6666         current thread handle here.  Instead call win32_clear_inferiors.
6667         (win32_detach): Don't open a new handle to the process.  Call
6668         win32_clear_inferiors.
6669         (win32_join): Don't rely on current_process_handle; open a new
6670         handle using the process id.
6671         (win32_wait): Call win32_clear_inferiors when the inferior process
6672         has exited.
6673
6674 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
6675
6676         * server.c (monitor_show_help): Add "exit".
6677
6678 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
6679
6680         * Makefile.in (SFILES): Add linux-xtensa-low.c.
6681         (clean): Add reg-xtensa.c.
6682         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6683         * configure.srv (xtensa*-*-linux*) New target.
6684         * linux-xtensa-low.c: New.
6685         * xtensa-xtregs.c: New.
6686
6687 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
6688
6689         * hostio.c: Don't include errno.h.
6690         (errno_to_fileio_errno): Move to hostio-errno.
6691         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
6692         error number outputting to the target->hostio_last_error callback.
6693         (hostio_packet_error): Use FILEIO_EINVAL directly.
6694         (handle_open, handle_pread, hostio_error, handle_unlink): Update
6695         calls to hostio_error.
6696         * hostio-errno.c: New.
6697         * server.h (hostio_last_error_from_errno): Declare.
6698         * target.h (target_ops): Add hostio_last_error member.
6699         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6700         as hostio_last_error handler.
6701         * spu-low.c (spu_target_ops): Likewise.
6702         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6703         (wince_hostio_last_error): New functions.
6704         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6705         as hostio_last_error handler.
6706         (win32_target_ops) [!_WIN32_WCE]: Register
6707         hostio_last_error_from_errno as hostio_last_error handler.
6708         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6709         (hostio-errno.o): New rule.
6710         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6711         * configure.srv (srv_hostio_err_objs): New variable.  Default to
6712         hostio-errno.o.
6713         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6714         * configure: Regenerate.
6715
6716 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
6717
6718         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6719         (linux_kill, linux_detach): Clean up the process list.
6720         * remote-utils.c (remote_open): Improve port number parsing.
6721         (putpkt_binary, input_interrupt): Only send interrupts if the target
6722         is running.
6723         * server.c (extended_protocol): Make static.
6724         (attached): Define earlier.
6725         (exit_requested, response_needed, program_argv): New variables.
6726         (target_running): New.
6727         (start_inferior): Clear attached here.
6728         (attach_inferior): Set attached here.
6729         (require_running): Define.
6730         (handle_query): Use require_running and target_running.  Implement
6731         "monitor exit".
6732         (handle_v_attach, handle_v_run): New.
6733         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
6734         (gdbserver_usage): Update.
6735         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
6736         --attach along with other options or after the port.  Save
6737         program_argv.  Support no initial program.  Resynchronize
6738         communication with GDB after an error.  Handle "monitor exit".
6739         Use require_running and target_running.  Always allow the extended
6740         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
6741         restart in extended mode.
6742         * README: Refer to the GDB manual.  Update --attach usage.
6743
6744 2007-12-20  Andreas Schwab  <schwab@suse.de>
6745
6746         * linux-low.c (STACK_SIZE): Define.
6747         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
6748         (linux_test_for_tracefork): Likewise.
6749
6750 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
6751
6752         * linux-low.c (linux_wait_for_event): Update messages.  Do not
6753         reinsert auto-delete breakpoints.
6754         * mem-break.c (struct breakpoint): Change return type of handler to
6755         int.
6756         (set_breakpoint_at): Update handler type.
6757         (reinsert_breakpoint_handler): Return 1 instead of calling
6758         delete_breakpoint.
6759         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6760         setting a new one.
6761         (check_breakpoints): Delete auto-delete breakpoints and return 2.
6762         * mem-break.h (set_breakpoint_at): Update handler type.
6763         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6764         * win32-low.c (auto_delete_breakpoint): New.
6765         (get_child_debug_event): Use it.
6766
6767 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
6768
6769         * configure.ac: Check for pread and pwrite.
6770         * hostio.c (handle_pread): Fall back to lseek and read.
6771         (handle_pwrite): Fall back to lseek and write.
6772         * config.in, configure: Regenerated.
6773
6774 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
6775
6776         * server.c (myresume): Add own_buf argument.
6777         (main): Update calls.
6778
6779 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
6780
6781         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6782         * remote-utils.c (remote_open): Do not call disable_async_io.
6783         (block_async_io): Delete.
6784         (unblock_async_io): Make static.
6785         (initialize_async_io): New.
6786         * server.c (handle_v_cont): Handle async I/O here.
6787         (myresume): Likewise.  Move other common resume tasks here...
6788         (main): ... from here.  Call initialize_async_io.  Disable async
6789         I/O before the main loop.
6790         * server.h (initialize_async_io): Declare.
6791         (block_async_io, unblock_async_io): Delete prototypes.
6792         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6793
6794 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
6795
6796         * remote-utils.c (readchar): Allow binary data in received messages.
6797
6798 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6799
6800         * win32-low.c (attaching): New global.
6801         (win32_create_inferior): Clear the `attaching' global.
6802         (win32_attach): Set the `attaching' global.
6803         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6804         attaching.  Only set a breakpoint at the entry point if not
6805         attaching.
6806
6807 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6808
6809         * server.c (main): Don't report dll events on the initial
6810         connection on attaches.
6811
6812 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6813
6814         * server.c (main): Relax numerical bases supported for the pid of
6815         the --attach command line argument.
6816
6817 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6818
6819         * win32-low.c (win32_attach): Call OpenProcess before
6820         DebugActiveProcess, not after.  Add last error output to error
6821         call.
6822
6823 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6824
6825         * win32-low.c (win32_get_thread_context)
6826         (win32_set_thread_context): New functions.
6827         (thread_rec): Use win32_get_thread_context.
6828         (continue_one_thread, win32_resume): Use win32_set_thread_context.
6829         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6830         field.
6831
6832 2007-12-03  Leo Zayas
6833             Pedro Alves  <pedro_alves@portugalmail.pt>
6834
6835         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6836         global variables.
6837         (child_add_thread): Minor cleanup.
6838         (child_continue): Resume artificially suspended threads before
6839         calling ContinueDebugEvent.
6840         (suspend_one_thread): New.
6841         (fake_breakpoint_event): New.
6842         (get_child_debug_event): Change return type to int.  Check here if
6843         gdb sent an interrupt request.  If a soft interrupt was requested,
6844         fake a breakpoint event.  Return 0 if there is no event to handle,
6845         and 1 otherwise.
6846         (win32_wait): Don't check here if gdb sent an interrupt request.
6847         Ensure there is a valid event to handle.
6848         (win32_request_interrupt): Add soft interruption method as last
6849         resort.
6850
6851 2007-12-03  Leo Zayas
6852             Pedro Alves  <pedro_alves@portugalmail.pt>
6853
6854         * win32-low.h (win32_thread_info): Add descriptions to the
6855         structure members.  Replace `suspend_count' counter by a
6856         `suspended' flag.
6857         * win32-low.c (thread_rec): Update condition of when to get the
6858         context from the inferior.  Rely on ContextFlags being set if it
6859         has already been retrieved.  Only suspend the inferior thread if
6860         we haven't already.  Warn if that fails.
6861         (continue_one_thread): s/suspend_count/suspended/.  Only call
6862         ResumeThread once.  Warn if that fails.
6863
6864 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
6865
6866         * win32-low.c (win32_wait): Don't read from the inferior when it
6867         has already exited.
6868
6869 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
6870
6871         * Makefile.in (win32_low_h): New variable.
6872         (win32-low.o): Add dependency on $(win32_low_h).
6873         (win32-arm-low.o, win32-i386-low.o): New rules.
6874
6875 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
6876
6877         * hostio.c: Correct copyright year.
6878
6879 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
6880
6881         * Makefile.in (OBS): Add hostio.o.
6882         (hostio.o): New rule.
6883         * server.h (handle_vFile): Declare.
6884         * hostio.c: New file.
6885         * server.c (handle_v_requests): Take packet_len and new_packet_len
6886         for binary packets.  Call handle_vFile.
6887         (main): Update call to handle_v_requests.
6888
6889 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
6890
6891         * linux-low.c: Include <sched.h>.
6892
6893 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
6894
6895         * linux-low.c (linux_tracefork_grandchild): New.
6896         (linux_tracefork_child): Use clone.
6897         (linux_test_for_tracefork): Use clone; allocate and free a stack.
6898
6899 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
6900
6901         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6902
6903 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
6904
6905         * linux-low.c (handle_extended_wait): Handle unexpected signals.
6906
6907 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
6908
6909         * inferiors.c (change_inferior_id): Delete.
6910         (add_pid_to_list, pull_pid_from_list): New.
6911         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6912         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6913         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6914         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6915         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6916         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6917         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6918         (using_threads): Always set to 1.
6919         (handle_extended_wait): New.
6920         (add_process): Do not set TID.
6921         (linux_create_inferior): Set must_set_ptrace_flags.
6922         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
6923         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
6924         (linux_thread_alive): Rename TID argument to LWPID.
6925         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
6926         (linux_wait_for_event): Do not use TID or check using_threads.  Update
6927         call to dead_thread_notify.  Call handle_extended_wait.
6928         (linux_create_inferior): Use PTRACE_SETOPTIONS.
6929         (send_sigstop): Delete sigstop_sent.
6930         (wait_for_sigstop): Avoid TID.
6931         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6932         (linux_test_for_tracefork): New.
6933         (linux_lookup_signals): Use thread_db_active and
6934         linux_supports_tracefork_flag.
6935         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6936         * linux-low.h (get_process_thread): Avoid TID.
6937         (struct process_ifo): Move thread_known and tid to the end.  Remove
6938         sigstop_sent.
6939         (linux_attach_lwp, thread_db_init): Update prototypes.
6940         * server.h (change_inferior_id): Delete prototype.
6941         (add_pid_to_list, pull_pid_from_list): New prototypes.
6942         * thread-db.c (thread_db_use_events): New.
6943         (find_first_thread): Rename to...
6944         (find_one_thread): ...this.  Update callers and messages.  Do not
6945         call fatal.  Check thread_db_use_events.  Do not call
6946         change_inferior_id or new_thread_notify.
6947         (maybe_attach_thread): Update.  Do not call new_thread_notify.
6948         (thread_db_init): Set thread_db_use_events.  Check use_events.
6949         * utils.c (fatal, warning): Correct message prefix.
6950
6951 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
6952
6953         * Makefile.in (clean): Remove new files.
6954         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6955         (powerpc-64.o, powerpc-64.c): New rules.
6956         * configure.srv: Use alternate register sets for powerpc64-*-linux*
6957         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6958         with SPE.
6959         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6960         SPE targets.
6961         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6962         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6963         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6964         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6965         (target_regsets): Add AltiVec and SPE register sets.
6966         * configure.ac: Check for AltiVec and SPE.
6967         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6968         (ppc_fill_vrregset, ppc_store_vrregset): New.
6969         (target_regsets): Add AltiVec register set.
6970         * configure: Regenerated.
6971
6972 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
6973
6974         * linux-low.c (O_LARGEFILE): Define.
6975         (linux_read_memory): Use /proc/PID/mem.
6976         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
6977         * configure, config.in: Regenerated.
6978
6979 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
6980
6981         * linux-low.c (linux_wait_for_event): Do not pass signals while
6982         single-stepping.
6983
6984 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6985
6986         * win32-low.c (create_process): New.
6987         (win32_create_inferior): Use create_process instead of
6988         CreateProcess.  If create_process failed retry appending an ".exe"
6989         suffix.  Store the GetLastError result immediatelly after
6990         create_process calls and use it on the call to error.
6991
6992 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
6993
6994         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6995
6996 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
6997
6998         * configure.ac: Switch license to GPLv3.
6999
7000 2007-08-01  Michael Snyder  <msnyder@access-company.com>
7001
7002         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7003
7004 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
7005
7006         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7007         typedef.
7008         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7009         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
7010         CloseToolhelp32Snapshot.
7011         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7012         CloseToolhelp32Snapshot.
7013
7014 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
7015
7016         * server.c (main): Check for inferior exit before main loop.
7017
7018 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
7019
7020         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7021         instead of on tmp_desc.
7022
7023 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
7024             Daniel Jacobowitz  <dan@codesourcery.com>
7025
7026         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7027         (add_thread): Minor cleanups.
7028         (clear_inferiors): Move lower in the file.  Clear the DLL
7029         list.
7030         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7031         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7032         (xml_escape_text): New.
7033         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
7034         for qSupported.
7035         (handle_v_cont): Report errors.
7036         (gdbserver_version): Update.
7037         (main): Correct size of own_buf.  Do not report initial DLL events.
7038         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7039         (unloaded_dll, xml_escape_text): New.
7040         * win32-low.c (enum target_waitkind): Update comments.
7041         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7042         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7043         (win32_EnumProcessModules, win32_GetModuleInformation)
7044         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7045         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7046         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7047         (win32_Module32First, win32_Module32Next, load_toolhelp)
7048         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7049         (get_child_debug_event): Handle DLL events.
7050         (win32_wait): Likewise.
7051
7052 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
7053
7054         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7055         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7056
7057 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
7058
7059         * win32-low.c (handle_output_debug_string): Ignore event if not
7060         waiting.
7061
7062 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
7063
7064         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7065
7066 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
7067
7068         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7069
7070 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
7071
7072         * inferiors.c (change_inferior_id): Add comment.
7073         * linux-low.c (check_removed_breakpoint): Add an early
7074         prototype.  Improve debug output.
7075         (linux_attach): Doc update.
7076         (linux_detach_one_process, linux_detach): Clean up before releasing
7077         each process.
7078         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7079         * linux-low.h (struct process_info): Doc improvement.
7080         * mem-break.c (delete_all_breakpoints): New.
7081         * mem-break.h (delete_all_breakpoints): New prototype.
7082         * thread-db.c (find_first_thread): New.
7083         (thread_db_create_event): Call it instead of
7084         thread_db_find_new_threads.  Clean up unused variables.
7085         (maybe_attach_thread): Remove first thread handling.
7086         (thread_db_find_new_threads): Use find_first_thread.
7087         (thread_db_get_tls_address): Likewise.
7088
7089 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
7090
7091         * thread-db.c (thread_db_find_new_threads): Add prototype.
7092         (thread_db_create_event): Check for the main thread before adding
7093         a new thread.
7094         (maybe_attach_thread): Only enable event reporting if TID == 0.
7095         (thread_db_get_tls_address): Check for new threads.
7096
7097 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
7098
7099         * linux-low.c (linux_create_inferior): Try execv before execvp.
7100         * spu-low.c (spu_create_inferior): Likewise.
7101
7102 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
7103
7104         * linux-low.c (linux_create_inferior): Change execv to execvp.
7105         * spu-low.c (spu_create_inferior): Likewies.
7106
7107 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
7108
7109         * Makefile.in (clean): Clean new files instead of deleted ones.
7110         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7111         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7112         rules.
7113         * configure.srv: Specify XML files and new regformats for MIPS and
7114         MIPS64 GNU/Linux.
7115         * linux-mips-low.c (mips_num_regs): Set to only used registers.
7116         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
7117         an entry for the restart register.
7118         (mips_cannot_fetch_register, mips_cannot_store_register)
7119         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7120         register names to match the XML descriptions.
7121         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
7122         restart register instead of $0.
7123
7124 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
7125             Markus Deuling  <deuling@de.ibm.com>
7126
7127         * remote-utils.c (decode_xfer_write): New function.
7128         * server.h (decode_xfer_write): Add prototype.
7129         * server.c (handle_query): Add PACKET_LEN argument.  Support
7130         qXfer:spu:read and qXfer:spu:write packets.
7131         (main): Pass packet_len to handle_query.
7132         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7133         * target.h (target_ops): Add qxfer_spu.
7134
7135 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
7136
7137         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7138         accessing non-seekable spufs files.
7139
7140 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
7141
7142         * server.c (handle_query): Add reply for qC packet.
7143
7144 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7145             Leo Zayas  <lerele@champenstudios@com>
7146
7147         * server.h (check_remote_input_interrupt_request): New function.
7148         * remote_utils.c (INVALID_DESCRIPTOR): New define.
7149         (remote_desc): Initialize with INVALID_DESCRIPTOR.
7150         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
7151         (check_remote_input_interrupt_request): New function.
7152         * server.h (check_remote_input_interrupt_request): Declare.
7153         * win32-low.c (winapi_DebugBreakProcess,
7154         winapi_GenerateConsoleCtrlEvent): New typedefs.
7155         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7156         to 250 ms.
7157         (win32_wait): Check for remote interrupt request
7158         with check_remote_input_interrupt_request.
7159         (win32_request_interrupt): New function.
7160         (win32_target_op): Set request_interrupt to win32_request_interrupt.
7161
7162 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7163
7164         * win32-low.c (debug_registers_changed,
7165         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7166         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7167         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7168         (thread_rec): Get context using the low target.
7169         (child_add_thread): Call thread_added on the low target,
7170         which does the same thing.
7171         (regptr): Delete.
7172         (do_initial_child_stuff): Remove debug registers references.
7173         Set context using the low target.  Resume threads after
7174         setting the contexts.
7175         (child_continue): Remove dead variable.  Remove debug
7176         registers references.
7177         (child_fetch_inferior_registers): Go through the low target.
7178         (do_child_store_inferior_registers): Remove.
7179         (child_store_inferior_registers): Go through the low target.
7180         (win32_resume): Remove debug registers references.
7181         Set context using the low target.
7182         (handle_exception): Change return type to void.  Don't record
7183         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
7184         first chance exception.
7185         (get_child_debug_event): Change return type to void.  Remove
7186         goto loop.  Always return after waiting for debug event.
7187         (win32_wait): Convert to switch statement.  Handle spurious
7188         events.
7189
7190         * win32-i386-low.c (debug_registers_changed,
7191         debug_registers_used): New.
7192         (initial_stuff): Rename to ...
7193         (i386_initial_stuff): ... this.  Clear debug registers
7194         state variables.
7195         (store_debug_registers): Delete.
7196         (i386_get_thread_context): New.
7197         (load_debug_registers): Delete.
7198         (i386_set_thread_context): New.
7199         (i386_thread_added): New.
7200         (single_step): Rename to ...
7201         (i386_single_step): ... this.
7202         (do_fetch_inferior_registers): Rename to ...
7203         (i386_fetch_inferior_register): ... this.
7204         (i386_store_inferior_register): New.
7205         (the_low_target): Adapt to new interface.
7206
7207         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7208         (arm_get_thread_context): New.
7209         (arm_set_thread_context): New.
7210         (regptr): New.
7211         (do_fetch_inferior_registers): Rename to ...
7212         (arm_fetch_inferior_register): ... this.
7213         (arm_store_inferior_register): New.
7214         (arm_wince_breakpoint): Reimplement as unsigned long.
7215         (arm_wince_breakpoint_len): Define.
7216         (the_low_target): Adapt to new interface.
7217
7218         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7219         load_debug_registers.  Add get_thread_context, set_thread_context,
7220         thread_added and store_inferior_register.  Rename
7221         fetch_inferior_registers to fetch_inferior_register.
7222         (regptr): Remove declaration.
7223
7224 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7225
7226         * linux-low.c (linux_detach): Change return type to int.  Return 0.
7227         * spu-low.c (spu_detach): Likewise.
7228
7229 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7230
7231         * target.h (target_ops): Change return type of detach to int.
7232         Add join.
7233         (join_inferior): New.
7234         * server.c (main): Don't skip detach support on mingw32.
7235         If the inferior doesn't support detaching return error.
7236         Call join_inferior instead of using waitpid.
7237         * linux-low.c (linux_join): New.
7238         (linux_target_op): Add linux_join.
7239         * spu-low.c (spu_join): New.
7240         (spu_target_ops): Add spu_join.
7241         * win32-low.c (win32_detach): Adapt to new interface.
7242         Reopen current_process_handle before detaching.  Issue a child
7243         resume before detaching.
7244         (win32_join): New.
7245         (win32_target_op): Add win32_join.
7246
7247 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7248
7249         * win32-low.c (win32-attach): Fix return value.
7250         * target.h (target_ops): Describe ATTACH return values.
7251
7252 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7253
7254         * win32-low.c (GETPROCADDRESS): Define.
7255         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
7256         (winapi_DebugSetProcessKillOnExit): Likewise.
7257         (win32_create_inferior): Force usage of ansi CreateProcessA.
7258         (win32_attach): Use GETPROCADDRESS.
7259         (win32_detach): Likewise.
7260
7261 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
7262
7263         * win32-low.c (win32_wait): Don't use WSTOPSIG.
7264
7265 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
7266
7267         * win32-low.c: Commit leftover changes from 2007-03-29.
7268
7269 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
7270
7271         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7272         fields short instead of int.  Add explicit padding.
7273         (i387_cache_to_fsave): Remove unnecessary casts.
7274         (i387_fsave_to_cache): Doc fix.
7275         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7276
7277 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
7278
7279         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7280         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7281
7282 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
7283
7284         * configure.srv (arm*-*-mingw32ce*): Move near the other
7285         arm targets.
7286
7287 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
7288
7289         * configure.ac: Add errno checking.
7290         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7291         sys/file.h and malloc.h.
7292         (AC_CHECK_DECLS): Add perror.
7293         (srv_mingwce): Handle.
7294         * configure.srv (i[34567]86-*-cygwin*): Add
7295         win32-i386-low.o to srv_tgtobj.
7296         (i[34567]86-*-mingw*): Likewise.
7297         (arm*-*-mingw32ce*): Add case.
7298         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7299         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7300         [__MINGW32CE__] (strerror): New function.
7301         [__MINGW32CE__] (errno): Define to GetLastError.
7302         [__MINGW32CE__] (COUNTOF): New macro.
7303         (remote_open): Remove extra close call.
7304         * mem-break.c (delete_breakpoint_at): New function.
7305         * mem-break.h (delete_breakpoint_at): Declare.
7306         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7307         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7308         [USE_WIN32API] (read, write): Add char* casts.
7309         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7310         * server.h: Include wincecompat.h on Windows CE.
7311         [HAVE_ERRNO_H]: Check.
7312         (perror): Declare if not declared.
7313         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7314         (perror_with_name): Remove errno declaration.
7315         * wincecompat.h: New.
7316         * wincecompat.c: New.
7317         * win32-low.h: New.
7318         * win32-arm-low.c: New.
7319         * win32-i386-low.c: New.
7320         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7321         (OUTMSG2): Make it safe.
7322         (_T): New macro.
7323         (COUNTOF): New macro.
7324         (NUM_REGS): Get it from the low target.
7325         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7326         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7327         (thread_rec): Let low target handle debug registers.
7328         (child_add_thread): Likewise.
7329         (child_init_thread_list): Likewise.
7330         (continue_one_thread): Likewise.
7331         (regptr): New.
7332         (do_child_fetch_inferior_registers): Move to ...
7333         * win32-i386-low.c: ... here, and rename to ...
7334         (do_fetch_inferior_registers): ... this.
7335         * win32-low.c (child_fetch_inferior_registers):
7336         Go through the low target.
7337         (do_child_store_inferior_registers): Use regptr.
7338         (strwinerror): New function.
7339         (win32_create_inferior): Handle Windows CE.
7340         Use strwinerror instead of strerror on Windows error
7341         codes.  Add program to the error output.
7342         Don't close the main thread handle on Windows CE.
7343         (win32_attach): Use coredll.dll on Windows CE.
7344         (win32_kill): Close current process and current
7345         thread handles.
7346         (win32_detach): Use coredll.dll on Windows CE.
7347         (win32_resume): Let low target handle debug registers, and
7348         step request.
7349         (handle_exception): Add/Remove initial breakpoint.  Avoid
7350         non-existant WSTOPSIG on Windows CE.
7351         (win32_read_inferior_memory): Cast to remove warning.
7352         (win32_arch_string): Go through the low target.
7353         (initialize_low): Call set_breakpoint_data with the low
7354         target's breakpoint.
7355         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7356         FOP_REGNUM, mappings): Move to ...
7357         * win32-i386-low.c: ... here.
7358         * win32-low.c (win32_thread_info): Move to ...
7359         * win32-low.h: ... here.
7360         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7361         win32-arm-low.c and wincecompat.c.
7362         (all:): Add $EXEEXT.
7363         (install-only:): Likewise.
7364         (gdbserver:): Likewise.
7365         (gdbreplay:): Likewise.
7366         * config.in: Regenerate.
7367         * configure: Regenerate.
7368
7369 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
7370
7371         * win32-low.c: Rename typedef thread_info to
7372         win32_thread_info throughout.
7373
7374 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
7375
7376         * win32-i386-low.c: Rename to ...
7377         * win32-low.c: ... this.
7378         * configure.srv: Replace win32-i386-low.o with win32-low.o.
7379         * Makefile.in: Likewise.
7380
7381 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
7382
7383         * remote-utils.c (monitor_output): Constify msg parameter.
7384         * server.h (monitor_output): Likewise.
7385         * win32-i386-low.c (handle_output_debug_string): New.
7386         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7387         handle_output_debug_string.
7388         (get_child_debug_event): Likewise.
7389
7390 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
7391
7392         * server.c (main): Correct strtoul check.
7393
7394 2007-03-27  Jon Ringle  <jon@ringle.org>
7395
7396         * linux-low.c: Check __ARCH_HAS_MMU__ also.
7397
7398 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
7399
7400         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7401
7402 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
7403
7404         * terminal.h: Check HAVE_SGTTY_H.
7405
7406 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
7407
7408         * remote-utils.c (remote_open): Print out the assigned port number.
7409
7410 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
7411
7412         * remote-utils.c (monitor_output): New function.
7413         * server.c (debug_threads): Define here.
7414         (monitor_show_help): New function.
7415         (handle_query): Handle qRcmd.
7416         (main): Do not handle 'd' packet.
7417         * server.h (debug_threads, remote_debug, monitor_output): Declare.
7418         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7419         of debug_threads.
7420
7421 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
7422
7423         * Makefile.in (EXEEXT): New.
7424         (clean): Use $(EXEEXT).
7425
7426 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
7427
7428         * target.h (target_ops): Rename send_signal to request_interrupt,
7429         and remove enum target_signal parameter.
7430         * linux-low.c (linux_request_interrupt): Rename from
7431         linux_send_signal, and always send SIGINT.
7432         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7433         and always send SIGINT.
7434         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7435         of send_signal.
7436         (input_interrupt): Likewise.
7437
7438 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
7439
7440         * server.c (get_features_xml): Check if target implemented
7441         arch_string.
7442         * win32-i386-low.c (win32_arch_string): New.
7443         (win32_target_ops): Add win32_arch_string as arch_string member.
7444
7445 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
7446
7447         * spu-low.c (spu_arch_string): New.
7448         (spu_target_ops): Add spu_arch_string.
7449
7450 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
7451
7452         * remote-utils.c: Remove HAVE_TERMINAL_H check.
7453         * configure.ac: Do not check for terminal.h.
7454         * configure, config.in: Regenerated.
7455
7456 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
7457
7458         * Makefile.in (OBS): Add $(XML_BUILTIN).
7459         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7460         (clean): Update.
7461         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7462         (arm-with-iwmmxt.c): New.
7463         * config.in, configure: Regenerate.
7464         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
7465         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
7466         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7467         (arm*-*-linux*): Add iWMMXt and regset support.
7468         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7469         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7470         (arm_store_wmmxregset, target_regsets): New.
7471         * server.c (get_features_xml): Take annex argument.  Check builtin
7472         XML documents.
7473         (handle_query): Handle multiple annexes.
7474
7475 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
7476
7477         * remote-utils.c [USE_WIN32API] (read, write): Define.
7478         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7479         write.
7480
7481 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
7482
7483         * linux-i386-low.c (the_low_target): Set arch_string.
7484         * linux-x86-64-low.c (the_low_target): Likewise.
7485         * linux-low.c (linux_arch_string): New.
7486         (linux_target_ops): Add it.
7487         * linux-low.h (struct linux_target_ops): Add arch_string.
7488         * server.c (write_qxfer_response): Use const void * for DATA.
7489         (get_features_xml): New.
7490         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
7491         * target.h (struct target_ops): Add arch_string method.
7492
7493 2007-01-03  Denis Pilat  <denis.pilat@st.com>
7494             Daniel Jacobowitz  <dan@codesourcery.com>
7495
7496         * linux-low.c (linux_kill): Handle being called with no threads.
7497         * win32-i386-low.c (win32_kill): Likewise.
7498         (get_child_debug_event): Clear current_process_handle.
7499
7500 2006-12-30  Denis PILAT  <denis.pilat@st.com>
7501             Daniel Jacobowitz  <dan@codesourcery.com>
7502
7503         * remote-utils.c (remote_open): Check the type of specified
7504         serial port devices before opening them.
7505         * server.c (main): Kill the inferior if an error occurs during
7506         the first remote_open.
7507
7508 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
7509
7510         * README: Update supported targets.
7511
7512 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
7513
7514         * Makefile.in (clean): Remove reg-mips64.c.
7515         (reg-mips64.c, reg-mips64.o): New rules.
7516         * configure.srv: Handle mips64.  Include regset support for mips.
7517         * linux-mips-low.c (union mips_register): New.
7518         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7519         (mips_breakpoint, mips_breakpoint_at): Use int.
7520         (mips_collect_register, mips_supply_register)
7521         (mips_collect_register_32bit, mips_supply_register_32bit)
7522         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7523         (mips_store_fpregset, target_regsets): New.
7524         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7525
7526 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
7527
7528         * configure.srv: Add target "spu*-*-*".
7529         * Makefile.in (clean): Remove reg-spu.c.
7530         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7531         * spu-low.c: New file.
7532
7533 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
7534
7535         * configure.ac: Correct td_thr_tls_get_addr test.
7536         * configure: Regenerated.
7537
7538 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
7539
7540         * linux-low.c (linux_wait_for_event): Reformat.  Use the
7541         pass_signals array.
7542         * remote-utils.c (decode_address_to_semicolon): New.
7543         * server.c (pass_signals, handle_general_set): New.
7544         (handle_query): Mention QPassSignals for qSupported.
7545         (main): Call handle_general_set.
7546         * server.h (pass_signals, decode_address_to_semicolon): New.
7547
7548 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
7549
7550         * server.c (handle_query): Correct error handling for read_auxv.
7551
7552 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
7553
7554         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7555         and srv_linux_thread_db to yes.
7556         * linux-s390-low.c (s390_fill_gregset): New function.
7557         (target_regsets): Define data structure.
7558
7559 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
7560
7561         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7562         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
7563         * config.in, configure: Regenerated.
7564         * inferiors.c (gdb_id_to_thread): New function.
7565         (gdb_id_to_thread_id): Use it.
7566         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7567         * linux-low.h (struct process_info): Add th member.
7568         (thread_db_get_tls_address): New prototype.
7569         * remote-utils.c (decode_address): Make non-static.
7570         * server.c (handle_query): Handle qGetTLSAddr.
7571         * server.h (gdb_id_to_thread, decode_address): New prototypes.
7572         * target.h (struct target_ops): Add get_tls_address.
7573         * thread-db.c (maybe_attach_thread): Save the thread handle.
7574         (thread_db_get_tls_address): New.
7575
7576 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
7577
7578         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7579         (linux_resume_one_process): Take a siginfo_t *.  Update all
7580         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
7581         (struct pending_signals): Add a siginfo_t.
7582         (linux_wait_for_process): Always set last_status.
7583         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7584         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7585         * linux-low.h (struct process_info): Add last_status.
7586
7587 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
7588
7589         * remote-utils.c (try_rle): New function.
7590         (putpkt_binary): Use it.
7591
7592 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
7593
7594         * Makefile.in (clean): Clean reg-x86-64-linux.c.
7595         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7596         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7597         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7598         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7599         point registers.
7600
7601 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
7602
7603         * server.c (terminal_fd): New variable.
7604         (old_foreground_pgrp): Likewise.
7605         (restore_old_foreground_pgrp): New function.
7606         (start_inferior): Record the terminal file descriptor in terminal_fd
7607         and its original foreground group in old_foreground_pgrp.  Register
7608         restore_old_foreground_pgrp with atexit().
7609
7610 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
7611
7612         * server.c (handle_query): Correct qPart to qXfer.
7613
7614 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
7615
7616         * configure.ac: Check for more headers which are missing on
7617         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
7618         * configure.srv: Add Cygwin and mingw32.
7619         * remote-utils.c: Don't include headers unconditionally which
7620         are missing on mingw32.  Include <winsock.h> for mingw32.
7621         (remote_open): Adjust for mingw32 support.  Flush
7622         standard error after writing to it.
7623         (remote_close, putpkt_binary, input_interrupt, block_async_io)
7624         (unblock_async_io, enable_async_io, disable_async_io)
7625         (readchar, getpkt): Update for Winsock support.
7626         (prepare_resume_reply): Expect a protocol signal number.
7627         * server.c: Disable <sys/wait.h> on mingw32.
7628         (start_inferior): Adjust for mingw32 support.  Flush
7629         standard error after writing to it.
7630         (attach_inferior): Likewise.  Use protocol signal
7631         numbers.
7632         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
7633         and names.
7634         * win32-i386-low.c: New file.
7635         * Makefile.in (XM_CLIBS): Set.
7636         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7637         (win32-i386-low.o): New dependency rule.
7638         * linux-low.c (linux_wait): Use target signal numbers.
7639         * target.h (struct target_ops): Doc fix.
7640         * server.h (target_signal_to_name): New prototype.
7641         * gdbreplay.c: Don't include headers unconditionally which
7642         are missing on mingw32.  Include <winsock.h> for mingw32.
7643         (remote_close, remote_open): Adjust for Winsock support.
7644         * configure, config.in: Regenerated.
7645
7646 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
7647
7648         * server.c (decode_xfer_read, write_qxfer_response): New.
7649         (handle_query): Take a packet length argument.  Handle
7650         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
7651         the qSupported response.
7652         (main): Update call to handle_query.
7653
7654 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
7655
7656         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7657         (putpkt_binary): Renamed from putpkt and adjusted for binary
7658         data.
7659         (putpkt): New wrapper for putpkt_binary.
7660         (readchar): Don't mask off the high bit.
7661         (decode_X_packet): New function.
7662         * server.c (main): Call putpkt_binary if a handler sets the packet
7663         length.  Save the length of the incoming packet.  Handle 'X'.
7664         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7665
7666 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
7667
7668         * server.c (handle_query): Handle qSupported.
7669
7670 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
7671
7672         * remote-utils.c (all_symbols_looked_up): New variable.
7673         (look_up_one_symbol): Check it.
7674         * server.h (look_up_one_symbol): New declaration.
7675         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7676
7677 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
7678
7679         * Makefile.in (linux-arm-low.o): Update dependencies.
7680         * linux-arm-low.c: Include "gdb_proc_service.h".
7681         (PTRACE_GET_THREAD_AREA): Define.
7682         (ps_get_thread_area): New function.
7683
7684 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
7685
7686         * configure.srv (m68k*-*-uclinux*): New target.
7687         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7688         (linux_resume_one_process): Remove extraneous cast.
7689         (linux_read_offsets): New.
7690         (linux_target_op): Add linux_read_offsets on mmuless systems.
7691         * server.c (handle_query): Add qOffsets logic.
7692         * target.h (struct target_ops): Add read_offsets.
7693
7694 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
7695
7696         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7697         (PTRACE_GET_THREAD_AREA): Define.
7698         (ps_get_thread_area): New function.
7699         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7700         (linux-x86-64-low.o): Update.
7701
7702 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
7703
7704         * configure.ac: Remove checks for prfpregset_t.
7705         * gdb_proc_service.h: New file.
7706         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7707         new "gdb_proc_service.h".
7708         * proc-service.c: Likewise.
7709         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7710         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7711         * Makefile.in (gdb_proc_service_h): Updated.
7712         * configure, config.in: Regenerated.
7713
7714 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
7715
7716         * remote-utils.c (prepare_resume_reply): Move declaration
7717         of gdb_id_from_wait to the top of the block.
7718
7719 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
7720
7721         * linux-low.c (regsets_store_inferior_registers): Read the regset
7722         from the target before filling it.
7723
7724 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
7725
7726         * server.c (attach_inferior): Return SIGTRAP for a successful
7727         attach.
7728
7729 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
7730
7731         * Makefile.in (OBS): Add version.o.
7732         (STAGESTUFF): Delete.
7733         (version.o): Add dependencies.
7734         (version.c): Replace rule.
7735         (clean): Remove version.c.
7736         * server.c (gdbserver_version): New.
7737         (gdbserver_usage): Use printf.
7738         (main): Handle --version and --help.
7739         * server.h (version, host_name): Add declarations.
7740
7741 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
7742
7743         * linux-arm-low.c:
7744         * linux-arm-low.c:
7745         * inferiors.c:
7746         * i387-fp.h:
7747         * i387-fp.c:
7748         * gdbreplay.c:
7749         * regcache.c:
7750         * proc-service.c:
7751         * mem-break.h:
7752         * mem-break.c:
7753         * linux-x86-64-low.c:
7754         * linux-sh-low.c:
7755         * linux-s390-low.c:
7756         * linux-ppc64-low.c:
7757         * linux-ppc-low.c:
7758         * linux-mips-low.c:
7759         * linux-m68k-low.c:
7760         * linux-m32r-low.c:
7761         * linux-low.h:
7762         * linux-low.c:
7763         * linux-ia64-low.c:
7764         * linux-i386-low.c:
7765         * linux-crisv32-low.c:
7766         * thread-db.c:
7767         * terminal.h:
7768         * target.h:
7769         * target.c:
7770         * server.h:
7771         * server.c:
7772         * remote-utils.c:
7773         * regcache.h:
7774         * utils.c:
7775         * Makefile.in:
7776         * configure.ac:
7777         * gdbserver.1: Add (C) after Copyright.  Update the FSF
7778         address.
7779
7780 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
7781
7782         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7783         (arm_breakpoint_at): Recognize both breakpoints.
7784         (the_low_target): Use the correct breakpoint instruction.
7785
7786 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
7787
7788         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7789         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7790         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7791         (the_low_target): Update.
7792
7793 2005-10-25  Andreas Schwab  <schwab@suse.de>
7794
7795         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7796
7797         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7798         (ia64_num_regs): Reduce to 462.
7799
7800 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
7801
7802         * acinclude.m4: Correct quoting.
7803         * aclocal.m4: Regenerated.
7804
7805         Suggested by SZOKOVACS Robert <szo@ies.hu>:
7806         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7807         (thread_db_init): Call thread_db_err_str.
7808         * configure.ac: Check for TD_VERSION.
7809         * config.in, configure: Regenerated.
7810
7811 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7812
7813         * server.h (error, fatal, warning): Add ATTR_FORMAT.
7814
7815 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
7816
7817         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7818         is not available.  Define HAVE_PTRACE_GETREGS if it is.
7819         * config.in, configure: Regenerated.
7820         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7821         * linux-i386-low.c, linux-m68k-low.c: Update to use
7822         HAVE_PTRACE_GETREGS.
7823         * linux-low.c (regsets_fetch_inferior_registers)
7824         (regsets_store_inferior_registers): Only return 0 if we processed
7825         GENERAL_REGS.
7826         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7827         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7828
7829 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
7830
7831         * inferiors.c (struct thread_info): Add gdb_id.
7832         (add_thread): Add gdb_id argument.
7833         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7834         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7835         calls to add_thread.
7836         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7837         * server.c (handle_query): Use thread_to_gdb_id.
7838         (handle_v_cont, main): Use gdb_id_to_thread_id.
7839         * server.h (add_thread): Update prototype.
7840         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7841         prototypes.
7842
7843 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
7844
7845         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7846         left-padded registers.
7847         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7848         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7849
7850 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
7851
7852         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7853         * configure: Regenerate.
7854         * config.in: Regenerate.
7855         * server.h (NEED_DECLARATION_STRERROR):
7856         Replace with !HAVE_DECL_STRERROR.
7857
7858 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
7859
7860         * linux-low.c (linux_wait, linux_send_signal): Don't test
7861         an unsigned long variable for > 0 if it could be MAX_ULONG.
7862         * server.c (myresume): Likewise.
7863         * target.c (set_desired_inferior): Likewise.
7864
7865 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
7866
7867         * configure.ac: Simplify and improve check for socklen_t.
7868         * configure, config.in: Regenerate.
7869
7870 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
7871
7872         * acconfig.h: Remove.
7873         * configure.ac: Add a test for socklen_t.  Use three-argument
7874         AC_DEFINE throughout.
7875         * config.in: Regenerated using autoheader 2.59.
7876         * configure: Regenerated.
7877
7878         * gdbreplay.c (socklen_t): Provide a default.
7879         (remote_open): Use socklen_t.
7880         * remote-utils.c (socklen_t): Provide a default.
7881         (remote_open): Use socklen_t.
7882         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7883         unsigned char.
7884
7885         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7886         char for buffers.
7887         * linux-low.c (linux_read_memory, linux_write_memory)
7888         (linux_read_auxv): Likewise.
7889         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7890         (check_mem_write): Likewise.
7891         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7892         Likewise.
7893         * regcache.c (struct inferior_rgcache_data, registers_to_string)
7894         (registers_from_string, register_data): Likewise.
7895         * server.c (handle_query, main): Likewise.
7896         * server.h (convert_ascii_to_int, convert_int_to_ascii)
7897         (decode_M_packet): Likewise.
7898         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7899         * target.h (struct target_ops): Update read_memory, write_memory,
7900         and read_auxv.
7901         (read_inferior_memory, write_inferior_memory): Update.
7902         * linux-low.h (struct linux_target_ops): Change type of breakpoint
7903         to unsigned char *.
7904         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7905         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7906         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7907         linux-s390-low.c, linux-sh-low.c: Update for changes in
7908         read_inferior_memory and the_low_target->breakpoint.
7909
7910 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
7911
7912         * Makefile.in (SFILES): Add linux-ppc64-low.c.
7913         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7914         * configure.srv: Add powerpc64-*-linux*.
7915         * linux-ppc64-low.c: New file.
7916
7917 2005-05-23  Orjan Friberg  <orjanf@axis.com>
7918
7919         * linux-cris-low.c: New file with support for CRIS.
7920         * linux-crisv32-low.c: Ditto for CRISv32.
7921         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7922         (clean): Add reg-cris.c and reg-crisv32.c.
7923         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7924         reg-crisv32.o, and reg-crisv32.c to make rules.
7925         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7926         recognized targets.
7927
7928 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
7929
7930         * linux-low.c (fetch_register): Ensure buffer size is a multiple
7931         of sizeof (PTRACE_XFER_TYPE).
7932         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
7933
7934 2005-05-12  Orjan Friberg  <orjanf@axis.com>
7935
7936         * target.h (struct target_ops): Add insert_watchpoint,
7937         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7938         pointers for hardware watchpoint support.
7939         * linux-low.h (struct linux_target_ops): Ditto.
7940         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7941         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
7942         to linux_target_ops.
7943         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7944         reply packet.
7945         * server.c (main): Recognize 'Z' and 'z' packets.
7946
7947 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
7948
7949         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7950         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7951         (the_low_target): Add new members.
7952
7953 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
7954
7955         * proc-service.c (ps_lgetregs): Search all_processes instead of
7956         all_threads.
7957
7958 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
7959
7960         * server.c (start_inferior): Change return type to int.
7961         (attach_inferior): Change sigptr to int *.
7962         (handle_v_cont, handle_v_requests): Change signal to int *.
7963         (main): Change signal to int.
7964
7965 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
7966
7967         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7968         * configure.srv: Add m32r*-*-linux*.
7969         * linux-m32r-low.c: New file.
7970
7971 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
7972
7973         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7974
7975 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
7976
7977         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7978         Take unsigned long arguments for PIDs.
7979         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7980         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7981         (wait_for_sigstop, linux_resume_one_process)
7982         (regsets_fetch_inferior_registers, linux_send_signal)
7983         (linux_read_auxv): Likewise.  Update the types of variables holding
7984         PIDs.  Update format string specifiers.
7985         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7986         * remote-utils.c (prepare_resume_reply): Likewise.
7987         * server.c (cont_thread, general_thread, step_thread)
7988         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7989         unsigned long.
7990         (handle_query): Update format specifiers.
7991         (handle_v_cont, main): Use strtoul for thread IDs.
7992         * server.h (struct inferior_list_entry): Use unsigned long for ID.
7993         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7994         (general_thread, step_thread, thread_from_wait)
7995         (old_thread_from_wait): Update.
7996         * target.h (struct thread_resume): Use unsigned long for THREAD.
7997         (struct target_ops): Use unsigned long for arguments to attach and
7998         thread_alive.
7999
8000 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
8001
8002         * acinclude.m4: Include bfd/bfd.m4 directly.
8003         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
8004         <agriffis@toolchain.org>.
8005         * aclocal.m4, configure: Regenerated.
8006
8007 2005-01-07  Andrew Cagney  <cagney@gnu.org>
8008
8009         * configure.ac: Rename configure.in, require autoconf 2.59.
8010         * configure: Re-generate.
8011
8012 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
8013
8014         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
8015         LIBS when finished.
8016         * aclocal.m4: Regenerated.
8017         * configure: Regenerated.
8018
8019 2004-11-21  Andreas Schwab  <schwab@suse.de>
8020
8021         * linux-m68k-low.c (m68k_num_gregs): Define.
8022         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8023         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8024         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8025         (m68k_breakpoint_at): New.  Add to the_low_target.
8026
8027         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8028         srv_linux_thread_db to yes.
8029
8030 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
8031
8032         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8033         (ARCH_SET_FS): Likewise.
8034         (ARCH_GET_FS): Likewise.
8035         (ARCH_GET_GS): Likewise.
8036
8037 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
8038
8039         * linux-i386-low.c (ps_get_thread_area): New.
8040         * linux-x86-64-low.c (ps_get_thread_area): New.
8041         * linux-low.c: Include <sys/syscall.h>.
8042         (linux_kill_one_process): Don't kill the first thread here.
8043         (linux_kill): Kill the first thread here.
8044         (kill_lwp): New function.
8045         (send_sigstop, linux_send_signal): Use it.
8046         * proc-service.c: Clean up #ifdefs.
8047         (fpregset_info): Delete.
8048         (ps_lgetregs): Update and enable implementation.
8049         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8050         implementations.
8051         * remote-utils.c (struct sym_cache, symbol_cache): New.
8052         (input_interrupt): Print a clearer message.
8053         (async_io_enabled): New variable.
8054         (enable_async_io, disable_async_io): Use it.  Update comments.
8055         (look_up_one_symbol): Use the symbol cache.
8056         * thread-db.c (thread_db_look_up_symbols): New function.
8057         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
8058
8059 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
8060
8061         * configure.in: Test for -rdynamic.
8062         * configure: Regenerated.
8063         * Makefile (INTERNAL_LDFLAGS): New.
8064         (gdbserver, gdbreplay): Use it.
8065
8066 2004-09-02  Andrew Cagney  <cagney@gnu.org>
8067
8068         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8069
8070 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
8071
8072         * linux-low.c (linux_wait): Clear all_processes list also.
8073
8074 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
8075
8076         * linux-low.c: Include <errno.h>.  Remove extern declaration of
8077         errno.
8078
8079 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
8080
8081         * gdbreplay.c, server.h, utils.c: Update copyright years.
8082
8083 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
8084
8085         * server.c (main): Print child status or termination signal from
8086         variable 'signal', not 'sig'.
8087
8088 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
8089
8090         * linux-low.c (linux_read_memory): Change return type to
8091         int.  Check for and return error from ptrace().
8092         * target.c (read_inferior_memory): Change return type to int.  Pass
8093         back return status from the_target->read_memory().
8094         * target.h (struct target_ops): Adapt *read_memory() prototype.
8095         Update comment.
8096         (read_inferior_memory): Adapt prototype.
8097         * server.c (main): Return an error packet if
8098         read_inferior_memory() returns an error.
8099
8100 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
8101
8102         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8103         Unify with other clean targets.
8104
8105 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
8106
8107         * server.c (handle_v_cont): Call set_desired_inferior.
8108
8109 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
8110
8111         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8112
8113 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
8114
8115         * linux-low.c (linux_wait): Unblock async I/O.
8116         (linux_resume): Block and enable async I/O.
8117         * remote-utils.c (block_async_io, unblock_async_io): New functions.
8118         * server.h (block_async_io, unblock_async_io): Add prototypes.
8119
8120 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
8121
8122         * remote-utils.c (remote_open): Print a status notice after
8123         opening a TCP port.
8124         * server.c (attach_inferior): Print a status notice after
8125         attaching.
8126
8127 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
8128
8129         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8130
8131 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
8132
8133         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8134         error packet.
8135         * server.c, target.h: Update copyright years.
8136
8137 2004-02-25  Roland McGrath  <roland@redhat.com>
8138
8139         * target.h (struct target_ops): New member `read_auxv'.
8140         * server.c (handle_query): Handle qPart:auxv:read: query using that.
8141         * linux-low.c (linux_read_auxv): New function.
8142         (linux_target_ops): Initialize `read_auxv' member to that.
8143
8144 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8145
8146         Committed by Jim Blandy  <jimb@redhat.com>.
8147
8148         * linux-s390-low.c (s390_num_regs): Update.
8149         (s390_regmap): Remove control registers.  Use __s390x__ predefine
8150         instead of GPR_SIZE to distiguish s390 and s390x targets.
8151
8152 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
8153
8154         * linux-low.c: Update copyright year.
8155         (check_removed_breakpoint): Clear pending_is_breakpoint.
8156         (linux_set_resume_request, linux_queue_one_thread)
8157         (resume_status_pending_p): New functions.
8158         (linux_continue_one_thread): Use process->resume.
8159         (linux_resume): Only resume threads if there are no pending events.
8160         * linux-low.h (struct process_info): Add resume request
8161         pointer.
8162
8163 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
8164
8165         * regcache.c (new_register_cache): Clear the allocated register
8166         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8167
8168 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
8169
8170         * linux-low.c (linux_resume): Take a struct thread_resume *
8171         argument.
8172         (linux_wait): Update call.
8173         (resume_ptr): New static variable.
8174         (linux_continue_one_thread): Renamed from
8175         linux_continue_one_process.  Use resume_ptr.
8176         (linux_resume): Use linux_continue_one_thread.
8177         * server.c (handle_v_cont, handle_v_requests): New functions.
8178         (myresume): New function.
8179         (main): Handle 'v' case.
8180         * target.h (struct thread_resume): New type.
8181         (struct target_ops): Change argument of "resume" to struct
8182         thread_resume *.
8183         (myresume): Delete macro.
8184
8185 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
8186
8187         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8188         (uninstall): Support DESTDIR.
8189
8190 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
8191
8192         * configure.srv: Add xscale*linux copy of arm*linux entry.
8193
8194 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
8195
8196         * linux-arm-low.c (arm_reinsert_addr): New function.
8197         (the_low_target): Add arm_reinsert_addr.
8198
8199 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
8200
8201         * mem-break.c: Remove whitespace at end of file.
8202
8203 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
8204
8205         * configure.in: Check whether we need to prototype strerror.
8206         * server.h: Optionally prototype strerror.
8207         * gdbreplay.c (perror_with_name): Use strerror.
8208         * linux-low.c (linux_attach_lwp): Use strerror.
8209         * utils.c (perror_with_name): Use strerror.
8210         * config.in, configure: Regenerated.
8211
8212 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
8213
8214         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8215         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8216
8217 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
8218
8219         * Makefile.in (SFILES): Update.
8220         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8221         low-sun3.c: Remove files.
8222
8223 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
8224
8225         * linux-low.c: Move comment to linux_thread_alive where it belonged.
8226         (linux_detach_one_process, linux_detach): New functions.
8227         (linux_target_ops): Add linux_detach.
8228         * server.c (main): Handle 'D' packet.
8229         * target.h (struct target_ops): Add "detach" member.
8230         (detach_inferior): Define.
8231
8232 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
8233
8234         From Kelley Cook  <kelleycook@wideopenwest.com>:
8235         * configure.srv: Accept i[34567]86 variants.
8236
8237 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
8238
8239         * linux-low.c (linux_wait_for_event): Correct comment typos.
8240         (linux_resume_one_process): Call check_removed_breakpoint.
8241         (linux_send_signal): New function.
8242         (linux_target_ops): Add linux_send_signal.
8243         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8244         of kill.
8245         * target.h (struct target_ops): Add send_signal.
8246
8247 2003-05-29  Jim Blandy  <jimb@redhat.com>
8248
8249         * linux-low.c (usr_store_inferior_registers): Transfer buf in
8250         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
8251         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8252         away part of the register's value.
8253
8254 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
8255
8256         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8257         (linux_wait_for_event, linux_init_signals): Likewise.
8258
8259 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
8260
8261         * configure.in: Check for stdlib.h.
8262         * configure: Regenerated.
8263         * config.in: Regenerated.
8264
8265 2003-01-04  Andreas Schwab  <schwab@suse.de>
8266
8267         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8268
8269 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
8270
8271         * Makefile.in: Remove obsolete code.
8272
8273 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
8274
8275         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8276         defined(PT_FPR0_HI).
8277
8278 2002-11-17  Stuart Hughes  <seh@zee2.com>
8279
8280         * linux-arm-low.c (arm_num_regs): Increase.
8281         (arm_regmap): Include status register.
8282
8283 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
8284
8285         * linux-low.c (register_addr): Remove incorrect -1 check.
8286
8287 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
8288
8289         * linux-low.c (linux_create_inferior): Call setpgid.  Return
8290         the new PID.
8291         (unstopped_p, linux_signal_pid): Remove.
8292         (linux_target_ops): Remove linux_signal_pid.
8293         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8294         global instead of target method.
8295         * target.h (struct target_ops): Remove signal_pid.  Update comment
8296         for create_inferior.
8297         * server.c (signal_pid): New variable.
8298         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
8299         gdbserver.  Set the child to be the foreground process group.
8300         (attach_inferior): Set signal_pid.
8301
8302 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
8303
8304         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8305
8306 2002-08-20  Jim Blandy  <jimb@redhat.com>
8307
8308         * Makefile.in (LDFLAGS): Allow the configure script to establish a
8309         default for this.
8310
8311 2002-08-01  Andrew Cagney  <cagney@redhat.com>
8312
8313         * Makefile.in: Make chill references obsolete.
8314
8315 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
8316
8317         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8318         * configure: Regenerate.
8319         * config.in: Regenerate.
8320
8321 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
8322
8323         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8324         (perror_with_name, remote_close, remote_open, expect, play): Static.
8325
8326 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
8327
8328         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8329         byte offsets instead of an array of indexes.
8330         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8331
8332 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
8333
8334         * regcache.c: Add comment.
8335
8336 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
8337
8338         * thread-db.c: New file.
8339         * proc-service.c: New file.
8340         * acinclude.m4: New file.
8341         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8342         proc-service.o, and thread-db.o.
8343         (linux-low.o): Add USE_THREAD_DB.
8344         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8345         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8346         * aclocal.m4: Regenerated.
8347         * config.in: Regenerated.
8348         * configure: Regenerated.
8349         * configure.in: Check for proc_service.h, sys/procfs.h,
8350         thread_db.h, and linux/elf.h headrs.
8351         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8352         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
8353         Check for -lthread_db and thread support.
8354         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8355         PowerPC, and SuperH.
8356         * i387-fp.c: Constify arguments.
8357         * i387-fp.h: Likewise.
8358         * inferiors.c: (struct thread_info): Renamed from
8359         `struct inferior_info'.  Remove PID member.  Use generic inferior
8360         list header.  All uses updated.
8361         (inferiors, signal_pid): Removed.
8362         (all_threads): New variable.
8363         (get_thread): Define.
8364         (add_inferior_to_list): New function.
8365         (for_each_inferior): New function.
8366         (change_inferior_id): New function.
8367         (add_inferior): Removed.
8368         (remove_inferior): New function.
8369         (add_thread): New function.
8370         (free_one_thread): New function.
8371         (remove_thread): New function.
8372         (clear_inferiors): Use for_each_inferior and free_one_thread.
8373         (find_inferior): New function.
8374         (find_inferior_id): New function.
8375         (inferior_target_data): Update argument type.
8376         (set_inferior_target_data): Likewise.
8377         (inferior_regcache_data): Likewise.
8378         (set_inferior_regcache_data): Likewise.
8379         * linux-low.c (linux_bp_reinsert): Remove.
8380         (all_processes, stopping_threads, using_thrads)
8381         (struct pending_signals, debug_threads, pid_of): New.
8382         (inferior_pid): Replace with macro.
8383         (struct inferior_linux_data): Remove.
8384         (get_stop_pc, add_process): New functions.
8385         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8386         Use add_process and add_thread.
8387         (linux_attach_lwp): New function, based on old linux_attach.  Use
8388         add_process and add_thread.  Set stop_expected for new threads.
8389         (linux_attach): New function.
8390         (linux_kill_one_process): New function.
8391         (linux_kill): Kill all LWPs.
8392         (linux_thread_alive): Use find_inferior_id.
8393         (check_removed_breakpoints, status_pending_p): New functions.
8394         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8395         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
8396         struct for the found process.
8397         (linux_wait_for_event): New function.
8398         (linux_wait): Use it.  Support LWPs.
8399         (send_sigstop, wait_for_sigstop, stop_all_processes)
8400         (linux_resume_one_process, linux_continue_one_process): New functions.
8401         (linux_resume): Support LWPs.
8402         (REGISTER_RAW_SIZE): Remove.
8403         (fetch_register): Use register_size instead.  Call supply_register.
8404         (usr_store_inferior_registers): Likewise.  Call collect_register.
8405         Fix recursive case.
8406         (regsets_fetch_inferior_registers): Improve error message.
8407         (regsets_store_inferior_registers): Add debugging.
8408         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8409         (unstopped_p, linux_signal_pid): New functions.
8410         (linux_target_ops): Add linux_signal_pid.
8411         (linux_init_signals): New function.
8412         (initialize_low): Call it.  Initialize using_threads.
8413         * regcache.c (inferior_regcache_data): Add valid
8414         flag.
8415         (get_regcache): Fetch registers lazily.  Add fetch argument
8416         and update all callers.
8417         (regcache_invalidate_one, regcache_invalidate): New
8418         functions.
8419         (new_register_cache): Renamed from create_register_cache.
8420         Return the new regcache.
8421         (free_register_cache): Change argument to a void *.
8422         (registers_to_string, registers_from_string): Call get_regcache
8423         with fetch flag set.
8424         (register_data): Make static.  Pass fetch flag to get_regcache.
8425         (supply_register): Call get_regcache with fetch flag clear.
8426         (collect_register): Call get_regcache with fetch flag set.
8427         (collect_register_as_string): New function.
8428         * regcache.h: Update.
8429         * remote-utils.c (putpkt): Flush after debug output and use
8430         stderr.
8431         Handle input interrupts while waiting for an ACK.
8432         (input_interrupt): Use signal_pid method.
8433         (getpkt): Flush after debug output and use stderr.
8434         (outreg): Use collect_register_as_string.
8435         (new_thread_notify, dead_thread_notify): New functions.
8436         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
8437         and general_thread.
8438         (look_up_one_symbol): Flush after debug output.
8439         * server.c (step_thread, server_waiting): New variables.
8440         (start_inferior): Don't use signal_pid.  Update call to mywait.
8441         (attach_inferior): Update call to mywait.
8442         (handle_query): Handle qfThreadInfo and qsThreadInfo.
8443         (main): Don't fetch/store registers explicitly.  Use
8444         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
8445         calls to mywait.
8446         * server.h: Update.
8447         (struct inferior_list, struct_inferior_list_entry): New.
8448         * target.c (set_desired_inferior): New.
8449         (write_inferior_memory): Constify.
8450         (mywait): New function.
8451         * target.h: Update.
8452         (struct target_ops): New signal_pid method.
8453         (mywait): Removed macro, added prototype.
8454
8455         * linux-low.h (regset_func): Removed.
8456         (regset_fill_func, regset_store_func): New.
8457         (enum regset_type): New.
8458         (struct regset_info): Add type field.  Use new operation types.
8459         (struct linux_target_ops): stop_pc renamed to get_pc.
8460         Add decr_pc_after_break and breakpoint_at.
8461         (get_process, get_thread_proess, get_process_thread)
8462         (strut process_info, all_processes, linux_attach_lwp)
8463         (thread_db_init): New.
8464
8465         * linux-arm-low.c (arm_get_pc, arm_set_pc,
8466         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8467         (the_low_target): Add new members.
8468         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8469         (i386_store_fpxregset): Constify.
8470         (target_regsets): Add new kind identifier.
8471         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
8472         (i386_set_pc): Add debugging.
8473         (i386_breakpoint_at): New function.
8474         (the_low_target): Add new members.
8475         * linux-mips-low.c (mips_get_pc, mips_set_pc)
8476         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8477         (mips_breakpoint_at): New.
8478         (the_low_target): Add new members.
8479         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8480         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8481         (the_low_target): Add new members.
8482         * linux-sh-low.c (sh_get_pc, sh_set_pc)
8483         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8484         (the_low_target): Add new members.
8485         * linux-x86-64-low.c (target_regsets): Add new kind
8486         identifier.
8487
8488 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
8489
8490         From Martin Pool <mbp@samba.org>:
8491         * server.c (gdbserver_usage): New function.
8492         (main): Call it.
8493
8494 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
8495
8496         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8497         stop_at -> stop_pc.
8498
8499 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
8500
8501         * Makefile.in: Remove obsolete code.
8502
8503 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
8504
8505         * linux-low.c (regsets_fetch_inferior_registers),
8506         (regsets_store_inferior_registers): Removed cast to int from
8507         ptrace() calls.
8508         * regcache.h: Added declaration of struct inferior_info.
8509
8510 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
8511
8512         * inferiors.c (struct inferior_info): Add regcache_data.
8513         (add_inferior): Call create_register_cache.
8514         (clear_inferiors): Call free_register_cache.
8515         (inferior_regcache_data, set_inferior_regcache_data): New functions.
8516         * regcache.c (struct inferior_regcache_data): New.
8517         (registers): Remove.
8518         (get_regcache): New function.
8519         (create_register_cache, free_register_cache): New functions.
8520         (set_register_cache): Don't initialize the register cache here.
8521         (registers_to_string, registers_from_string, register_data): Call
8522         get_regcache.
8523         * regcache.h: Add prototypes.
8524         * server.h: Likewise.
8525
8526 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
8527
8528         * mem-break.c: New file.
8529         * mem-break.h: New file.
8530         * Makefile.in: Add mem-break.o rule; update server.h
8531         dependencies.
8532         * inferiors.c (struct inferior_info): Add target_data
8533         member.
8534         (clear_inferiors): Free target_data member if set.
8535         (inferior_target_data, set_inferior_target_data): New functions.
8536         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8537         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
8538         * linux-low.c (linux_bp_reinsert): New variable.
8539         (struct inferior_linux_data): New.
8540         (linux_create_inferior): Use set_inferior_target_data.
8541         (linux_attach): Likewise.  Call add_inferior.
8542         (linux_wait_for_one_inferior): New function.
8543         (linux_wait): Call it.
8544         (linux_write_memory): Add const.
8545         (initialize_low): Call set_breakpoint_data.
8546         * linux-low.h (struct linux_target_ops): Add breakpoint
8547         handling members.
8548         * server.c (attach_inferior): Remove extra add_inferior
8549         call.
8550         * server.h: Include mem-break.h.  Update inferior.c
8551         prototypes.
8552         * target.c (read_inferior_memory)
8553         (write_inferior_memory): New functions.
8554         * target.h (read_inferior_memory)
8555         (write_inferior_memory): Change macros to prototypes.
8556         (struct target_ops): Update comments.  Add const to write_memory
8557         definition.
8558
8559 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
8560
8561         * linux-low.c (usr_store_inferior_registers): Support
8562         registers which are allowed to fail to store.
8563         * linux-low.h (linux_target_ops): Likewise.
8564         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8565         (ppc_cannot_store_register): FPSCR may not be storable.
8566
8567 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8568
8569         * server.h: Include <string.h> if HAVE_STRING_H.
8570         * ChangeLog: Correct paths in last ChangeLog entry.
8571
8572 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8573
8574         * linux-low.h: Remove obsolete prototypes.
8575         (struct linux_target_ops): New.
8576         (extern the_low_target): New.
8577         * linux-low.c (num_regs, regmap): Remove declarations.
8578         (register_addr): Use the_low_target explicitly.
8579         (fetch_register): Likewise.
8580         (usr_fetch_inferior_registers): Likewise.
8581         (usr_store_inferior_registers): Likewise.
8582         * linux-arm-low.c (num_regs): Remove.
8583         (arm_num_regs): Define.
8584         (arm_regmap): Renamed from regmap, made static.
8585         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8586         made static.
8587         (arm_cannot_store_register): Renamed from cannot_store_register,
8588         made static.
8589         (the_low_target): New.
8590         * linux-i386-low.c (num_regs): Remove.
8591         (i386_num_regs): Define.
8592         (i386_regmap): Renamed from regmap, made static.
8593         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8594         made static.
8595         (i386_cannot_store_register): Renamed from cannot_store_register,
8596         made static.
8597         (the_low_target): New.
8598         * linux-ia64-low.c (num_regs): Remove.
8599         (ia64_num_regs): Define.
8600         (ia64_regmap): Renamed from regmap, made static.
8601         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8602         made static.
8603         (ia64_cannot_store_register): Renamed from cannot_store_register,
8604         made static.
8605         (the_low_target): New.
8606         * linux-m68k-low.c (num_regs): Remove.
8607         (m68k_num_regs): Define.
8608         (m68k_regmap): Renamed from regmap, made static.
8609         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8610         made static.
8611         (m68k_cannot_store_register): Renamed from cannot_store_register,
8612         made static.
8613         (the_low_target): New.
8614         * linux-mips-low.c (num_regs): Remove.
8615         (mips_num_regs): Define.
8616         (mips_regmap): Renamed from regmap, made static.
8617         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8618         made static.
8619         (mips_cannot_store_register): Renamed from cannot_store_register,
8620         made static.
8621         (the_low_target): New.
8622         * linux-ppc-low.c (num_regs): Remove.
8623         (ppc_num_regs): Define.
8624         (ppc_regmap): Renamed from regmap, made static.
8625         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8626         made static.
8627         (ppc_cannot_store_register): Renamed from cannot_store_register,
8628         made static.
8629         (the_low_target): New.
8630         * linux-s390-low.c (num_regs): Remove.
8631         (s390_num_regs): Define.
8632         (s390_regmap): Renamed from regmap, made static.
8633         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8634         made static.
8635         (s390_cannot_store_register): Renamed from cannot_store_register,
8636         made static.
8637         (the_low_target): New.
8638         * linux-sh-low.c (num_regs): Remove.
8639         (sh_num_regs): Define.
8640         (sh_regmap): Renamed from regmap, made static.
8641         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8642         made static.
8643         (sh_cannot_store_register): Renamed from cannot_store_register,
8644         made static.
8645         (the_low_target): New.
8646         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8647         (the_low_target): New.
8648
8649 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8650
8651         * Makefile.in: Add stamp-h target.
8652         * configure.in: Create stamp-h.
8653         * configure: Regenerated.
8654
8655 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8656
8657         * inferiors.c: New file.
8658         * target.c: New file.
8659         * target.h: New file.
8660         * Makefile.in:  Add target.o and inferiors.o.  Update
8661         dependencies.
8662         * linux-low.c (inferior_pid): New static variable,
8663         moved from server.c.
8664         (linux_create_inferior): Renamed from create_inferior.
8665         Call add_inferior.  Return 0 on success instead of a PID.
8666         (linux_attach): Renamed from myattach.
8667         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
8668         (linux_thread_alive): Renamed from mythread_alive.
8669         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
8670         child dies.
8671         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
8672         (regsets_store_inferior_registers): Correct error message.
8673         Add missing ``return 0''.
8674         (linux_fetch_registers): Renamed from fetch_inferior_registers.
8675         (linux_store_registers): Renamed from store_inferior_registers.
8676         (linux_read_memory): Renamed from read_inferior_memory.
8677         (linux_write_memory): Renamed from write_inferior_memory.
8678         (linux_target_ops): New structure.
8679         (initialize_low): Call set_target_ops ().
8680         * remote-utils.c (unhexify): New function.
8681         (hexify): New function.
8682         (input_interrupt): Send signals to ``signal_pid''.
8683         * server.c (inferior_pid): Remove.
8684         (start_inferior): Update create_inferior call.
8685         (attach_inferior): Call add_inferior.
8686         (handle_query): New function.
8687         (main): Call handle_query for `q' packets.
8688         * server.h: Include "target.h".  Remove obsolete prototypes.
8689         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8690
8691 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
8692
8693         * Makefile.in: Add WARN_CFLAGS.  Update configury
8694         dependencies.
8695         * configure.in: Check for <string.h>
8696         * configure: Regenerate.
8697         * config.in: Regenerate.
8698         * gdbreplay.c: Include needed system headers.
8699         (remote_open): Remove strchr prototype.
8700         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8701         * regcache.c (supply_register): Change buf argument to const void *.
8702         (supply_register_by_name): Likewise.
8703         (collect_register): Change buf argument to void *.
8704         (collect_register_by_name): Likewise.
8705         * regcache.h: Add missing prototypes.
8706         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8707         * server.c (handle_query): New function.
8708         (attached): New static variable, moved out of main.
8709         (main): Quiet longjmp clobber warnings.
8710         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
8711         * utils.c (error): Remove NORETURN.
8712         (fatal): Likewise.