1 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3 * inferiors.c (get_thread_process): Make global.
4 * server.h (get_thread_process): Add prototype.
5 * thread-db.c (find_one_thread): Use get_thread_process
6 instead of current_process.
7 (thread_db_get_tls_address): Do not crash if called when
8 thread layer is not yet initialized.
10 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13 * spu-low.c (current_tid): Rename to ...
14 (current_ptid): ... this.
15 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
17 ptid_get_lwp (current_ptid) instead of current_tid.
18 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19 instead of current_tid. Use find_process_pid to verify pid
20 argument is valid. Pass proper argument to remove_process.
21 (spu_thread_alive): Compare current_ptid instead of current_tid.
22 (spu_resume): Likewise.
24 2009-04-02 Pedro Alves <pedro@codesourcery.com>
26 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
29 2009-04-01 Pedro Alves <pedro@codesourcery.com>
31 Implement the multiprocess extensions, and add linux multiprocess
34 * server.h (ULONGEST): Declare.
35 (struct ptid, ptid_t): New.
36 (minus_one_ptid, null_ptid): Declare.
37 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
38 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
39 (struct inferior_list_entry): Change `id' type from unsigned from
41 (struct sym_cache, struct breakpoint, struct
42 process_info_private): Forward declare.
43 (struct process_info): Declare.
44 (current_process): Declare.
45 (all_processes): Declare.
46 (initialize_inferiors): Declare.
47 (add_thread): Adjust to use ptid_t.
48 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
49 (add_process, remove_process, find_thread_pid): Declare.
50 (find_inferior_id): Adjust to use ptid_t.
51 (cont_thread, general_thread, step_thread): Change type to ptid_t.
52 (multi_process): Declare.
53 (push_event): Adjust to use ptid_t.
54 (read_ptid, write_ptid): Declare.
55 (prepare_resume_reply): Adjust to use ptid_t.
56 (clear_symbol_cache): Declare.
57 * inferiors.c (all_processes): New.
58 (null_ptid, minus_one_ptid): New.
59 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
60 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
61 (add_thread): Change unsigned long to ptid. Remove gdb_id
63 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
64 (gdb_id_to_thread): Rename to ...
65 (find_thread_pid): ... this. Change unsigned long to ptid.
66 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
67 (loaded_dll, pull_pid_from_list): Adjust.
68 (add_process, remove_process, find_process_pid)
69 (get_thread_process, current_process, initialize_inferiors): New.
70 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
71 (struct target_waitstatus) <related_pid>: Ditto.
72 (struct target_ops) <kill, detach>: Add `pid' argument. Change
74 (struct target_ops) <join>: Add `pid' argument.
75 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
76 (struct target_ops) <wait>: Add `ptid' field. Change return type
78 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
79 (mywait): Add `ptid' argument. Change return type to ptid_t.
80 (target_pid_to_str): Declare.
81 * target.c (set_desired_inferior): Adjust to use ptids.
82 (mywait): Add new `ptid' argument. Adjust.
83 (target_pid_to_str): New.
84 * mem-break.h (free_all_breakpoints): Declare.
85 * mem-break.c (breakpoints): Delelete.
86 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
87 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
88 to use per-process breakpoint list.
89 (free_all_breakpoints): New.
90 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
91 (symbol_cache, all_symbols_looked_up): Delete.
93 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
95 (prepare_resume_reply): Change ptid argument's type from unsigned
96 long to ptid_t. Adjust. Implement W;process and X;process.
97 (free_sym_cache, clear_symbol_cache): New.
98 (look_up_one_symbol): Adjust to per-process symbol cache. *
99 * server.c (cont_thread, general_thread, step_thread): Change type
102 (multi_process): New.
103 (last_ptid): Change type to ptid_t.
104 (struct vstop_notif) <ptid>: Change type to ptid_t.
105 (queue_stop_reply, push_event): Change `ptid' argument's type to
107 (discard_queued_stop_replies): Add `pid' argument.
108 (start_inferior): Adjust to use ptids. Adjust to mywait interface
109 changes. Don't reference the `attached' global.
110 (attach_inferior): Adjust to mywait interface changes.
111 (handle_query): Adjust to use ptids. Parse GDB's qSupported
112 features. Handle and report "multiprocess+". Handle
114 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
116 (handle_v_kill): New.
117 (handle_v_stopped): Adjust to use target_pid_to_str.
118 (handle_v_requests): Allow multiple attaches and runs when
119 multiprocess extensions are in effect. Handle "vKill".
120 (myresume): Adjust to use ptids.
121 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
122 (handle_status): Adjust to discard_queued_stop_replies interface
124 (first_thread_of, kill_inferior_callback)
125 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
126 (main): Call initialize_inferiors. Adjust to use ptids, killing
127 and detaching from all inferiors. Handle multiprocess packet
129 * linux-low.h: Include gdb_proc_service.h.
130 (struct process_info_private): New.
131 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
132 <lwpid_of>: Use ptid_get_lwp.
133 (get_lwp_thread): Adjust.
134 (struct lwp_info): Add `dead' member.
135 (find_lwp_pid): Declare.
136 * linux-low.c (thread_db_active): Delete.
137 (new_inferior): Adjust comment.
138 (inferior_pid): Delete.
139 (linux_add_process): New.
140 (handle_extended_wait): Adjust.
141 (add_lwp): Change unsigned long to ptid.
142 (linux_create_inferior): Add process to processes table. Adjust
143 to use ptids. Don't set new_inferior here.
144 (linux_attach_lwp): Rename to ...
145 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
146 it. Adjust to use ptids.
147 (linux_attach_lwp): New.
148 (linux_attach): Add process to processes table. Don't set
150 (struct counter): New.
151 (second_thread_of_pid_p, last_thread_of_process_p): New.
152 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
154 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
155 processes. Remove process from process table.
156 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
157 to multiple processes.
158 (any_thread_of): New.
159 (linux_detach): Add `pid' argument, and handle it. Remove process
160 from processes table.
161 (linux_join): Add `pid' argument. Handle it.
162 (linux_thread_alive): Change unsighed long argument to ptid_t.
163 Consider dead lwps as not being alive.
164 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
165 threads we're not interested in.
166 (same_lwp, find_lwp_pid): New.
167 (linux_wait_for_lwp): Change `pid' argument's type from int to
169 (linux_wait_for_event): Rename to ...
170 (linux_wait_for_event_1): ... this. Change `pid' argument's type
171 from int to ptid_t. Adjust.
172 (linux_wait_for_event): New.
173 (linux_wait_1): Add `ptid' argument. Change return type to
174 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
175 that exit from the process table.
176 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
178 (mark_lwp_dead): New.
179 (wait_for_sigstop): Adjust to use ptids. If a process exits while
180 stopping all threads, mark its main lwp as dead.
181 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
183 (fetch_register, usr_store_inferior_registers)
184 (regsets_fetch_inferior_registers)
185 (regsets_store_inferior_registers, linux_read_memory)
186 (linux_write_memory): Inline `inferior_pid'.
187 (linux_look_up_symbols): Adjust to use per-process
189 (linux_request_interrupt): Adjust to use ptids.
190 (linux_read_auxv): Inline `inferior_pid'.
191 (initialize_low): Don't reference thread_db_active.
192 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
193 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
194 (ps_getpid): Return the pid of the current inferior.
195 * thread-db.c (proc_handle, thread_agent): Delete.
196 (thread_db_create_event, thread_db_enable_reporting): Adjust to
198 (find_one_thread): Change argument type to ptid_t. Adjust to
200 (maybe_attach_thread): Adjust to per-process data and ptids.
201 (thread_db_find_new_threads): Ditto.
202 (thread_db_init): Ditto.
203 * spu-low.c (spu_create_inferior, spu_attach): Add process to
204 processes table. Adjust to use ptids.
205 (spu_kill, spu_detach): Adjust interface. Remove process from
207 (spu_join, spu_thread_alive): Adjust interface.
208 (spu_wait): Adjust interface. Remove process from processes
209 table. Adjust to use ptids.
210 * win32-low.c (current_inferior_tid): Delete.
211 (current_inferior_ptid): New.
212 (debug_event_ptid): New.
213 (thread_rec): Take a ptid. Adjust.
214 (child_add_thread): Add `pid' argument. Adjust to use ptids.
215 (child_delete_thread): Ditto.
216 (do_initial_child_stuff): Add `attached' argument. Add process to
218 (child_fetch_inferior_registers, child_store_inferior_registers):
220 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
221 (win32_attach): Pass 1 to do_initial_child_stuff.
222 (win32_kill): Adjust interface. Remove process from processes
224 (win32_detach): Ditto.
225 (win32_join): Adjust interface.
226 (win32_thread_alive): Take a ptid.
227 (win32_resume): Adjust to use ptids.
228 (get_child_debug_event): Ditto.
229 (win32_wait): Adjust interface. Remove exiting process from
232 2009-04-01 Pedro Alves <pedro@codesourcery.com>
234 Non-stop mode support.
236 * server.h (non_stop): Declare.
237 (gdb_client_data, handler_func): Declare.
238 (delete_file_handler, add_file_handler, start_event_loop):
240 (handle_serial_event, handle_target_event, push_event)
241 (putpkt_notif): Declare.
242 * target.h (enum resume_kind): New.
243 (struct thread_resume): Replace `step' field by `kind' field.
244 (TARGET_WNOHANG): Define.
245 (struct target_ops) <wait>: Add `options' argument.
246 <supports_non_stop, async, start_non_stop>: New fields.
247 (target_supports_non_stop, target_async): New.
248 (start_non_stop): Declare.
249 (mywait): Add `options' argument.
250 * target.c (mywait): Add `options' argument. Print child exit
252 (start_non_stop): New.
253 * server.c (non_stop, own_buf, mem_buf): New globals.
254 (struct vstop_notif): New.
255 (notif_queue): New global.
256 (queue_stop_reply, push_event, discard_queued_stop_replies)
257 (send_next_stop_reply): New.
258 (start_inferior): Adjust to use resume_kind. Adjust to mywait
260 (attach_inferior): In non-stop mode, don't wait for the target
262 (handle_general_set): Handle QNonStop.
263 (handle_query): When handling qC, return the current general
264 thread, instead of the first thread of the list.
265 (handle_query): If the backend supports non-stop mode, include
266 QNonStop+ in the qSupported query response.
267 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
269 (handle_v_attach, handle_v_run): Handle non-stop mode.
270 (handle_v_stopped): New.
271 (handle_v_requests): Report support for vCont;t. Handle vStopped.
272 (myresume): Adjust to use resume_kind. Handle non-stop.
273 (queue_stop_reply_callback): New.
274 (handle_status): Handle non-stop mode.
275 (main): Clear non_stop flag on reconnection. Use the event-loop.
276 Refactor serial protocol handling from here ...
277 (process_serial_event): ... to this new function. When GDB
278 selects any thread, select one here. In non-stop mode, wait until
279 GDB acks all pending events before exiting.
280 (handle_serial_event, handle_target_event): New.
281 * remote-utils.c (remote_open): Install remote_desc in the event
283 (remote_close): Remove remote_desc from the event loop.
284 (putpkt_binary): Rename to...
285 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
286 (putpkt_binary): New as wrapper around putpkt_binary_1.
288 (prepare_resume_reply): In non-stop mode, don't change the
291 * Makefile.in (OBJ): Add event-loop.o.
292 (event-loop.o): New rule.
294 * linux-low.h (pid_of): Moved here.
296 (get_lwp_thread): Use lwpid_of.
297 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
298 * linux-low.c (pid_of): Delete.
299 (inferior_pid): Use lwpid_of.
300 (linux_event_pipe): New.
301 (target_is_async_p): New.
303 (handle_extended_wait): Use lwpid_of.
304 (add_lwp): Don't set lwpid field.
305 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
306 (linux_kill_one_lwp): If killing a running lwp, stop it first.
307 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
308 (linux_detach_one_lwp): If detaching from a running lwp, stop it
309 first. Adjust to linux_wait_for_event interface changes. Use
311 (linux_detach): Don't delete the main lwp here.
312 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
313 (status_pending_p): Don't consider explicitly suspended lwps.
314 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
315 pointer. Add OPTIONS argument. Change return type to int. Use
316 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
317 (linux_wait_for_event): Take an integer pid instead of a lwp_info
318 pointer. Add status pointer argument. Return a pid instead of a
319 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
320 changes. In non-stop mode, don't switch to a random thread.
321 (linux_wait): Rename to...
322 (linux_wait_1): ... this. Add target_options argument, and handle
323 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
324 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
325 clean exit and signal exit code. Don't stop all threads in
326 non-stop mode. In all-stop mode, only stop all threads when
327 reporting a stop to GDB. Handle explicit thread stop requests.
328 (async_file_flush, async_file_mark): New.
330 (send_sigstop): Use lwpid_of.
331 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
332 interface changes. In non-stop mode, don't switch to a random
334 (linux_resume_one_lwp): Use lwpid_of.
335 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
336 (linux_resume_one_thread): ... this. Handle resume_stop. In
337 non-stop mode, don't look for pending flag in all threads.
338 (resume_status_pending_p): Don't consider explicitly suspended
340 (my_waitpid): Reimplement. Emulate __WALL.
341 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
343 (sigchld_handler, linux_supports_non_stop, linux_async)
344 (linux_start_non_stop): New.
345 (linux_target_ops): Register linux_supports_non_stop, linux_async
346 and linux_start_non_stop.
347 (initialize_low): Install SIGCHLD handler.
348 * thread-db.c (thread_db_create_event, find_one_thread)
349 (thread_db_get_tls_address): Use lwpid_of.
350 * win32-low.c (win32_detach): Adjust to use resume_kind.
351 (win32_wait): Add `options' argument.
352 * spu-low.c (spu_resume): Adjust to use resume_kind.
353 (spu_wait): Add `options' argument.
355 2009-04-01 Pedro Alves <pedro@codesourcery.com>
357 Decouple target code from remote protocol.
359 * target.h (enum target_waitkind): New.
360 (struct target_waitstatus): New.
361 (struct target_ops) <wait>: Return an unsigned long. Take a
362 target_waitstatus pointer instead of a char pointer.
364 * target.c (mywait): Change prototype to return an unsigned long.
365 Take a target_waitstatus pointer instead of a char pointer. Adjust.
366 * server.h (thread_from_wait, old_thread_from_wait): Delete
368 (prepare_resume_reply): Change prototype to take a
370 * server.c (thread_from_wait, old_thread_from_wait): Delete.
371 (last_status, last_ptid): New.
372 (start_inferior): Remove "statusptr" argument. Adjust. Return a
373 pid instead of a signal.
374 (attach_inferior): Remove "status" and "signal" parameters.
376 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
378 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
379 (handle_v_requests, myresume): Remove "status" and "signal"
381 (handle_status): New.
382 (main): Delete local `status'. Adjust.
383 * remote-utils.c: Include target.h.
384 (prepare_resume_reply): Change prototype to take a
385 target_waitstatus. Adjust.
387 * linux-low.c (linux_wait): Adjust to new target_ops->wait
389 * spu-low.c (spu_wait): Adjust.
390 * win32-low.c (enum target_waitkind, struct target_waitstatus):
392 (win32_wait): Adjust.
394 2009-04-01 Pedro Alves <pedro@codesourcery.com>
396 * target.h (struct thread_resume): Delete leave_stopped member.
397 (struct target_ops): Add a `n' argument to the `resume' callback.
398 * server.c (start_inferior): Adjust.
399 (handle_v_cont, myresume): Adjust.
400 * linux-low.c (check_removed_breakpoint): Adjust to resume
401 interface change, and to removed leave_stopped field.
402 (resume_ptr): Delete.
403 (struct thread_resume_array): New.
404 (linux_set_resume_request): Add new `arg' parameter. Adjust to
405 resume interface change.
406 (linux_continue_one_thread, linux_queue_one_thread)
407 (resume_status_pending_p): Check if the resume field is NULL
408 instead of checking the leave_stopped member.
409 (linux_resume): Adjust to the target resume interface change.
410 * spu-low.c (spu_resume): Adjust to the target resume interface
412 * win32-low.c (win32_detach, win32_resume): Ditto.
414 2009-04-01 Pedro Alves <pedro@codesourcery.com>
416 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
418 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
420 (linux_continue_one_thread): Only preserve the stepping flag if
421 there's a pending breakpoint.
423 2009-03-31 Pedro Alves <pedro@codesourcery.com>
425 * server.c (main): After the inferior having exited, call
426 remote_close before exiting gdbserver.
428 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
430 Fix size of FPSCR in Power 7 processors.
431 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
432 (PPC_FEATURE_HAS_DFP): New #define.
433 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
436 2009-03-23 Pedro Alves <pedro@codesourcery.com>
438 * server.c (handle_query) Whitespace and formatting.
440 2009-03-22 Pedro Alves <pedro@codesourcery.com>
442 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
443 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
444 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
445 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
446 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
447 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
448 Makefile.in, configure.ac: Fix whitespace throughout.
449 * configure: Regenerate.
451 2009-03-22 Pedro Alves <pedro@codesourcery.com>
453 * inferiors.c (find_inferior): Make it safe for the callback
454 function to delete the currently iterated inferior.
456 2009-03-22 Pedro Alves <pedro@codesourcery.com>
458 * Makefile.in (linuw_low_h): Move higher.
459 (thread-db.o): Depend on $(linux_low_h).
461 2009-03-17 Pedro Alves <pedro@codesourcery.com>
463 Rename "process" to "lwp" throughout.
465 * linux-low.c (all_processes): Rename to...
466 (all_lwps): ... this.
467 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
468 (add_process): Rename to ...
469 (add_lwp): ... this. Adjust.
470 (linux_create_inferior): Adjust.
471 (linux_attach_lwp): Adjust.
472 (linux_attach): Adjust.
473 (linux_kill_one_process): Rename to ...
474 (linux_kill_one_lwp): ... this. Adjust.
475 (linux_kill): Adjust.
476 (linux_detach_one_process): Rename to ...
477 (linux_detach_one_lwp): ... this. Adjust.
478 (linux_detach): Adjust.
479 (check_removed_breakpoint): Adjust.
480 (status_pending_p): Adjust.
481 (linux_wait_for_process): Rename to ...
482 (linux_wait_for_lwp): ... this. Adjust.
483 (linux_wait_for_event): Adjust.
484 (send_sigstop): Adjust.
485 (wait_for_sigstop): Adjust.
486 (stop_all_processes): Rename to ...
487 (stop_all_lwps): ... this.
488 (linux_resume_one_process): Rename to ...
489 (linux_resume_one_lwp): ... this. Adjust.
490 (linux_set_resume_request, linux_continue_one_thread)
491 (linux_queue_one_thread, resume_status_pending_p)
492 (usr_store_inferior_registers, regsets_store_inferior_registers)
493 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
495 * linux-low.h (get_process): Rename to ...
496 (get_lwp): ... this. Adjust.
497 (get_thread_process): Rename to ...
498 (get_thread_lwp): ... this. Adjust.
499 (get_process_thread): Rename to ...
500 (get_lwp_thread): ... this. Adjust.
501 (struct process_info): Rename to ...
502 (struct lwp_info): ... this.
503 (all_processes): Rename to ...
504 (all_lwps): ... this.
505 * proc-service.c (ps_lgetregs): Adjust.
506 * thread-db.c (thread_db_create_event, find_one_thread)
507 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
509 2009-03-14 Pedro Alves <pedro@codesourcery.com>
511 * server.c (handle_query): Handle "qAttached".
513 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
515 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
516 GPLv3, update license URL.
518 2009-03-01 Doug Evans <dje@google.com>
520 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
521 (server_h): Add gdb_signals.h.
523 * server.h (target_signal_from_host,target_signal_to_host_p)
524 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
526 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
528 * remote-utils.c (getpkt): Also generate remote-debug
529 information if noack_mode is set.
531 2009-02-06 Pedro Alves <pedro@codesourcery.com>
533 * server.c (handle_query): Report qXfer:siginfo:read and
534 qXfer:siginfo:write as supported and handle them.
535 * target.h (struct target_ops) <qxfer_siginfo>: New field.
536 * linux-low.c (linux_xfer_siginfo): New.
537 (linux_target_ops): Set it.
539 2009-01-26 Pedro Alves <pedro@codesourcery.com>
541 * server.c (gdbserver_usage): Mention --remote-debug.
542 (main): Accept '--remote-debug' switch.
544 2009-01-18 Doug Evans <dje@google.com>
546 * regcache.c (new_register_cache): No need to check result of xcalloc.
547 * server.c (handle_search_memory): Back out calls to xmalloc,
548 result is checked and error is returned to user upon failure.
549 (handle_query): Ditto. Add more checks for result of malloc.
550 (handle_v_cont): Check result of malloc, report error back to
552 (handle_v_run): Ditto. Call freeargv.
553 * server.h (freeargv): Declare.
554 * utils.c (freeargv): New fn.
556 2009-01-15 Doug Evans <dje@google.com>
558 * gdbreplay.c (perror_with_name): Make arg const char *.
559 * server.h (target_signal_to_name): Make return type const char *.
560 * thread-db.c (thread_db_err_str): Make return type const char *.
561 * utils.c (perror_with_name): Make arg const char *.
563 2009-01-14 Pedro Alves <pedro@codesourcery.com>
565 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
566 when handling a EXIT_PROCESS_DEBUG_EVENT.
568 2009-01-06 Joel Brobecker <brobecker@adacore.com>
570 * gdbreplay.c (gdbreplay_version): Update copyright year.
571 * server.c (gdbserver_version): Likewise.
573 2009-01-05 Doug Evans <dje@google.com>
575 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
576 (handle_extended_wait): Improve comment.
578 2008-12-13 Doug Evans <dje@google.com>
580 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
581 * server.h (ATTR_MALLOC): New macro.
582 (xmalloc,xcalloc,xstrdup): Declare.
583 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
584 * inferiors.c: Ditto.
585 * linux-low.c: Ditto.
586 * mem-break.c: Ditto.
588 * remote-utils.c: Ditto.
591 * win32-low.c: Ditto.
593 2008-12-12 Doug Evans <dje@google.com>
595 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
598 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
600 2008-12-09 Doug Evans <dje@google.com>
602 * linux-low.h (struct process_info): Delete member tid, unused.
603 * thread-db.c (find_one_thread): Update.
604 (maybe_attach_thread): Update.
606 2008-12-02 Pedro Alves <pedro@codesourcery.com>
608 * target.h (struct target_ops): Add qxfer_osdata member.
609 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
611 (linux_qxfer_osdata): New functions.
612 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
614 * server.c (handle_query): Handle "qXfer:osdata:read:".
615 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
616 (buffer_xml_printf): New functions.
617 * server.h (struct buffer): New.
618 (buffer_grow_str, buffer_grow_str0): New macros.
619 (buffer_grow, buffer_free, buffer_init, buffer_finish)
620 (buffer_xml_printf): Declare.
622 2008-11-24 Doug Evans <dje@google.com>
624 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
626 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
628 * server.c (handle_v_run): Always use the supplied argument list.
630 2008-11-19 Bob Wilson <bob.wilson@acm.org>
632 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
633 (xtensa_regmap_table): Add entry for scompare1.
635 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
637 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
638 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
639 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
640 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
641 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
642 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
643 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
644 XML target descriptions.
645 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
646 when inferior is running on an ISA 2.05 or later processor. Add
647 special case to return offset for full 64-bit slot of FPSCR when
650 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
652 * Makefile.in (SFILES, clean): Added sparc64 files.
653 (reg-sparc64.o, reg-sparc64.c): New.
654 * configure.srv (sparc*-*-linux*): New configuration.
655 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
656 syscall arguments for SPARC.
657 (regsets_store_inferior_registers): Likewise.
658 * linux-sparc-low.c: New file.
660 2008-10-21 Doug Evans <dje@google.com>
662 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
663 (READLINE_DIR,READLINE_DEP): Delete.
664 (INTERNAL_CFLAGS): Update.
667 2008-10-10 Pedro Alves <pedro@codesourcery.com>
669 * server.c (handle_v_run): If GDB didn't specify an argv, use the
670 whole argv from the last run, not just argv[0].
672 2008-09-08 Pedro Alves <pedro@codesourcery.com>
674 * regcache.c (new_register_cache): Return NULL if the register
675 cache size isn't known yet.
676 (free_register_cache): Avoid dereferencing a NULL regcache.
678 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
680 * configure.srv: Merge MIPS and MIPS64.
682 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
684 * Makefile.in (uninstall): Apply $(EXEEXT) too.
686 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
688 * Makefile.in: Add required vsx dependencies.
690 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
691 Declare init_registers_powerpc_vsx32l.
692 Declare init_registers_powerpc_vsx64l.
693 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
694 (ppc_arch_setup): Check for VSX in hwcap.
695 (ppc_fill_vsxregset): New function.
696 (ppc_store_vsxregset): New function.
697 Add new VSX entry in regset_info target_regsets.
699 * configure.srv: Add new VSX dependencies.
701 2008-08-12 Pedro Alves <pedro@codesourcery.com>
703 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
704 (remote_open): Set or clear transport_is_reliable.
705 (putpkt_binary): Don't expect acks in noack mode.
706 (getpkt): Don't send ack/nac in noack mode.
707 * server.c (handle_general_set): Handle QStartNoAckMode.
708 (handle_query): If connected by tcp pass QStartNoAckMode+ in
710 (main): Reset noack_mode on every connection.
711 * server.h (noack_mode): Declare.
713 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
715 * Makefile.in (GDBREPLAY_OBS): New variable.
716 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
718 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
719 Daniel Jacobowitz <dan@codesourcery.com>
721 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
722 (usr_store_inferior_registers): Likewise.
723 (regsets_store_inferior_registers): Likewise.
725 2008-07-31 Rolf Jansen <rj@surtec.com>
726 Pedro Alves <pedro@codesourcery.com>
728 * configure.ac: Check for memmem declaration.
729 * server.c [HAVE_MALLOC_H]: Include malloc.h.
730 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
731 (disable_packet_qfThreadInfo): Unconditionally compile.
732 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
733 * configure, config.in: Regenerate.
735 2008-07-28 Doug Kwan <dougkwan@google.com>
737 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
738 (linux_write_memory): Remove declaration of errno.
740 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
742 * linux-low.c (handle_extended_wait): Do not use "status"
743 variable uninitialized.
745 2008-07-07 Pedro Alves <pedro@codesourcery.com>
747 * server.c (handle_v_attach): Inhibit reporting dll changes.
749 2008-06-27 Pedro Alves <pedro@codesourcery.com>
751 * remote-utils.c (prepare_resume_reply): If requested, don't
752 output "thread:TID" in the T stop reply.
754 * server.c (disable_packet_vCont, disable_packet_Tthread)
755 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
756 (handle_query): If requested, disable support for qC, qfThreadInfo
758 (handle_v_requests): If requested, disable support for vCont.
759 (gdbserver_show_disableable): New.
760 (main): Handle --disable-packet and --disable-packet=LIST.
762 * server.h (disable_packet_vCont, disable_packet_Tthread)
763 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
765 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
767 * server.c (gdbserver_usage): Mention --version.
769 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
771 * Makefile.in (gdbreplay.o): New rule.
773 2008-06-06 Joseph Myers <joseph@codesourcery.com>
775 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
776 message, not gdbserver.
778 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
779 Nathan Sidwell <nathan@codesourcery.com>
780 Joseph Myers <joseph@codesourcery.com>
782 * acinclude.m4: Include ../../config/acx.m4.
783 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
784 * configure, config.in: Regenerate.
785 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
786 * server.c (gdbserver_version): Print PKGVERSION.
787 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
788 (main): Adjust gdbserver_usage calls.
789 * gdbreplay.c (version, host_name): Add declarations.
790 (gdbreplay_version, gdbreplay_usage): New.
791 (main): Accept --version and --help options.
793 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
795 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
796 (arm_breakpoint_at): Handle Thumb.
797 (the_low_target): Add comment.
799 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
801 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
803 2008-05-09 Doug Evans <dje@google.com>
805 * server.h (decode_search_memory_packet): Declare.
806 * remote-utils.c (decode_search_memory_packet): New fn.
807 * server.c (handle_search_memory_1): New fn.
808 (handle_search_memory): New fn.
809 (handle_query): Process qSearch:memory packets.
811 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
813 * regcache.c (registers_length): Remove.
814 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
815 full register packet.
816 * regcache.h (registers_length): Remove prototype.
817 * server.h (PBUFSIZ): Define to 16384.
819 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
821 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
822 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
823 powerpc-64l.o, and powerpc-altivec64l.o.
824 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
825 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
826 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
827 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
828 rs6000/power-linux.xml, and rs6000/power64-linux.xml
831 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
832 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
833 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
834 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
835 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
836 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
837 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
838 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
839 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
840 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
843 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
844 (init_registers_powerpc_32l): ... this new prototype.
845 (init_registers_powerpc_32): Remove, replace by ...
846 (init_registers_powerpc_altivec32l): ... this new prototype.
847 (init_registers_powerpc_e500): Remove, replace by ...
848 (init_registers_powerpc_e500l): ... this new prototype.
849 (init_registers_ppc64): Remove, replace by ...
850 (init_registers_powerpc_64l): ... this new prototype.
851 (init_registers_powerpc_64): Remove, replace by ...
852 (init_registers_powerpc_altivec64l): ... this new prototype.
853 (ppc_num_regs): Set to 73.
854 (PT_ORIG_R3, PT_TRAP): Define if necessary.
855 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
856 (ppc_cannot_store_register): Handle orig_r3 and trap.
857 (ppc_arch_setup): Update init_registers_... calls.
858 (ppc_fill_gregset): Handle orig_r3 and trap.
860 * inferiors.c (clear_inferiors): Reset current_inferior.
862 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
864 * acinclude.m4: Add override.m4.
865 * configure: Regenerate.
867 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
869 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
870 initial call to init_register_ppc64.
872 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
874 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
875 powerpc*-*-linux* case.
876 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
878 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
880 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
881 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
883 * linux-ppc-low.c: Include <elf.h>.
884 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
885 (ppc_hwcap): New global variable.
886 (ppc_regmap): Remove __SPE__ #ifdef sections.
887 (ppc_regmap_e500): New global variable.
888 (ppc_cannot_store_register): Update __SPE__ special case.
889 (ppc_get_hwcap): New function.
890 (ppc_arch_setup): Use it to determine whether inferior supports
891 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
892 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
893 Do not access registers if target does not support AltiVec.
894 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
895 Do not access registers if target does not support SPE.
896 (target_regsets): Unconditionally include AltiVec and SPE regsets.
898 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
900 * linux-low.c (disabled_regsets, num_regsets): New.
901 (use_regsets_p): Delete.
902 (linux_wait_for_process): Clear disabled_regsets.
903 (regsets_fetch_inferior_registers): Check and set it.
904 (regsets_store_inferior_registers): Likewise.
905 (linux_fetch_registers, linux_store_registers): Do not use
907 (initialize_low): Allocate disabled_regsets.
909 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
911 * Makefile.in (LIBOBJS): New.
913 (memmem.o): New rule.
914 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
915 * configure: Regenerated.
917 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
919 * server.c (handle_query): Never return "unsupported" for
920 qXfer:features:read queries.
922 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
924 * server.c (get_features_xml): Fix inverted condition.
925 (handle_query): Always support qXfer:feature:read.
927 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
929 * server.c (wrapper_argv): New.
930 (start_inferior): Handle wrapper_argv. If set, expect an extra
932 (gdbserver_usage): Document --wrapper.
933 (main): Parse --wrapper.
935 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
937 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
938 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
939 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
940 (ppc_set_pc): Likewise.
941 (ppc_arch_setup): New function.
942 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
944 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
946 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
948 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
949 instead of linux-ppc64-low.o.
950 * linux-ppc64-low.c: Remove file.
951 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
952 (linux-ppc64-low.o): Remove rule.
954 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
955 (init_registers_powerpc_64): Likewise.
956 (ppc_regmap): Conditionally define depending on __powerpc64__.
957 (ppc_cannot_store_register): Do not special-case "fpscr" when
958 compiled on __powerpc64__.
959 (ppc_collect_ptrace_register): New function.
960 (ppc_supply_ptrace_register): New function.
961 (ppc_breakpoint): Change type to "unsigned int".
962 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
963 (the_low_target): Conditionally provide initializers for the
964 arch_setup member depending on __powerpc64__. Install
965 collect_ptrace_register and supply_ptrace_register members.
967 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
969 * regcache.h (gdbserver_xmltarget): Add extern declaration.
970 * server.c (gdbserver_xmltarget): Define.
971 (get_features_xml): Use it to replace "target.xml" and arch_string.
973 * configure.srv: Remove srv_xmltarget. Add XML files that were
974 mentioned there to srv_xmlfiles instead. Remove conditional tests
975 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
976 srv_xmlfiles and srv_regobj to include all possible choices.
977 * configure.ac (srv_xmltarget): Remove.
978 (srv_xmlfiles): Do not add "target.xml".
979 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
980 checks for supplementary target information.
981 * configure: Regenerate.
982 * Makefile.in (XML_TARGET): Remove.
983 (target.xml): Remove rule.
984 (clean): Do not clean up target.xml.
985 (.PRECIOUS): Do not mention target.xml.
987 * target.h (struct target_ops): Remove arch_string member.
988 * linux-low.c (linux_arch_string): Remove.
989 (linux_target_ops): Remove arch_string initializer.
990 * linux-low.h (struct linux_target_ops): Remove arch_string member.
991 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
992 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
993 * spu-low.c (spu_arch_string): Remove.
994 (spu_target_ops): Remove arch_string initializer.
995 * win32-low.c (win32_arch_string): Remove.
996 (win32_target_ops): Remove arch_string initializer.
997 * win32-low.h (struct win32_target_ops): Remove arch_string member.
998 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
999 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1001 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1003 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1004 by collect_ptrace_register and supply_ptrace_register hooks.
1005 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1006 instead of checking for the_low_target.left_pad_xfer.
1007 (usr_store_inferior_registers): Use collect_ptrace_register callback
1008 instead of checking for the_low_target.left_pad_xfer.
1010 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1011 (s390_supply_ptrace_register): Likewise.
1012 (s390_fill_gregset): Call s390_collect_ptrace_register.
1013 (the_low_target): Update.
1015 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1016 (ppc_supply_ptrace_register): Likewise.
1017 (the_low_target): Update.
1019 * linux-i386-low.c (the_low_target): Update.
1020 * linux-x86-64-low.c (the_low_target): Update.
1022 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1024 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1025 reg-s390.o and reg-s390x.o.
1027 * linux-low.c (new_inferior): New global variable.
1028 (linux_create_inferior, linux_attach): Set it.
1029 (linux_wait_for_process): Call the_low_target.arch_setup after the
1030 target has stopped for the first time.
1031 (initialize_low): Do not call the_low_target.arch_setup.
1033 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1034 (s390_set_pc): Likewise.
1035 (s390_arch_setup): New function.
1036 (the_low_target): Use s390_arch_setup as arch_setup routine.
1038 * regcache.c (realloc_register_cache): New function.
1039 (set_register_cache): Call it for each existing regcache.
1041 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1043 * server.h (init_registers): Remove prototype.
1045 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1046 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1047 instead of init_registers ().
1048 * linux-arm-low.c (init_registers_arm): Add prototype.
1049 (init_registers_arm_with_iwmmxt): Likewise.
1050 (the_low_target): Add initializer for arch_setup field.
1051 * linux-cris-low.c (init_registers_cris): Add prototype.
1052 (the_low_target): Add initializer for arch_setup field.
1053 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1054 (the_low_target): Add initializer for arch_setup field.
1055 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1056 (the_low_target): Add initializer for arch_setup field.
1057 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1058 (the_low_target): Add initializer for arch_setup field.
1059 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1060 (the_low_target): Add initializer for arch_setup field.
1061 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1062 (the_low_target): Add initializer for arch_setup field.
1063 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1064 (init_registers_mips64_linux): Likewise.
1065 (the_low_target): Add initializer for arch_setup field.
1066 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1067 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1068 (the_low_target): Add initializer for arch_setup field.
1069 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1070 (init_registers_powerpc_64): Likewise.
1071 (the_low_target): Add initializer for arch_setup field.
1072 * linux-s390-low.c (init_registers_s390): Add prototype.
1073 (init_registers_s390x): Likewise.
1074 (the_low_target): Add initializer for arch_setup field.
1075 * linux-sh-low.c (init_registers_sh): Add prototype.
1076 (the_low_target): Add initializer for arch_setup field.
1077 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1078 (the_low_target): Add initializer for arch_setup field.
1079 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1080 (the_low_target): Add initializer for arch_setup field.
1082 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1083 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1084 instead of init_registers ().
1085 * win32-arm-low.c (init_registers_arm): Add prototype.
1086 (the_low_target): Add initializer for arch_setup field.
1087 * win32-i386-low.c (init_registers_i386): Add prototype.
1088 (the_low_target): Add initializer for arch_setup field.
1090 * spu-low.c (init_registers_spu): Add prototype.
1091 (initialize_low): Call initialie_registers_spu () instead of
1092 initialize_registers ().
1094 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1096 * server.c (handle_v_requests): When handling the vRun and vAttach
1097 packets, if already debugging a process, don't kill it. Return an
1100 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1102 * server.c (handle_query): Correct length check.
1104 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1106 * win32-low.c (do_initial_child_stuff): Add process handle
1107 parameter. Set current_process_handle and current_process_id from the
1108 parameters. Clear globals.
1109 (win32_create_inferior): Don't set current_process_handle and
1110 current_process_id here. Instead pass them on the call to
1111 do_initial_child_stuff.
1112 (win32_attach): Likewise.
1113 (win32_clear_inferiors): New.
1114 (win32_kill): Don't close the current process handle or the
1115 current thread handle here. Instead call win32_clear_inferiors.
1116 (win32_detach): Don't open a new handle to the process. Call
1117 win32_clear_inferiors.
1118 (win32_join): Don't rely on current_process_handle; open a new
1119 handle using the process id.
1120 (win32_wait): Call win32_clear_inferiors when the inferior process
1123 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1125 * server.c (monitor_show_help): Add "exit".
1127 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1129 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1130 (clean): Add reg-xtensa.c.
1131 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1132 * configure.srv (xtensa*-*-linux*) New target.
1133 * linux-xtensa-low.c: New.
1134 * xtensa-xtregs.c: New.
1136 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1138 * hostio.c: Don't include errno.h.
1139 (errno_to_fileio_errno): Move to hostio-errno.
1140 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1141 error number outputting to the target->hostio_last_error callback.
1142 (hostio_packet_error): Use FILEIO_EINVAL directly.
1143 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1144 calls to hostio_error.
1145 * hostio-errno.c: New.
1146 * server.h (hostio_last_error_from_errno): Declare.
1147 * target.h (target_ops): Add hostio_last_error member.
1148 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1149 as hostio_last_error handler.
1150 * spu-low.c (spu_target_ops): Likewise.
1151 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1152 (wince_hostio_last_error): New functions.
1153 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1154 as hostio_last_error handler.
1155 (win32_target_ops) [!_WIN32_WCE]: Register
1156 hostio_last_error_from_errno as hostio_last_error handler.
1157 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1158 (hostio-errno.o): New rule.
1159 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1160 * configure.srv (srv_hostio_err_objs): New variable. Default to
1162 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1163 * configure: Regenerate.
1165 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1167 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1168 (linux_kill, linux_detach): Clean up the process list.
1169 * remote-utils.c (remote_open): Improve port number parsing.
1170 (putpkt_binary, input_interrupt): Only send interrupts if the target
1172 * server.c (extended_protocol): Make static.
1173 (attached): Define earlier.
1174 (exit_requested, response_needed, program_argv): New variables.
1175 (target_running): New.
1176 (start_inferior): Clear attached here.
1177 (attach_inferior): Set attached here.
1178 (require_running): Define.
1179 (handle_query): Use require_running and target_running. Implement
1181 (handle_v_attach, handle_v_run): New.
1182 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1183 (gdbserver_usage): Update.
1184 (main): Redo argument parsing. Handle --debug and --multi. Handle
1185 --attach along with other options or after the port. Save
1186 program_argv. Support no initial program. Resynchronize
1187 communication with GDB after an error. Handle "monitor exit".
1188 Use require_running and target_running. Always allow the extended
1189 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1190 restart in extended mode.
1191 * README: Refer to the GDB manual. Update --attach usage.
1193 2007-12-20 Andreas Schwab <schwab@suse.de>
1195 * linux-low.c (STACK_SIZE): Define.
1196 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1197 (linux_test_for_tracefork): Likewise.
1199 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1201 * linux-low.c (linux_wait_for_event): Update messages. Do not
1202 reinsert auto-delete breakpoints.
1203 * mem-break.c (struct breakpoint): Change return type of handler to
1205 (set_breakpoint_at): Update handler type.
1206 (reinsert_breakpoint_handler): Return 1 instead of calling
1208 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1210 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1211 * mem-break.h (set_breakpoint_at): Update handler type.
1212 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1213 * win32-low.c (auto_delete_breakpoint): New.
1214 (get_child_debug_event): Use it.
1216 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1218 * configure.ac: Check for pread and pwrite.
1219 * hostio.c (handle_pread): Fall back to lseek and read.
1220 (handle_pwrite): Fall back to lseek and write.
1221 * config.in, configure: Regenerated.
1223 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1225 * server.c (myresume): Add own_buf argument.
1226 (main): Update calls.
1228 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1230 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1231 * remote-utils.c (remote_open): Do not call disable_async_io.
1232 (block_async_io): Delete.
1233 (unblock_async_io): Make static.
1234 (initialize_async_io): New.
1235 * server.c (handle_v_cont): Handle async I/O here.
1236 (myresume): Likewise. Move other common resume tasks here...
1237 (main): ... from here. Call initialize_async_io. Disable async
1238 I/O before the main loop.
1239 * server.h (initialize_async_io): Declare.
1240 (block_async_io, unblock_async_io): Delete prototypes.
1241 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1243 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1245 * remote-utils.c (readchar): Allow binary data in received messages.
1247 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1249 * win32-low.c (attaching): New global.
1250 (win32_create_inferior): Clear the `attaching' global.
1251 (win32_attach): Set the `attaching' global.
1252 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1253 attaching. Only set a breakpoint at the entry point if not
1256 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1258 * server.c (main): Don't report dll events on the initial
1259 connection on attaches.
1261 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1263 * server.c (main): Relax numerical bases supported for the pid of
1264 the --attach command line argument.
1266 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1268 * win32-low.c (win32_attach): Call OpenProcess before
1269 DebugActiveProcess, not after. Add last error output to error
1272 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1274 * win32-low.c (win32_get_thread_context)
1275 (win32_set_thread_context): New functions.
1276 (thread_rec): Use win32_get_thread_context.
1277 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1278 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1281 2007-12-03 Leo Zayas
1282 Pedro Alves <pedro_alves@portugalmail.pt>
1284 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1286 (child_add_thread): Minor cleanup.
1287 (child_continue): Resume artificially suspended threads before
1288 calling ContinueDebugEvent.
1289 (suspend_one_thread): New.
1290 (fake_breakpoint_event): New.
1291 (get_child_debug_event): Change return type to int. Check here if
1292 gdb sent an interrupt request. If a soft interrupt was requested,
1293 fake a breakpoint event. Return 0 if there is no event to handle,
1295 (win32_wait): Don't check here if gdb sent an interrupt request.
1296 Ensure there is a valid event to handle.
1297 (win32_request_interrupt): Add soft interruption method as last
1300 2007-12-03 Leo Zayas
1301 Pedro Alves <pedro_alves@portugalmail.pt>
1303 * win32-low.h (win32_thread_info): Add descriptions to the
1304 structure members. Replace `suspend_count' counter by a
1306 * win32-low.c (thread_rec): Update condition of when to get the
1307 context from the inferior. Rely on ContextFlags being set if it
1308 has already been retrieved. Only suspend the inferior thread if
1309 we haven't already. Warn if that fails.
1310 (continue_one_thread): s/suspend_count/suspended/. Only call
1311 ResumeThread once. Warn if that fails.
1313 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1315 * win32-low.c (win32_wait): Don't read from the inferior when it
1318 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1320 * Makefile.in (win32_low_h): New variable.
1321 (win32-low.o): Add dependency on $(win32_low_h).
1322 (win32-arm-low.o, win32-i386-low.o): New rules.
1324 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1326 * hostio.c: Correct copyright year.
1328 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1330 * Makefile.in (OBS): Add hostio.o.
1331 (hostio.o): New rule.
1332 * server.h (handle_vFile): Declare.
1333 * hostio.c: New file.
1334 * server.c (handle_v_requests): Take packet_len and new_packet_len
1335 for binary packets. Call handle_vFile.
1336 (main): Update call to handle_v_requests.
1338 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1340 * linux-low.c: Include <sched.h>.
1342 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1344 * linux-low.c (linux_tracefork_grandchild): New.
1345 (linux_tracefork_child): Use clone.
1346 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1348 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1350 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1352 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1354 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1356 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1358 * inferiors.c (change_inferior_id): Delete.
1359 (add_pid_to_list, pull_pid_from_list): New.
1360 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1361 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1362 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1363 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1364 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1365 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1366 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1367 (using_threads): Always set to 1.
1368 (handle_extended_wait): New.
1369 (add_process): Do not set TID.
1370 (linux_create_inferior): Set must_set_ptrace_flags.
1371 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1372 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1373 (linux_thread_alive): Rename TID argument to LWPID.
1374 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1375 (linux_wait_for_event): Do not use TID or check using_threads. Update
1376 call to dead_thread_notify. Call handle_extended_wait.
1377 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1378 (send_sigstop): Delete sigstop_sent.
1379 (wait_for_sigstop): Avoid TID.
1380 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1381 (linux_test_for_tracefork): New.
1382 (linux_lookup_signals): Use thread_db_active and
1383 linux_supports_tracefork_flag.
1384 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1385 * linux-low.h (get_process_thread): Avoid TID.
1386 (struct process_ifo): Move thread_known and tid to the end. Remove
1388 (linux_attach_lwp, thread_db_init): Update prototypes.
1389 * server.h (change_inferior_id): Delete prototype.
1390 (add_pid_to_list, pull_pid_from_list): New prototypes.
1391 * thread-db.c (thread_db_use_events): New.
1392 (find_first_thread): Rename to...
1393 (find_one_thread): ...this. Update callers and messages. Do not
1394 call fatal. Check thread_db_use_events. Do not call
1395 change_inferior_id or new_thread_notify.
1396 (maybe_attach_thread): Update. Do not call new_thread_notify.
1397 (thread_db_init): Set thread_db_use_events. Check use_events.
1398 * utils.c (fatal, warning): Correct message prefix.
1400 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1402 * Makefile.in (clean): Remove new files.
1403 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1404 (powerpc-64.o, powerpc-64.c): New rules.
1405 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1406 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1408 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1410 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1411 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1412 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1413 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1414 (target_regsets): Add AltiVec and SPE register sets.
1415 * configure.ac: Check for AltiVec and SPE.
1416 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1417 (ppc_fill_vrregset, ppc_store_vrregset): New.
1418 (target_regsets): Add AltiVec register set.
1419 * configure: Regenerated.
1421 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1423 * linux-low.c (O_LARGEFILE): Define.
1424 (linux_read_memory): Use /proc/PID/mem.
1425 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1426 * configure, config.in: Regenerated.
1428 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1430 * linux-low.c (linux_wait_for_event): Do not pass signals while
1433 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1435 * win32-low.c (create_process): New.
1436 (win32_create_inferior): Use create_process instead of
1437 CreateProcess. If create_process failed retry appending an ".exe"
1438 suffix. Store the GetLastError result immediatelly after
1439 create_process calls and use it on the call to error.
1441 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1443 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1445 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1447 * configure.ac: Switch license to GPLv3.
1449 2007-08-01 Michael Snyder <msnyder@access-company.com>
1451 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1453 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1455 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1457 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1458 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1459 CloseToolhelp32Snapshot.
1460 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1461 CloseToolhelp32Snapshot.
1463 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1465 * server.c (main): Check for inferior exit before main loop.
1467 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1469 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1470 instead of on tmp_desc.
1472 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1473 Daniel Jacobowitz <dan@codesourcery.com>
1475 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1476 (add_thread): Minor cleanups.
1477 (clear_inferiors): Move lower in the file. Clear the DLL
1479 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1480 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1481 (xml_escape_text): New.
1482 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1484 (handle_v_cont): Report errors.
1485 (gdbserver_version): Update.
1486 (main): Correct size of own_buf. Do not report initial DLL events.
1487 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1488 (unloaded_dll, xml_escape_text): New.
1489 * win32-low.c (enum target_waitkind): Update comments.
1490 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1491 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1492 (win32_EnumProcessModules, win32_GetModuleInformation)
1493 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1494 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1495 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1496 (win32_Module32First, win32_Module32Next, load_toolhelp)
1497 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1498 (get_child_debug_event): Handle DLL events.
1499 (win32_wait): Likewise.
1501 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1503 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1504 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1506 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1508 * win32-low.c (handle_output_debug_string): Ignore event if not
1511 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1513 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1515 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1517 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1519 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1521 * inferiors.c (change_inferior_id): Add comment.
1522 * linux-low.c (check_removed_breakpoint): Add an early
1523 prototype. Improve debug output.
1524 (linux_attach): Doc update.
1525 (linux_detach_one_process, linux_detach): Clean up before releasing
1527 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1528 * linux-low.h (struct process_info): Doc improvement.
1529 * mem-break.c (delete_all_breakpoints): New.
1530 * mem-break.h (delete_all_breakpoints): New prototype.
1531 * thread-db.c (find_first_thread): New.
1532 (thread_db_create_event): Call it instead of
1533 thread_db_find_new_threads. Clean up unused variables.
1534 (maybe_attach_thread): Remove first thread handling.
1535 (thread_db_find_new_threads): Use find_first_thread.
1536 (thread_db_get_tls_address): Likewise.
1538 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1540 * thread-db.c (thread_db_find_new_threads): Add prototype.
1541 (thread_db_create_event): Check for the main thread before adding
1543 (maybe_attach_thread): Only enable event reporting if TID == 0.
1544 (thread_db_get_tls_address): Check for new threads.
1546 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1548 * linux-low.c (linux_create_inferior): Try execv before execvp.
1549 * spu-low.c (spu_create_inferior): Likewise.
1551 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1553 * linux-low.c (linux_create_inferior): Change execv to execvp.
1554 * spu-low.c (spu_create_inferior): Likewies.
1556 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1558 * Makefile.in (clean): Clean new files instead of deleted ones.
1559 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1560 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1562 * configure.srv: Specify XML files and new regformats for MIPS and
1564 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1565 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1566 an entry for the restart register.
1567 (mips_cannot_fetch_register, mips_cannot_store_register)
1568 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1569 register names to match the XML descriptions.
1570 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1571 restart register instead of $0.
1573 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1574 Markus Deuling <deuling@de.ibm.com>
1576 * remote-utils.c (decode_xfer_write): New function.
1577 * server.h (decode_xfer_write): Add prototype.
1578 * server.c (handle_query): Add PACKET_LEN argument. Support
1579 qXfer:spu:read and qXfer:spu:write packets.
1580 (main): Pass packet_len to handle_query.
1581 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1582 * target.h (target_ops): Add qxfer_spu.
1584 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1586 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1587 accessing non-seekable spufs files.
1589 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1591 * server.c (handle_query): Add reply for qC packet.
1593 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1594 Leo Zayas <lerele@champenstudios@com>
1596 * server.h (check_remote_input_interrupt_request): New function.
1597 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1598 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1599 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1600 (check_remote_input_interrupt_request): New function.
1601 * server.h (check_remote_input_interrupt_request): Declare.
1602 * win32-low.c (winapi_DebugBreakProcess,
1603 winapi_GenerateConsoleCtrlEvent): New typedefs.
1604 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1606 (win32_wait): Check for remote interrupt request
1607 with check_remote_input_interrupt_request.
1608 (win32_request_interrupt): New function.
1609 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1613 * win32-low.c (debug_registers_changed,
1614 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1615 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1616 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1617 (thread_rec): Get context using the low target.
1618 (child_add_thread): Call thread_added on the low target,
1619 which does the same thing.
1621 (do_initial_child_stuff): Remove debug registers references.
1622 Set context using the low target. Resume threads after
1623 setting the contexts.
1624 (child_continue): Remove dead variable. Remove debug
1625 registers references.
1626 (child_fetch_inferior_registers): Go through the low target.
1627 (do_child_store_inferior_registers): Remove.
1628 (child_store_inferior_registers): Go through the low target.
1629 (win32_resume): Remove debug registers references.
1630 Set context using the low target.
1631 (handle_exception): Change return type to void. Don't record
1632 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1633 first chance exception.
1634 (get_child_debug_event): Change return type to void. Remove
1635 goto loop. Always return after waiting for debug event.
1636 (win32_wait): Convert to switch statement. Handle spurious
1639 * win32-i386-low.c (debug_registers_changed,
1640 debug_registers_used): New.
1641 (initial_stuff): Rename to ...
1642 (i386_initial_stuff): ... this. Clear debug registers
1644 (store_debug_registers): Delete.
1645 (i386_get_thread_context): New.
1646 (load_debug_registers): Delete.
1647 (i386_set_thread_context): New.
1648 (i386_thread_added): New.
1649 (single_step): Rename to ...
1650 (i386_single_step): ... this.
1651 (do_fetch_inferior_registers): Rename to ...
1652 (i386_fetch_inferior_register): ... this.
1653 (i386_store_inferior_register): New.
1654 (the_low_target): Adapt to new interface.
1656 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1657 (arm_get_thread_context): New.
1658 (arm_set_thread_context): New.
1660 (do_fetch_inferior_registers): Rename to ...
1661 (arm_fetch_inferior_register): ... this.
1662 (arm_store_inferior_register): New.
1663 (arm_wince_breakpoint): Reimplement as unsigned long.
1664 (arm_wince_breakpoint_len): Define.
1665 (the_low_target): Adapt to new interface.
1667 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1668 load_debug_registers. Add get_thread_context, set_thread_context,
1669 thread_added and store_inferior_register. Rename
1670 fetch_inferior_registers to fetch_inferior_register.
1671 (regptr): Remove declaration.
1673 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1675 * linux-low.c (linux_detach): Change return type to int. Return 0.
1676 * spu-low.c (spu_detach): Likewise.
1678 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1680 * target.h (target_ops): Change return type of detach to int.
1682 (join_inferior): New.
1683 * server.c (main): Don't skip detach support on mingw32.
1684 If the inferior doesn't support detaching return error.
1685 Call join_inferior instead of using waitpid.
1686 * linux-low.c (linux_join): New.
1687 (linux_target_op): Add linux_join.
1688 * spu-low.c (spu_join): New.
1689 (spu_target_ops): Add spu_join.
1690 * win32-low.c (win32_detach): Adapt to new interface.
1691 Reopen current_process_handle before detaching. Issue a child
1692 resume before detaching.
1694 (win32_target_op): Add win32_join.
1696 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1698 * win32-low.c (win32-attach): Fix return value.
1699 * target.h (target_ops): Describe ATTACH return values.
1701 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1703 * win32-low.c (GETPROCADDRESS): Define.
1704 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1705 (winapi_DebugSetProcessKillOnExit): Likewise.
1706 (win32_create_inferior): Force usage of ansi CreateProcessA.
1707 (win32_attach): Use GETPROCADDRESS.
1708 (win32_detach): Likewise.
1710 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1712 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1714 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1716 * win32-low.c: Commit leftover changes from 2007-03-29.
1718 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1720 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1721 fields short instead of int. Add explicit padding.
1722 (i387_cache_to_fsave): Remove unnecessary casts.
1723 (i387_fsave_to_cache): Doc fix.
1724 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1726 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1728 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1729 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1731 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1733 * configure.srv (arm*-*-mingw32ce*): Move near the other
1736 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1738 * configure.ac: Add errno checking.
1739 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1740 sys/file.h and malloc.h.
1741 (AC_CHECK_DECLS): Add perror.
1742 (srv_mingwce): Handle.
1743 * configure.srv (i[34567]86-*-cygwin*): Add
1744 win32-i386-low.o to srv_tgtobj.
1745 (i[34567]86-*-mingw*): Likewise.
1746 (arm*-*-mingw32ce*): Add case.
1747 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1748 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1749 [__MINGW32CE__] (strerror): New function.
1750 [__MINGW32CE__] (errno): Define to GetLastError.
1751 [__MINGW32CE__] (COUNTOF): New macro.
1752 (remote_open): Remove extra close call.
1753 * mem-break.c (delete_breakpoint_at): New function.
1754 * mem-break.h (delete_breakpoint_at): Declare.
1755 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1756 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1757 [USE_WIN32API] (read, write): Add char* casts.
1758 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1759 * server.h: Include wincecompat.h on Windows CE.
1760 [HAVE_ERRNO_H]: Check.
1761 (perror): Declare if not declared.
1762 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1763 (perror_with_name): Remove errno declaration.
1764 * wincecompat.h: New.
1765 * wincecompat.c: New.
1767 * win32-arm-low.c: New.
1768 * win32-i386-low.c: New.
1769 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1770 (OUTMSG2): Make it safe.
1772 (COUNTOF): New macro.
1773 (NUM_REGS): Get it from the low target.
1774 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1775 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1776 (thread_rec): Let low target handle debug registers.
1777 (child_add_thread): Likewise.
1778 (child_init_thread_list): Likewise.
1779 (continue_one_thread): Likewise.
1781 (do_child_fetch_inferior_registers): Move to ...
1782 * win32-i386-low.c: ... here, and rename to ...
1783 (do_fetch_inferior_registers): ... this.
1784 * win32-low.c (child_fetch_inferior_registers):
1785 Go through the low target.
1786 (do_child_store_inferior_registers): Use regptr.
1787 (strwinerror): New function.
1788 (win32_create_inferior): Handle Windows CE.
1789 Use strwinerror instead of strerror on Windows error
1790 codes. Add program to the error output.
1791 Don't close the main thread handle on Windows CE.
1792 (win32_attach): Use coredll.dll on Windows CE.
1793 (win32_kill): Close current process and current
1795 (win32_detach): Use coredll.dll on Windows CE.
1796 (win32_resume): Let low target handle debug registers, and
1798 (handle_exception): Add/Remove initial breakpoint. Avoid
1799 non-existant WSTOPSIG on Windows CE.
1800 (win32_read_inferior_memory): Cast to remove warning.
1801 (win32_arch_string): Go through the low target.
1802 (initialize_low): Call set_breakpoint_data with the low
1803 target's breakpoint.
1804 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1805 FOP_REGNUM, mappings): Move to ...
1806 * win32-i386-low.c: ... here.
1807 * win32-low.c (win32_thread_info): Move to ...
1808 * win32-low.h: ... here.
1809 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1810 win32-arm-low.c and wincecompat.c.
1811 (all:): Add $EXEEXT.
1812 (install-only:): Likewise.
1813 (gdbserver:): Likewise.
1814 (gdbreplay:): Likewise.
1815 * config.in: Regenerate.
1816 * configure: Regenerate.
1818 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1820 * win32-low.c: Rename typedef thread_info to
1821 win32_thread_info throughout.
1823 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1825 * win32-i386-low.c: Rename to ...
1826 * win32-low.c: ... this.
1827 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1828 * Makefile.in: Likewise.
1830 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1832 * remote-utils.c (monitor_output): Constify msg parameter.
1833 * server.h (monitor_output): Likewise.
1834 * win32-i386-low.c (handle_output_debug_string): New.
1835 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1836 handle_output_debug_string.
1837 (get_child_debug_event): Likewise.
1839 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1841 * server.c (main): Correct strtoul check.
1843 2007-03-27 Jon Ringle <jon@ringle.org>
1845 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1847 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1849 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1851 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1853 * terminal.h: Check HAVE_SGTTY_H.
1855 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1857 * remote-utils.c (remote_open): Print out the assigned port number.
1859 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1861 * remote-utils.c (monitor_output): New function.
1862 * server.c (debug_threads): Define here.
1863 (monitor_show_help): New function.
1864 (handle_query): Handle qRcmd.
1865 (main): Do not handle 'd' packet.
1866 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1867 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1870 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1872 * Makefile.in (EXEEXT): New.
1873 (clean): Use $(EXEEXT).
1875 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1877 * target.h (target_ops): Rename send_signal to request_interrupt,
1878 and remove enum target_signal parameter.
1879 * linux-low.c (linux_request_interrupt): Rename from
1880 linux_send_signal, and always send SIGINT.
1881 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1882 and always send SIGINT.
1883 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1885 (input_interrupt): Likewise.
1887 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1889 * server.c (get_features_xml): Check if target implemented
1891 * win32-i386-low.c (win32_arch_string): New.
1892 (win32_target_ops): Add win32_arch_string as arch_string member.
1894 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1896 * spu-low.c (spu_arch_string): New.
1897 (spu_target_ops): Add spu_arch_string.
1899 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1901 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1902 * configure.ac: Do not check for terminal.h.
1903 * configure, config.in: Regenerated.
1905 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1907 * Makefile.in (OBS): Add $(XML_BUILTIN).
1908 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1910 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1911 (arm-with-iwmmxt.c): New.
1912 * config.in, configure: Regenerate.
1913 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1914 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1915 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1916 (arm*-*-linux*): Add iWMMXt and regset support.
1917 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1918 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1919 (arm_store_wmmxregset, target_regsets): New.
1920 * server.c (get_features_xml): Take annex argument. Check builtin
1922 (handle_query): Handle multiple annexes.
1924 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1926 * remote-utils.c [USE_WIN32API] (read, write): Define.
1927 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1930 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1932 * linux-i386-low.c (the_low_target): Set arch_string.
1933 * linux-x86-64-low.c (the_low_target): Likewise.
1934 * linux-low.c (linux_arch_string): New.
1935 (linux_target_ops): Add it.
1936 * linux-low.h (struct linux_target_ops): Add arch_string.
1937 * server.c (write_qxfer_response): Use const void * for DATA.
1938 (get_features_xml): New.
1939 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1940 * target.h (struct target_ops): Add arch_string method.
1942 2007-01-03 Denis Pilat <denis.pilat@st.com>
1943 Daniel Jacobowitz <dan@codesourcery.com>
1945 * linux-low.c (linux_kill): Handle being called with no threads.
1946 * win32-i386-low.c (win32_kill): Likewise.
1947 (get_child_debug_event): Clear current_process_handle.
1949 2006-12-30 Denis PILAT <denis.pilat@st.com>
1950 Daniel Jacobowitz <dan@codesourcery.com>
1952 * remote-utils.c (remote_open): Check the type of specified
1953 serial port devices before opening them.
1954 * server.c (main): Kill the inferior if an error occurs during
1955 the first remote_open.
1957 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1959 * README: Update supported targets.
1961 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1963 * Makefile.in (clean): Remove reg-mips64.c.
1964 (reg-mips64.c, reg-mips64.o): New rules.
1965 * configure.srv: Handle mips64. Include regset support for mips.
1966 * linux-mips-low.c (union mips_register): New.
1967 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1968 (mips_breakpoint, mips_breakpoint_at): Use int.
1969 (mips_collect_register, mips_supply_register)
1970 (mips_collect_register_32bit, mips_supply_register_32bit)
1971 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1972 (mips_store_fpregset, target_regsets): New.
1973 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1975 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1977 * configure.srv: Add target "spu*-*-*".
1978 * Makefile.in (clean): Remove reg-spu.c.
1979 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1980 * spu-low.c: New file.
1982 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1984 * configure.ac: Correct td_thr_tls_get_addr test.
1985 * configure: Regenerated.
1987 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1989 * linux-low.c (linux_wait_for_event): Reformat. Use the
1991 * remote-utils.c (decode_address_to_semicolon): New.
1992 * server.c (pass_signals, handle_general_set): New.
1993 (handle_query): Mention QPassSignals for qSupported.
1994 (main): Call handle_general_set.
1995 * server.h (pass_signals, decode_address_to_semicolon): New.
1997 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1999 * server.c (handle_query): Correct error handling for read_auxv.
2001 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2003 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2004 and srv_linux_thread_db to yes.
2005 * linux-s390-low.c (s390_fill_gregset): New function.
2006 (target_regsets): Define data structure.
2008 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2010 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2011 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2012 * config.in, configure: Regenerated.
2013 * inferiors.c (gdb_id_to_thread): New function.
2014 (gdb_id_to_thread_id): Use it.
2015 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2016 * linux-low.h (struct process_info): Add th member.
2017 (thread_db_get_tls_address): New prototype.
2018 * remote-utils.c (decode_address): Make non-static.
2019 * server.c (handle_query): Handle qGetTLSAddr.
2020 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2021 * target.h (struct target_ops): Add get_tls_address.
2022 * thread-db.c (maybe_attach_thread): Save the thread handle.
2023 (thread_db_get_tls_address): New.
2025 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2027 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2028 (linux_resume_one_process): Take a siginfo_t *. Update all
2029 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2030 (struct pending_signals): Add a siginfo_t.
2031 (linux_wait_for_process): Always set last_status.
2032 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2033 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2034 * linux-low.h (struct process_info): Add last_status.
2036 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2038 * remote-utils.c (try_rle): New function.
2039 (putpkt_binary): Use it.
2041 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2043 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2044 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2045 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2046 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2047 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2050 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2052 * server.c (terminal_fd): New variable.
2053 (old_foreground_pgrp): Likewise.
2054 (restore_old_foreground_pgrp): New function.
2055 (start_inferior): Record the terminal file descriptor in terminal_fd
2056 and its original foreground group in old_foreground_pgrp. Register
2057 restore_old_foreground_pgrp with atexit().
2059 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2061 * server.c (handle_query): Correct qPart to qXfer.
2063 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2065 * configure.ac: Check for more headers which are missing on
2066 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2067 * configure.srv: Add Cygwin and mingw32.
2068 * remote-utils.c: Don't include headers unconditionally which
2069 are missing on mingw32. Include <winsock.h> for mingw32.
2070 (remote_open): Adjust for mingw32 support. Flush
2071 standard error after writing to it.
2072 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2073 (unblock_async_io, enable_async_io, disable_async_io)
2074 (readchar, getpkt): Update for Winsock support.
2075 (prepare_resume_reply): Expect a protocol signal number.
2076 * server.c: Disable <sys/wait.h> on mingw32.
2077 (start_inferior): Adjust for mingw32 support. Flush
2078 standard error after writing to it.
2079 (attach_inferior): Likewise. Use protocol signal
2081 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2083 * win32-i386-low.c: New file.
2084 * Makefile.in (XM_CLIBS): Set.
2085 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2086 (win32-i386-low.o): New dependency rule.
2087 * linux-low.c (linux_wait): Use target signal numbers.
2088 * target.h (struct target_ops): Doc fix.
2089 * server.h (target_signal_to_name): New prototype.
2090 * gdbreplay.c: Don't include headers unconditionally which
2091 are missing on mingw32. Include <winsock.h> for mingw32.
2092 (remote_close, remote_open): Adjust for Winsock support.
2093 * configure, config.in: Regenerated.
2095 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2097 * server.c (decode_xfer_read, write_qxfer_response): New.
2098 (handle_query): Take a packet length argument. Handle
2099 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2100 the qSupported response.
2101 (main): Update call to handle_query.
2103 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2105 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2106 (putpkt_binary): Renamed from putpkt and adjusted for binary
2108 (putpkt): New wrapper for putpkt_binary.
2109 (readchar): Don't mask off the high bit.
2110 (decode_X_packet): New function.
2111 * server.c (main): Call putpkt_binary if a handler sets the packet
2112 length. Save the length of the incoming packet. Handle 'X'.
2113 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2115 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2117 * server.c (handle_query): Handle qSupported.
2119 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2121 * remote-utils.c (all_symbols_looked_up): New variable.
2122 (look_up_one_symbol): Check it.
2123 * server.h (look_up_one_symbol): New declaration.
2124 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2126 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2128 * Makefile.in (linux-arm-low.o): Update dependencies.
2129 * linux-arm-low.c: Include "gdb_proc_service.h".
2130 (PTRACE_GET_THREAD_AREA): Define.
2131 (ps_get_thread_area): New function.
2133 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2135 * configure.srv (m68k*-*-uclinux*): New target.
2136 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2137 (linux_resume_one_process): Remove extraneous cast.
2138 (linux_read_offsets): New.
2139 (linux_target_op): Add linux_read_offsets on mmuless systems.
2140 * server.c (handle_query): Add qOffsets logic.
2141 * target.h (struct target_ops): Add read_offsets.
2143 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2145 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2146 (PTRACE_GET_THREAD_AREA): Define.
2147 (ps_get_thread_area): New function.
2148 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2149 (linux-x86-64-low.o): Update.
2151 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2153 * configure.ac: Remove checks for prfpregset_t.
2154 * gdb_proc_service.h: New file.
2155 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2156 new "gdb_proc_service.h".
2157 * proc-service.c: Likewise.
2158 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2159 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2160 * Makefile.in (gdb_proc_service_h): Updated.
2161 * configure, config.in: Regenerated.
2163 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2165 * remote-utils.c (prepare_resume_reply): Move declaration
2166 of gdb_id_from_wait to the top of the block.
2168 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2170 * linux-low.c (regsets_store_inferior_registers): Read the regset
2171 from the target before filling it.
2173 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2175 * server.c (attach_inferior): Return SIGTRAP for a successful
2178 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2180 * Makefile.in (OBS): Add version.o.
2181 (STAGESTUFF): Delete.
2182 (version.o): Add dependencies.
2183 (version.c): Replace rule.
2184 (clean): Remove version.c.
2185 * server.c (gdbserver_version): New.
2186 (gdbserver_usage): Use printf.
2187 (main): Handle --version and --help.
2188 * server.h (version, host_name): Add declarations.
2190 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2202 * linux-x86-64-low.c:
2205 * linux-ppc64-low.c:
2214 * linux-crisv32-low.c:
2226 * gdbserver.1: Add (C) after Copyright. Update the FSF
2229 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2231 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2232 (arm_breakpoint_at): Recognize both breakpoints.
2233 (the_low_target): Use the correct breakpoint instruction.
2235 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2237 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2238 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2239 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2240 (the_low_target): Update.
2242 2005-10-25 Andreas Schwab <schwab@suse.de>
2244 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2246 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2247 (ia64_num_regs): Reduce to 462.
2249 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2251 * acinclude.m4: Correct quoting.
2252 * aclocal.m4: Regenerated.
2254 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2255 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2256 (thread_db_init): Call thread_db_err_str.
2257 * configure.ac: Check for TD_VERSION.
2258 * config.in, configure: Regenerated.
2260 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2262 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2264 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2266 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2267 is not available. Define HAVE_PTRACE_GETREGS if it is.
2268 * config.in, configure: Regenerated.
2269 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2270 * linux-i386-low.c, linux-m68k-low.c: Update to use
2271 HAVE_PTRACE_GETREGS.
2272 * linux-low.c (regsets_fetch_inferior_registers)
2273 (regsets_store_inferior_registers): Only return 0 if we processed
2275 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2276 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2278 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2280 * inferiors.c (struct thread_info): Add gdb_id.
2281 (add_thread): Add gdb_id argument.
2282 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2283 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2284 calls to add_thread.
2285 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2286 * server.c (handle_query): Use thread_to_gdb_id.
2287 (handle_v_cont, main): Use gdb_id_to_thread_id.
2288 * server.h (add_thread): Update prototype.
2289 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2292 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2294 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2295 left-padded registers.
2296 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2297 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2299 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2301 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2302 * configure: Regenerate.
2303 * config.in: Regenerate.
2304 * server.h (NEED_DECLARATION_STRERROR):
2305 Replace with !HAVE_DECL_STRERROR.
2307 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2309 * linux-low.c (linux_wait, linux_send_signal): Don't test
2310 an unsigned long variable for > 0 if it could be MAX_ULONG.
2311 * server.c (myresume): Likewise.
2312 * target.c (set_desired_inferior): Likewise.
2314 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2316 * configure.ac: Simplify and improve check for socklen_t.
2317 * configure, config.in: Regenerate.
2319 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2321 * acconfig.h: Remove.
2322 * configure.ac: Add a test for socklen_t. Use three-argument
2323 AC_DEFINE throughout.
2324 * config.in: Regenerated using autoheader 2.59.
2325 * configure: Regenerated.
2327 * gdbreplay.c (socklen_t): Provide a default.
2328 (remote_open): Use socklen_t.
2329 * remote-utils.c (socklen_t): Provide a default.
2330 (remote_open): Use socklen_t.
2331 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2334 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2336 * linux-low.c (linux_read_memory, linux_write_memory)
2337 (linux_read_auxv): Likewise.
2338 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2339 (check_mem_write): Likewise.
2340 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2342 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2343 (registers_from_string, register_data): Likewise.
2344 * server.c (handle_query, main): Likewise.
2345 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2346 (decode_M_packet): Likewise.
2347 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2348 * target.h (struct target_ops): Update read_memory, write_memory,
2350 (read_inferior_memory, write_inferior_memory): Update.
2351 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2353 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2354 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2355 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2356 linux-s390-low.c, linux-sh-low.c: Update for changes in
2357 read_inferior_memory and the_low_target->breakpoint.
2359 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2361 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2362 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2363 * configure.srv: Add powerpc64-*-linux*.
2364 * linux-ppc64-low.c: New file.
2366 2005-05-23 Orjan Friberg <orjanf@axis.com>
2368 * linux-cris-low.c: New file with support for CRIS.
2369 * linux-crisv32-low.c: Ditto for CRISv32.
2370 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2371 (clean): Add reg-cris.c and reg-crisv32.c.
2372 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2373 reg-crisv32.o, and reg-crisv32.c to make rules.
2374 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2377 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2379 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2380 of sizeof (PTRACE_XFER_TYPE).
2381 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2383 2005-05-12 Orjan Friberg <orjanf@axis.com>
2385 * target.h (struct target_ops): Add insert_watchpoint,
2386 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2387 pointers for hardware watchpoint support.
2388 * linux-low.h (struct linux_target_ops): Ditto.
2389 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2390 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2391 to linux_target_ops.
2392 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2394 * server.c (main): Recognize 'Z' and 'z' packets.
2396 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2398 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2399 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2400 (the_low_target): Add new members.
2402 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2404 * proc-service.c (ps_lgetregs): Search all_processes instead of
2407 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2409 * server.c (start_inferior): Change return type to int.
2410 (attach_inferior): Change sigptr to int *.
2411 (handle_v_cont, handle_v_requests): Change signal to int *.
2412 (main): Change signal to int.
2414 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2416 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2417 * configure.srv: Add m32r*-*-linux*.
2418 * linux-m32r-low.c: New file.
2420 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2422 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2424 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2426 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2427 Take unsigned long arguments for PIDs.
2428 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2429 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2430 (wait_for_sigstop, linux_resume_one_process)
2431 (regsets_fetch_inferior_registers, linux_send_signal)
2432 (linux_read_auxv): Likewise. Update the types of variables holding
2433 PIDs. Update format string specifiers.
2434 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2435 * remote-utils.c (prepare_resume_reply): Likewise.
2436 * server.c (cont_thread, general_thread, step_thread)
2437 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2439 (handle_query): Update format specifiers.
2440 (handle_v_cont, main): Use strtoul for thread IDs.
2441 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2442 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2443 (general_thread, step_thread, thread_from_wait)
2444 (old_thread_from_wait): Update.
2445 * target.h (struct thread_resume): Use unsigned long for THREAD.
2446 (struct target_ops): Use unsigned long for arguments to attach and
2449 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2451 * acinclude.m4: Include bfd/bfd.m4 directly.
2452 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2453 <agriffis@toolchain.org>.
2454 * aclocal.m4, configure: Regenerated.
2456 2005-01-07 Andrew Cagney <cagney@gnu.org>
2458 * configure.ac: Rename configure.in, require autoconf 2.59.
2459 * configure: Re-generate.
2461 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2463 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2465 * aclocal.m4: Regenerated.
2466 * configure: Regenerated.
2468 2004-11-21 Andreas Schwab <schwab@suse.de>
2470 * linux-m68k-low.c (m68k_num_gregs): Define.
2471 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2472 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2473 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2474 (m68k_breakpoint_at): New. Add to the_low_target.
2476 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2477 srv_linux_thread_db to yes.
2479 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2481 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2482 (ARCH_SET_FS): Likewise.
2483 (ARCH_GET_FS): Likewise.
2484 (ARCH_GET_GS): Likewise.
2486 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2488 * linux-i386-low.c (ps_get_thread_area): New.
2489 * linux-x86-64-low.c (ps_get_thread_area): New.
2490 * linux-low.c: Include <sys/syscall.h>.
2491 (linux_kill_one_process): Don't kill the first thread here.
2492 (linux_kill): Kill the first thread here.
2493 (kill_lwp): New function.
2494 (send_sigstop, linux_send_signal): Use it.
2495 * proc-service.c: Clean up #ifdefs.
2496 (fpregset_info): Delete.
2497 (ps_lgetregs): Update and enable implementation.
2498 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2500 * remote-utils.c (struct sym_cache, symbol_cache): New.
2501 (input_interrupt): Print a clearer message.
2502 (async_io_enabled): New variable.
2503 (enable_async_io, disable_async_io): Use it. Update comments.
2504 (look_up_one_symbol): Use the symbol cache.
2505 * thread-db.c (thread_db_look_up_symbols): New function.
2506 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2508 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2510 * configure.in: Test for -rdynamic.
2511 * configure: Regenerated.
2512 * Makefile (INTERNAL_LDFLAGS): New.
2513 (gdbserver, gdbreplay): Use it.
2515 2004-09-02 Andrew Cagney <cagney@gnu.org>
2517 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2519 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2521 * linux-low.c (linux_wait): Clear all_processes list also.
2523 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2525 * linux-low.c: Include <errno.h>. Remove extern declaration of
2528 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2530 * gdbreplay.c, server.h, utils.c: Update copyright years.
2532 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2534 * server.c (main): Print child status or termination signal from
2535 variable 'signal', not 'sig'.
2537 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2539 * linux-low.c (linux_read_memory): Change return type to
2540 int. Check for and return error from ptrace().
2541 * target.c (read_inferior_memory): Change return type to int. Pass
2542 back return status from the_target->read_memory().
2543 * target.h (struct target_ops): Adapt *read_memory() prototype.
2545 (read_inferior_memory): Adapt prototype.
2546 * server.c (main): Return an error packet if
2547 read_inferior_memory() returns an error.
2549 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2551 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2552 Unify with other clean targets.
2554 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2556 * server.c (handle_v_cont): Call set_desired_inferior.
2558 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2560 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2562 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2564 * linux-low.c (linux_wait): Unblock async I/O.
2565 (linux_resume): Block and enable async I/O.
2566 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2567 * server.h (block_async_io, unblock_async_io): Add prototypes.
2569 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2571 * remote-utils.c (remote_open): Print a status notice after
2573 * server.c (attach_inferior): Print a status notice after
2576 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2578 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2580 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2582 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2584 * server.c, target.h: Update copyright years.
2586 2004-02-25 Roland McGrath <roland@redhat.com>
2588 * target.h (struct target_ops): New member `read_auxv'.
2589 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2590 * linux-low.c (linux_read_auxv): New function.
2591 (linux_target_ops): Initialize `read_auxv' member to that.
2593 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2595 Committed by Jim Blandy <jimb@redhat.com>.
2597 * linux-s390-low.c (s390_num_regs): Update.
2598 (s390_regmap): Remove control registers. Use __s390x__ predefine
2599 instead of GPR_SIZE to distiguish s390 and s390x targets.
2601 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2603 * linux-low.c: Update copyright year.
2604 (check_removed_breakpoint): Clear pending_is_breakpoint.
2605 (linux_set_resume_request, linux_queue_one_thread)
2606 (resume_status_pending_p): New functions.
2607 (linux_continue_one_thread): Use process->resume.
2608 (linux_resume): Only resume threads if there are no pending events.
2609 * linux-low.h (struct process_info): Add resume request
2612 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2614 * regcache.c (new_register_cache): Clear the allocated register
2615 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2617 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2619 * linux-low.c (linux_resume): Take a struct thread_resume *
2621 (linux_wait): Update call.
2622 (resume_ptr): New static variable.
2623 (linux_continue_one_thread): Renamed from
2624 linux_continue_one_process. Use resume_ptr.
2625 (linux_resume): Use linux_continue_one_thread.
2626 * server.c (handle_v_cont, handle_v_requests): New functions.
2627 (myresume): New function.
2628 (main): Handle 'v' case.
2629 * target.h (struct thread_resume): New type.
2630 (struct target_ops): Change argument of "resume" to struct
2632 (myresume): Delete macro.
2634 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2636 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2637 (uninstall): Support DESTDIR.
2639 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2641 * configure.srv: Add xscale*linux copy of arm*linux entry.
2643 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2645 * linux-arm-low.c (arm_reinsert_addr): New function.
2646 (the_low_target): Add arm_reinsert_addr.
2648 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2650 * mem-break.c: Remove whitespace at end of file.
2652 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2654 * configure.in: Check whether we need to prototype strerror.
2655 * server.h: Optionally prototype strerror.
2656 * gdbreplay.c (perror_with_name): Use strerror.
2657 * linux-low.c (linux_attach_lwp): Use strerror.
2658 * utils.c (perror_with_name): Use strerror.
2659 * config.in, configure: Regenerated.
2661 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2663 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2664 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2666 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2668 * Makefile.in (SFILES): Update.
2669 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2670 low-sun3.c: Remove files.
2672 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2674 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2675 (linux_detach_one_process, linux_detach): New functions.
2676 (linux_target_ops): Add linux_detach.
2677 * server.c (main): Handle 'D' packet.
2678 * target.h (struct target_ops): Add "detach" member.
2679 (detach_inferior): Define.
2681 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2683 From Kelley Cook <kelleycook@wideopenwest.com>:
2684 * configure.srv: Accept i[34567]86 variants.
2686 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2688 * linux-low.c (linux_wait_for_event): Correct comment typos.
2689 (linux_resume_one_process): Call check_removed_breakpoint.
2690 (linux_send_signal): New function.
2691 (linux_target_ops): Add linux_send_signal.
2692 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2694 * target.h (struct target_ops): Add send_signal.
2696 2003-05-29 Jim Blandy <jimb@redhat.com>
2698 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2699 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2700 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2701 away part of the register's value.
2703 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2705 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2706 (linux_wait_for_event, linux_init_signals): Likewise.
2708 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2710 * configure.in: Check for stdlib.h.
2711 * configure: Regenerated.
2712 * config.in: Regenerated.
2714 2003-01-04 Andreas Schwab <schwab@suse.de>
2716 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2718 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2720 * Makefile.in: Remove obsolete code.
2722 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2724 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2725 defined(PT_FPR0_HI).
2727 2002-11-17 Stuart Hughes <seh@zee2.com>
2729 * linux-arm-low.c (arm_num_regs): Increase.
2730 (arm_regmap): Include status register.
2732 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2734 * linux-low.c (register_addr): Remove incorrect -1 check.
2736 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2738 * linux-low.c (linux_create_inferior): Call setpgid. Return
2740 (unstopped_p, linux_signal_pid): Remove.
2741 (linux_target_ops): Remove linux_signal_pid.
2742 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2743 global instead of target method.
2744 * target.h (struct target_ops): Remove signal_pid. Update comment
2745 for create_inferior.
2746 * server.c (signal_pid): New variable.
2747 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2748 gdbserver. Set the child to be the foreground process group.
2749 (attach_inferior): Set signal_pid.
2751 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2753 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2755 2002-08-20 Jim Blandy <jimb@redhat.com>
2757 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2760 2002-08-01 Andrew Cagney <cagney@redhat.com>
2762 * Makefile.in: Make chill references obsolete.
2764 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2766 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2767 * configure: Regenerate.
2768 * config.in: Regenerate.
2770 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2772 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2773 (perror_with_name, remote_close, remote_open, expect, play): Static.
2775 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2777 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2778 byte offsets instead of an array of indexes.
2779 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2781 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2783 * regcache.c: Add comment.
2785 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2787 * thread-db.c: New file.
2788 * proc-service.c: New file.
2789 * acinclude.m4: New file.
2790 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2791 proc-service.o, and thread-db.o.
2792 (linux-low.o): Add USE_THREAD_DB.
2793 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2794 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2795 * aclocal.m4: Regenerated.
2796 * config.in: Regenerated.
2797 * configure: Regenerated.
2798 * configure.in: Check for proc_service.h, sys/procfs.h,
2799 thread_db.h, and linux/elf.h headrs.
2800 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2801 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2802 Check for -lthread_db and thread support.
2803 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2804 PowerPC, and SuperH.
2805 * i387-fp.c: Constify arguments.
2806 * i387-fp.h: Likewise.
2807 * inferiors.c: (struct thread_info): Renamed from
2808 `struct inferior_info'. Remove PID member. Use generic inferior
2809 list header. All uses updated.
2810 (inferiors, signal_pid): Removed.
2811 (all_threads): New variable.
2812 (get_thread): Define.
2813 (add_inferior_to_list): New function.
2814 (for_each_inferior): New function.
2815 (change_inferior_id): New function.
2816 (add_inferior): Removed.
2817 (remove_inferior): New function.
2818 (add_thread): New function.
2819 (free_one_thread): New function.
2820 (remove_thread): New function.
2821 (clear_inferiors): Use for_each_inferior and free_one_thread.
2822 (find_inferior): New function.
2823 (find_inferior_id): New function.
2824 (inferior_target_data): Update argument type.
2825 (set_inferior_target_data): Likewise.
2826 (inferior_regcache_data): Likewise.
2827 (set_inferior_regcache_data): Likewise.
2828 * linux-low.c (linux_bp_reinsert): Remove.
2829 (all_processes, stopping_threads, using_thrads)
2830 (struct pending_signals, debug_threads, pid_of): New.
2831 (inferior_pid): Replace with macro.
2832 (struct inferior_linux_data): Remove.
2833 (get_stop_pc, add_process): New functions.
2834 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2835 Use add_process and add_thread.
2836 (linux_attach_lwp): New function, based on old linux_attach. Use
2837 add_process and add_thread. Set stop_expected for new threads.
2838 (linux_attach): New function.
2839 (linux_kill_one_process): New function.
2840 (linux_kill): Kill all LWPs.
2841 (linux_thread_alive): Use find_inferior_id.
2842 (check_removed_breakpoints, status_pending_p): New functions.
2843 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2844 Update. Use WNOHANG. Wait for cloned processes also. Update process
2845 struct for the found process.
2846 (linux_wait_for_event): New function.
2847 (linux_wait): Use it. Support LWPs.
2848 (send_sigstop, wait_for_sigstop, stop_all_processes)
2849 (linux_resume_one_process, linux_continue_one_process): New functions.
2850 (linux_resume): Support LWPs.
2851 (REGISTER_RAW_SIZE): Remove.
2852 (fetch_register): Use register_size instead. Call supply_register.
2853 (usr_store_inferior_registers): Likewise. Call collect_register.
2855 (regsets_fetch_inferior_registers): Improve error message.
2856 (regsets_store_inferior_registers): Add debugging.
2857 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2858 (unstopped_p, linux_signal_pid): New functions.
2859 (linux_target_ops): Add linux_signal_pid.
2860 (linux_init_signals): New function.
2861 (initialize_low): Call it. Initialize using_threads.
2862 * regcache.c (inferior_regcache_data): Add valid
2864 (get_regcache): Fetch registers lazily. Add fetch argument
2865 and update all callers.
2866 (regcache_invalidate_one, regcache_invalidate): New
2868 (new_register_cache): Renamed from create_register_cache.
2869 Return the new regcache.
2870 (free_register_cache): Change argument to a void *.
2871 (registers_to_string, registers_from_string): Call get_regcache
2872 with fetch flag set.
2873 (register_data): Make static. Pass fetch flag to get_regcache.
2874 (supply_register): Call get_regcache with fetch flag clear.
2875 (collect_register): Call get_regcache with fetch flag set.
2876 (collect_register_as_string): New function.
2877 * regcache.h: Update.
2878 * remote-utils.c (putpkt): Flush after debug output and use
2880 Handle input interrupts while waiting for an ACK.
2881 (input_interrupt): Use signal_pid method.
2882 (getpkt): Flush after debug output and use stderr.
2883 (outreg): Use collect_register_as_string.
2884 (new_thread_notify, dead_thread_notify): New functions.
2885 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2887 (look_up_one_symbol): Flush after debug output.
2888 * server.c (step_thread, server_waiting): New variables.
2889 (start_inferior): Don't use signal_pid. Update call to mywait.
2890 (attach_inferior): Update call to mywait.
2891 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2892 (main): Don't fetch/store registers explicitly. Use
2893 set_desired_inferior. Support proposed ``Hs'' packet. Update
2896 (struct inferior_list, struct_inferior_list_entry): New.
2897 * target.c (set_desired_inferior): New.
2898 (write_inferior_memory): Constify.
2899 (mywait): New function.
2901 (struct target_ops): New signal_pid method.
2902 (mywait): Removed macro, added prototype.
2904 * linux-low.h (regset_func): Removed.
2905 (regset_fill_func, regset_store_func): New.
2906 (enum regset_type): New.
2907 (struct regset_info): Add type field. Use new operation types.
2908 (struct linux_target_ops): stop_pc renamed to get_pc.
2909 Add decr_pc_after_break and breakpoint_at.
2910 (get_process, get_thread_proess, get_process_thread)
2911 (strut process_info, all_processes, linux_attach_lwp)
2912 (thread_db_init): New.
2914 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2915 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2916 (the_low_target): Add new members.
2917 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2918 (i386_store_fpxregset): Constify.
2919 (target_regsets): Add new kind identifier.
2920 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2921 (i386_set_pc): Add debugging.
2922 (i386_breakpoint_at): New function.
2923 (the_low_target): Add new members.
2924 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2925 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2926 (mips_breakpoint_at): New.
2927 (the_low_target): Add new members.
2928 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2929 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2930 (the_low_target): Add new members.
2931 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2932 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2933 (the_low_target): Add new members.
2934 * linux-x86-64-low.c (target_regsets): Add new kind
2937 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2939 From Martin Pool <mbp@samba.org>:
2940 * server.c (gdbserver_usage): New function.
2943 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2945 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2948 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2950 * Makefile.in: Remove obsolete code.
2952 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2954 * linux-low.c (regsets_fetch_inferior_registers),
2955 (regsets_store_inferior_registers): Removed cast to int from
2957 * regcache.h: Added declaration of struct inferior_info.
2959 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2961 * inferiors.c (struct inferior_info): Add regcache_data.
2962 (add_inferior): Call create_register_cache.
2963 (clear_inferiors): Call free_register_cache.
2964 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2965 * regcache.c (struct inferior_regcache_data): New.
2966 (registers): Remove.
2967 (get_regcache): New function.
2968 (create_register_cache, free_register_cache): New functions.
2969 (set_register_cache): Don't initialize the register cache here.
2970 (registers_to_string, registers_from_string, register_data): Call
2972 * regcache.h: Add prototypes.
2973 * server.h: Likewise.
2975 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2977 * mem-break.c: New file.
2978 * mem-break.h: New file.
2979 * Makefile.in: Add mem-break.o rule; update server.h
2981 * inferiors.c (struct inferior_info): Add target_data
2983 (clear_inferiors): Free target_data member if set.
2984 (inferior_target_data, set_inferior_target_data): New functions.
2985 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2986 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2987 * linux-low.c (linux_bp_reinsert): New variable.
2988 (struct inferior_linux_data): New.
2989 (linux_create_inferior): Use set_inferior_target_data.
2990 (linux_attach): Likewise. Call add_inferior.
2991 (linux_wait_for_one_inferior): New function.
2992 (linux_wait): Call it.
2993 (linux_write_memory): Add const.
2994 (initialize_low): Call set_breakpoint_data.
2995 * linux-low.h (struct linux_target_ops): Add breakpoint
2997 * server.c (attach_inferior): Remove extra add_inferior
2999 * server.h: Include mem-break.h. Update inferior.c
3001 * target.c (read_inferior_memory)
3002 (write_inferior_memory): New functions.
3003 * target.h (read_inferior_memory)
3004 (write_inferior_memory): Change macros to prototypes.
3005 (struct target_ops): Update comments. Add const to write_memory
3008 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3010 * linux-low.c (usr_store_inferior_registers): Support
3011 registers which are allowed to fail to store.
3012 * linux-low.h (linux_target_ops): Likewise.
3013 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3014 (ppc_cannot_store_register): FPSCR may not be storable.
3016 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3018 * server.h: Include <string.h> if HAVE_STRING_H.
3019 * ChangeLog: Correct paths in last ChangeLog entry.
3021 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3023 * linux-low.h: Remove obsolete prototypes.
3024 (struct linux_target_ops): New.
3025 (extern the_low_target): New.
3026 * linux-low.c (num_regs, regmap): Remove declarations.
3027 (register_addr): Use the_low_target explicitly.
3028 (fetch_register): Likewise.
3029 (usr_fetch_inferior_registers): Likewise.
3030 (usr_store_inferior_registers): Likewise.
3031 * linux-arm-low.c (num_regs): Remove.
3032 (arm_num_regs): Define.
3033 (arm_regmap): Renamed from regmap, made static.
3034 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3036 (arm_cannot_store_register): Renamed from cannot_store_register,
3038 (the_low_target): New.
3039 * linux-i386-low.c (num_regs): Remove.
3040 (i386_num_regs): Define.
3041 (i386_regmap): Renamed from regmap, made static.
3042 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3044 (i386_cannot_store_register): Renamed from cannot_store_register,
3046 (the_low_target): New.
3047 * linux-ia64-low.c (num_regs): Remove.
3048 (ia64_num_regs): Define.
3049 (ia64_regmap): Renamed from regmap, made static.
3050 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3052 (ia64_cannot_store_register): Renamed from cannot_store_register,
3054 (the_low_target): New.
3055 * linux-m68k-low.c (num_regs): Remove.
3056 (m68k_num_regs): Define.
3057 (m68k_regmap): Renamed from regmap, made static.
3058 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3060 (m68k_cannot_store_register): Renamed from cannot_store_register,
3062 (the_low_target): New.
3063 * linux-mips-low.c (num_regs): Remove.
3064 (mips_num_regs): Define.
3065 (mips_regmap): Renamed from regmap, made static.
3066 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3068 (mips_cannot_store_register): Renamed from cannot_store_register,
3070 (the_low_target): New.
3071 * linux-ppc-low.c (num_regs): Remove.
3072 (ppc_num_regs): Define.
3073 (ppc_regmap): Renamed from regmap, made static.
3074 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3076 (ppc_cannot_store_register): Renamed from cannot_store_register,
3078 (the_low_target): New.
3079 * linux-s390-low.c (num_regs): Remove.
3080 (s390_num_regs): Define.
3081 (s390_regmap): Renamed from regmap, made static.
3082 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3084 (s390_cannot_store_register): Renamed from cannot_store_register,
3086 (the_low_target): New.
3087 * linux-sh-low.c (num_regs): Remove.
3088 (sh_num_regs): Define.
3089 (sh_regmap): Renamed from regmap, made static.
3090 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3092 (sh_cannot_store_register): Renamed from cannot_store_register,
3094 (the_low_target): New.
3095 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3096 (the_low_target): New.
3098 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3100 * Makefile.in: Add stamp-h target.
3101 * configure.in: Create stamp-h.
3102 * configure: Regenerated.
3104 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3106 * inferiors.c: New file.
3107 * target.c: New file.
3108 * target.h: New file.
3109 * Makefile.in: Add target.o and inferiors.o. Update
3111 * linux-low.c (inferior_pid): New static variable,
3112 moved from server.c.
3113 (linux_create_inferior): Renamed from create_inferior.
3114 Call add_inferior. Return 0 on success instead of a PID.
3115 (linux_attach): Renamed from myattach.
3116 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3117 (linux_thread_alive): Renamed from mythread_alive.
3118 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3120 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3121 (regsets_store_inferior_registers): Correct error message.
3122 Add missing ``return 0''.
3123 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3124 (linux_store_registers): Renamed from store_inferior_registers.
3125 (linux_read_memory): Renamed from read_inferior_memory.
3126 (linux_write_memory): Renamed from write_inferior_memory.
3127 (linux_target_ops): New structure.
3128 (initialize_low): Call set_target_ops ().
3129 * remote-utils.c (unhexify): New function.
3130 (hexify): New function.
3131 (input_interrupt): Send signals to ``signal_pid''.
3132 * server.c (inferior_pid): Remove.
3133 (start_inferior): Update create_inferior call.
3134 (attach_inferior): Call add_inferior.
3135 (handle_query): New function.
3136 (main): Call handle_query for `q' packets.
3137 * server.h: Include "target.h". Remove obsolete prototypes.
3138 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3140 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3142 * Makefile.in: Add WARN_CFLAGS. Update configury
3144 * configure.in: Check for <string.h>
3145 * configure: Regenerate.
3146 * config.in: Regenerate.
3147 * gdbreplay.c: Include needed system headers.
3148 (remote_open): Remove strchr prototype.
3149 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3150 * regcache.c (supply_register): Change buf argument to const void *.
3151 (supply_register_by_name): Likewise.
3152 (collect_register): Change buf argument to void *.
3153 (collect_register_by_name): Likewise.
3154 * regcache.h: Add missing prototypes.
3155 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3156 * server.c (handle_query): New function.
3157 (attached): New static variable, moved out of main.
3158 (main): Quiet longjmp clobber warnings.
3159 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3160 * utils.c (error): Remove NORETURN.