1 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3 Implement the multiprocess extensions, and add linux multiprocess
6 * server.h (ULONGEST): Declare.
7 (struct ptid, ptid_t): New.
8 (minus_one_ptid, null_ptid): Declare.
9 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11 (struct inferior_list_entry): Change `id' type from unsigned from
13 (struct sym_cache, struct breakpoint, struct
14 process_info_private): Forward declare.
15 (struct process_info): Declare.
16 (current_process): Declare.
17 (all_processes): Declare.
18 (initialize_inferiors): Declare.
19 (add_thread): Adjust to use ptid_t.
20 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
21 (add_process, remove_process, find_thread_pid): Declare.
22 (find_inferior_id): Adjust to use ptid_t.
23 (cont_thread, general_thread, step_thread): Change type to ptid_t.
24 (multi_process): Declare.
25 (push_event): Adjust to use ptid_t.
26 (read_ptid, write_ptid): Declare.
27 (prepare_resume_reply): Adjust to use ptid_t.
28 (clear_symbol_cache): Declare.
29 * inferiors.c (all_processes): New.
30 (null_ptid, minus_one_ptid): New.
31 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
32 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
33 (add_thread): Change unsigned long to ptid. Remove gdb_id
35 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
36 (gdb_id_to_thread): Rename to ...
37 (find_thread_pid): ... this. Change unsigned long to ptid.
38 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
39 (loaded_dll, pull_pid_from_list): Adjust.
40 (add_process, remove_process, find_process_pid)
41 (get_thread_process, current_process, initialize_inferiors): New.
42 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
43 (struct target_waitstatus) <related_pid>: Ditto.
44 (struct target_ops) <kill, detach>: Add `pid' argument. Change
46 (struct target_ops) <join>: Add `pid' argument.
47 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
48 (struct target_ops) <wait>: Add `ptid' field. Change return type
50 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
51 (mywait): Add `ptid' argument. Change return type to ptid_t.
52 (target_pid_to_str): Declare.
53 * target.c (set_desired_inferior): Adjust to use ptids.
54 (mywait): Add new `ptid' argument. Adjust.
55 (target_pid_to_str): New.
56 * mem-break.h (free_all_breakpoints): Declare.
57 * mem-break.c (breakpoints): Delelete.
58 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
59 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
60 to use per-process breakpoint list.
61 (free_all_breakpoints): New.
62 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
63 (symbol_cache, all_symbols_looked_up): Delete.
65 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
67 (prepare_resume_reply): Change ptid argument's type from unsigned
68 long to ptid_t. Adjust. Implement W;process and X;process.
69 (free_sym_cache, clear_symbol_cache): New.
70 (look_up_one_symbol): Adjust to per-process symbol cache. *
71 * server.c (cont_thread, general_thread, step_thread): Change type
75 (last_ptid): Change type to ptid_t.
76 (struct vstop_notif) <ptid>: Change type to ptid_t.
77 (queue_stop_reply, push_event): Change `ptid' argument's type to
79 (discard_queued_stop_replies): Add `pid' argument.
80 (start_inferior): Adjust to use ptids. Adjust to mywait interface
81 changes. Don't reference the `attached' global.
82 (attach_inferior): Adjust to mywait interface changes.
83 (handle_query): Adjust to use ptids. Parse GDB's qSupported
84 features. Handle and report "multiprocess+". Handle
86 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
89 (handle_v_stopped): Adjust to use target_pid_to_str.
90 (handle_v_requests): Allow multiple attaches and runs when
91 multiprocess extensions are in effect. Handle "vKill".
92 (myresume): Adjust to use ptids.
93 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
94 (handle_status): Adjust to discard_queued_stop_replies interface
96 (first_thread_of, kill_inferior_callback)
97 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
98 (main): Call initialize_inferiors. Adjust to use ptids, killing
99 and detaching from all inferiors. Handle multiprocess packet
101 * linux-low.h: Include gdb_proc_service.h.
102 (struct process_info_private): New.
103 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
104 <lwpid_of>: Use ptid_get_lwp.
105 (get_lwp_thread): Adjust.
106 (struct lwp_info): Add `dead' member.
107 (find_lwp_pid): Declare.
108 * linux-low.c (thread_db_active): Delete.
109 (new_inferior): Adjust comment.
110 (inferior_pid): Delete.
111 (linux_add_process): New.
112 (handle_extended_wait): Adjust.
113 (add_lwp): Change unsigned long to ptid.
114 (linux_create_inferior): Add process to processes table. Adjust
115 to use ptids. Don't set new_inferior here.
116 (linux_attach_lwp): Rename to ...
117 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
118 it. Adjust to use ptids.
119 (linux_attach_lwp): New.
120 (linux_attach): Add process to processes table. Don't set
122 (struct counter): New.
123 (second_thread_of_pid_p, last_thread_of_process_p): New.
124 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
126 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
127 processes. Remove process from process table.
128 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
129 to multiple processes.
130 (any_thread_of): New.
131 (linux_detach): Add `pid' argument, and handle it. Remove process
132 from processes table.
133 (linux_join): Add `pid' argument. Handle it.
134 (linux_thread_alive): Change unsighed long argument to ptid_t.
135 Consider dead lwps as not being alive.
136 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
137 threads we're not interested in.
138 (same_lwp, find_lwp_pid): New.
139 (linux_wait_for_lwp): Change `pid' argument's type from int to
141 (linux_wait_for_event): Rename to ...
142 (linux_wait_for_event_1): ... this. Change `pid' argument's type
143 from int to ptid_t. Adjust.
144 (linux_wait_for_event): New.
145 (linux_wait_1): Add `ptid' argument. Change return type to
146 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
147 that exit from the process table.
148 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
150 (mark_lwp_dead): New.
151 (wait_for_sigstop): Adjust to use ptids. If a process exits while
152 stopping all threads, mark its main lwp as dead.
153 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
155 (fetch_register, usr_store_inferior_registers)
156 (regsets_fetch_inferior_registers)
157 (regsets_store_inferior_registers, linux_read_memory)
158 (linux_write_memory): Inline `inferior_pid'.
159 (linux_look_up_symbols): Adjust to use per-process
161 (linux_request_interrupt): Adjust to use ptids.
162 (linux_read_auxv): Inline `inferior_pid'.
163 (initialize_low): Don't reference thread_db_active.
164 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
165 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
166 (ps_getpid): Return the pid of the current inferior.
167 * thread-db.c (proc_handle, thread_agent): Delete.
168 (thread_db_create_event, thread_db_enable_reporting): Adjust to
170 (find_one_thread): Change argument type to ptid_t. Adjust to
172 (maybe_attach_thread): Adjust to per-process data and ptids.
173 (thread_db_find_new_threads): Ditto.
174 (thread_db_init): Ditto.
175 * spu-low.c (spu_create_inferior, spu_attach): Add process to
176 processes table. Adjust to use ptids.
177 (spu_kill, spu_detach): Adjust interface. Remove process from
179 (spu_join, spu_thread_alive): Adjust interface.
180 (spu_wait): Adjust interface. Remove process from processes
181 table. Adjust to use ptids.
182 * win32-low.c (current_inferior_tid): Delete.
183 (current_inferior_ptid): New.
184 (debug_event_ptid): New.
185 (thread_rec): Take a ptid. Adjust.
186 (child_add_thread): Add `pid' argument. Adjust to use ptids.
187 (child_delete_thread): Ditto.
188 (do_initial_child_stuff): Add `attached' argument. Add process to
190 (child_fetch_inferior_registers, child_store_inferior_registers):
192 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
193 (win32_attach): Pass 1 to do_initial_child_stuff.
194 (win32_kill): Adjust interface. Remove process from processes
196 (win32_detach): Ditto.
197 (win32_join): Adjust interface.
198 (win32_thread_alive): Take a ptid.
199 (win32_resume): Adjust to use ptids.
200 (get_child_debug_event): Ditto.
201 (win32_wait): Adjust interface. Remove exiting process from
204 2009-04-01 Pedro Alves <pedro@codesourcery.com>
206 Non-stop mode support.
208 * server.h (non_stop): Declare.
209 (gdb_client_data, handler_func): Declare.
210 (delete_file_handler, add_file_handler, start_event_loop):
212 (handle_serial_event, handle_target_event, push_event)
213 (putpkt_notif): Declare.
214 * target.h (enum resume_kind): New.
215 (struct thread_resume): Replace `step' field by `kind' field.
216 (TARGET_WNOHANG): Define.
217 (struct target_ops) <wait>: Add `options' argument.
218 <supports_non_stop, async, start_non_stop>: New fields.
219 (target_supports_non_stop, target_async): New.
220 (start_non_stop): Declare.
221 (mywait): Add `options' argument.
222 * target.c (mywait): Add `options' argument. Print child exit
224 (start_non_stop): New.
225 * server.c (non_stop, own_buf, mem_buf): New globals.
226 (struct vstop_notif): New.
227 (notif_queue): New global.
228 (queue_stop_reply, push_event, discard_queued_stop_replies)
229 (send_next_stop_reply): New.
230 (start_inferior): Adjust to use resume_kind. Adjust to mywait
232 (attach_inferior): In non-stop mode, don't wait for the target
234 (handle_general_set): Handle QNonStop.
235 (handle_query): When handling qC, return the current general
236 thread, instead of the first thread of the list.
237 (handle_query): If the backend supports non-stop mode, include
238 QNonStop+ in the qSupported query response.
239 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
241 (handle_v_attach, handle_v_run): Handle non-stop mode.
242 (handle_v_stopped): New.
243 (handle_v_requests): Report support for vCont;t. Handle vStopped.
244 (myresume): Adjust to use resume_kind. Handle non-stop.
245 (queue_stop_reply_callback): New.
246 (handle_status): Handle non-stop mode.
247 (main): Clear non_stop flag on reconnection. Use the event-loop.
248 Refactor serial protocol handling from here ...
249 (process_serial_event): ... to this new function. When GDB
250 selects any thread, select one here. In non-stop mode, wait until
251 GDB acks all pending events before exiting.
252 (handle_serial_event, handle_target_event): New.
253 * remote-utils.c (remote_open): Install remote_desc in the event
255 (remote_close): Remove remote_desc from the event loop.
256 (putpkt_binary): Rename to...
257 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
258 (putpkt_binary): New as wrapper around putpkt_binary_1.
260 (prepare_resume_reply): In non-stop mode, don't change the
263 * Makefile.in (OBJ): Add event-loop.o.
264 (event-loop.o): New rule.
266 * linux-low.h (pid_of): Moved here.
268 (get_lwp_thread): Use lwpid_of.
269 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
270 * linux-low.c (pid_of): Delete.
271 (inferior_pid): Use lwpid_of.
272 (linux_event_pipe): New.
273 (target_is_async_p): New.
275 (handle_extended_wait): Use lwpid_of.
276 (add_lwp): Don't set lwpid field.
277 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
278 (linux_kill_one_lwp): If killing a running lwp, stop it first.
279 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
280 (linux_detach_one_lwp): If detaching from a running lwp, stop it
281 first. Adjust to linux_wait_for_event interface changes. Use
283 (linux_detach): Don't delete the main lwp here.
284 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
285 (status_pending_p): Don't consider explicitly suspended lwps.
286 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
287 pointer. Add OPTIONS argument. Change return type to int. Use
288 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
289 (linux_wait_for_event): Take an integer pid instead of a lwp_info
290 pointer. Add status pointer argument. Return a pid instead of a
291 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
292 changes. In non-stop mode, don't switch to a random thread.
293 (linux_wait): Rename to...
294 (linux_wait_1): ... this. Add target_options argument, and handle
295 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
296 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
297 clean exit and signal exit code. Don't stop all threads in
298 non-stop mode. In all-stop mode, only stop all threads when
299 reporting a stop to GDB. Handle explicit thread stop requests.
300 (async_file_flush, async_file_mark): New.
302 (send_sigstop): Use lwpid_of.
303 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
304 interface changes. In non-stop mode, don't switch to a random
306 (linux_resume_one_lwp): Use lwpid_of.
307 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
308 (linux_resume_one_thread): ... this. Handle resume_stop. In
309 non-stop mode, don't look for pending flag in all threads.
310 (resume_status_pending_p): Don't consider explicitly suspended
312 (my_waitpid): Reimplement. Emulate __WALL.
313 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
315 (sigchld_handler, linux_supports_non_stop, linux_async)
316 (linux_start_non_stop): New.
317 (linux_target_ops): Register linux_supports_non_stop, linux_async
318 and linux_start_non_stop.
319 (initialize_low): Install SIGCHLD handler.
320 * thread-db.c (thread_db_create_event, find_one_thread)
321 (thread_db_get_tls_address): Use lwpid_of.
322 * win32-low.c (win32_detach): Adjust to use resume_kind.
323 (win32_wait): Add `options' argument.
324 * spu-low.c (spu_resume): Adjust to use resume_kind.
325 (spu_wait): Add `options' argument.
327 2009-04-01 Pedro Alves <pedro@codesourcery.com>
329 Decouple target code from remote protocol.
331 * target.h (enum target_waitkind): New.
332 (struct target_waitstatus): New.
333 (struct target_ops) <wait>: Return an unsigned long. Take a
334 target_waitstatus pointer instead of a char pointer.
336 * target.c (mywait): Change prototype to return an unsigned long.
337 Take a target_waitstatus pointer instead of a char pointer. Adjust.
338 * server.h (thread_from_wait, old_thread_from_wait): Delete
340 (prepare_resume_reply): Change prototype to take a
342 * server.c (thread_from_wait, old_thread_from_wait): Delete.
343 (last_status, last_ptid): New.
344 (start_inferior): Remove "statusptr" argument. Adjust. Return a
345 pid instead of a signal.
346 (attach_inferior): Remove "status" and "signal" parameters.
348 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
350 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
351 (handle_v_requests, myresume): Remove "status" and "signal"
353 (handle_status): New.
354 (main): Delete local `status'. Adjust.
355 * remote-utils.c: Include target.h.
356 (prepare_resume_reply): Change prototype to take a
357 target_waitstatus. Adjust.
359 * linux-low.c (linux_wait): Adjust to new target_ops->wait
361 * spu-low.c (spu_wait): Adjust.
362 * win32-low.c (enum target_waitkind, struct target_waitstatus):
364 (win32_wait): Adjust.
366 2009-04-01 Pedro Alves <pedro@codesourcery.com>
368 * target.h (struct thread_resume): Delete leave_stopped member.
369 (struct target_ops): Add a `n' argument to the `resume' callback.
370 * server.c (start_inferior): Adjust.
371 (handle_v_cont, myresume): Adjust.
372 * linux-low.c (check_removed_breakpoint): Adjust to resume
373 interface change, and to removed leave_stopped field.
374 (resume_ptr): Delete.
375 (struct thread_resume_array): New.
376 (linux_set_resume_request): Add new `arg' parameter. Adjust to
377 resume interface change.
378 (linux_continue_one_thread, linux_queue_one_thread)
379 (resume_status_pending_p): Check if the resume field is NULL
380 instead of checking the leave_stopped member.
381 (linux_resume): Adjust to the target resume interface change.
382 * spu-low.c (spu_resume): Adjust to the target resume interface
384 * win32-low.c (win32_detach, win32_resume): Ditto.
386 2009-04-01 Pedro Alves <pedro@codesourcery.com>
388 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
390 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
392 (linux_continue_one_thread): Only preserve the stepping flag if
393 there's a pending breakpoint.
395 2009-03-31 Pedro Alves <pedro@codesourcery.com>
397 * server.c (main): After the inferior having exited, call
398 remote_close before exiting gdbserver.
400 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
402 Fix size of FPSCR in Power 7 processors.
403 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
404 (PPC_FEATURE_HAS_DFP): New #define.
405 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
408 2009-03-23 Pedro Alves <pedro@codesourcery.com>
410 * server.c (handle_query) Whitespace and formatting.
412 2009-03-22 Pedro Alves <pedro@codesourcery.com>
414 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
415 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
416 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
417 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
418 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
419 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
420 Makefile.in, configure.ac: Fix whitespace throughout.
421 * configure: Regenerate.
423 2009-03-22 Pedro Alves <pedro@codesourcery.com>
425 * inferiors.c (find_inferior): Make it safe for the callback
426 function to delete the currently iterated inferior.
428 2009-03-22 Pedro Alves <pedro@codesourcery.com>
430 * Makefile.in (linuw_low_h): Move higher.
431 (thread-db.o): Depend on $(linux_low_h).
433 2009-03-17 Pedro Alves <pedro@codesourcery.com>
435 Rename "process" to "lwp" throughout.
437 * linux-low.c (all_processes): Rename to...
438 (all_lwps): ... this.
439 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
440 (add_process): Rename to ...
441 (add_lwp): ... this. Adjust.
442 (linux_create_inferior): Adjust.
443 (linux_attach_lwp): Adjust.
444 (linux_attach): Adjust.
445 (linux_kill_one_process): Rename to ...
446 (linux_kill_one_lwp): ... this. Adjust.
447 (linux_kill): Adjust.
448 (linux_detach_one_process): Rename to ...
449 (linux_detach_one_lwp): ... this. Adjust.
450 (linux_detach): Adjust.
451 (check_removed_breakpoint): Adjust.
452 (status_pending_p): Adjust.
453 (linux_wait_for_process): Rename to ...
454 (linux_wait_for_lwp): ... this. Adjust.
455 (linux_wait_for_event): Adjust.
456 (send_sigstop): Adjust.
457 (wait_for_sigstop): Adjust.
458 (stop_all_processes): Rename to ...
459 (stop_all_lwps): ... this.
460 (linux_resume_one_process): Rename to ...
461 (linux_resume_one_lwp): ... this. Adjust.
462 (linux_set_resume_request, linux_continue_one_thread)
463 (linux_queue_one_thread, resume_status_pending_p)
464 (usr_store_inferior_registers, regsets_store_inferior_registers)
465 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
467 * linux-low.h (get_process): Rename to ...
468 (get_lwp): ... this. Adjust.
469 (get_thread_process): Rename to ...
470 (get_thread_lwp): ... this. Adjust.
471 (get_process_thread): Rename to ...
472 (get_lwp_thread): ... this. Adjust.
473 (struct process_info): Rename to ...
474 (struct lwp_info): ... this.
475 (all_processes): Rename to ...
476 (all_lwps): ... this.
477 * proc-service.c (ps_lgetregs): Adjust.
478 * thread-db.c (thread_db_create_event, find_one_thread)
479 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
481 2009-03-14 Pedro Alves <pedro@codesourcery.com>
483 * server.c (handle_query): Handle "qAttached".
485 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
487 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
488 GPLv3, update license URL.
490 2009-03-01 Doug Evans <dje@google.com>
492 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
493 (server_h): Add gdb_signals.h.
495 * server.h (target_signal_from_host,target_signal_to_host_p)
496 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
498 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
500 * remote-utils.c (getpkt): Also generate remote-debug
501 information if noack_mode is set.
503 2009-02-06 Pedro Alves <pedro@codesourcery.com>
505 * server.c (handle_query): Report qXfer:siginfo:read and
506 qXfer:siginfo:write as supported and handle them.
507 * target.h (struct target_ops) <qxfer_siginfo>: New field.
508 * linux-low.c (linux_xfer_siginfo): New.
509 (linux_target_ops): Set it.
511 2009-01-26 Pedro Alves <pedro@codesourcery.com>
513 * server.c (gdbserver_usage): Mention --remote-debug.
514 (main): Accept '--remote-debug' switch.
516 2009-01-18 Doug Evans <dje@google.com>
518 * regcache.c (new_register_cache): No need to check result of xcalloc.
519 * server.c (handle_search_memory): Back out calls to xmalloc,
520 result is checked and error is returned to user upon failure.
521 (handle_query): Ditto. Add more checks for result of malloc.
522 (handle_v_cont): Check result of malloc, report error back to
524 (handle_v_run): Ditto. Call freeargv.
525 * server.h (freeargv): Declare.
526 * utils.c (freeargv): New fn.
528 2009-01-15 Doug Evans <dje@google.com>
530 * gdbreplay.c (perror_with_name): Make arg const char *.
531 * server.h (target_signal_to_name): Make return type const char *.
532 * thread-db.c (thread_db_err_str): Make return type const char *.
533 * utils.c (perror_with_name): Make arg const char *.
535 2009-01-14 Pedro Alves <pedro@codesourcery.com>
537 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
538 when handling a EXIT_PROCESS_DEBUG_EVENT.
540 2009-01-06 Joel Brobecker <brobecker@adacore.com>
542 * gdbreplay.c (gdbreplay_version): Update copyright year.
543 * server.c (gdbserver_version): Likewise.
545 2009-01-05 Doug Evans <dje@google.com>
547 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
548 (handle_extended_wait): Improve comment.
550 2008-12-13 Doug Evans <dje@google.com>
552 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
553 * server.h (ATTR_MALLOC): New macro.
554 (xmalloc,xcalloc,xstrdup): Declare.
555 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
556 * inferiors.c: Ditto.
557 * linux-low.c: Ditto.
558 * mem-break.c: Ditto.
560 * remote-utils.c: Ditto.
563 * win32-low.c: Ditto.
565 2008-12-12 Doug Evans <dje@google.com>
567 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
570 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
572 2008-12-09 Doug Evans <dje@google.com>
574 * linux-low.h (struct process_info): Delete member tid, unused.
575 * thread-db.c (find_one_thread): Update.
576 (maybe_attach_thread): Update.
578 2008-12-02 Pedro Alves <pedro@codesourcery.com>
580 * target.h (struct target_ops): Add qxfer_osdata member.
581 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
583 (linux_qxfer_osdata): New functions.
584 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
586 * server.c (handle_query): Handle "qXfer:osdata:read:".
587 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
588 (buffer_xml_printf): New functions.
589 * server.h (struct buffer): New.
590 (buffer_grow_str, buffer_grow_str0): New macros.
591 (buffer_grow, buffer_free, buffer_init, buffer_finish)
592 (buffer_xml_printf): Declare.
594 2008-11-24 Doug Evans <dje@google.com>
596 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
598 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
600 * server.c (handle_v_run): Always use the supplied argument list.
602 2008-11-19 Bob Wilson <bob.wilson@acm.org>
604 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
605 (xtensa_regmap_table): Add entry for scompare1.
607 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
609 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
610 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
611 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
612 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
613 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
614 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
615 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
616 XML target descriptions.
617 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
618 when inferior is running on an ISA 2.05 or later processor. Add
619 special case to return offset for full 64-bit slot of FPSCR when
622 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
624 * Makefile.in (SFILES, clean): Added sparc64 files.
625 (reg-sparc64.o, reg-sparc64.c): New.
626 * configure.srv (sparc*-*-linux*): New configuration.
627 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
628 syscall arguments for SPARC.
629 (regsets_store_inferior_registers): Likewise.
630 * linux-sparc-low.c: New file.
632 2008-10-21 Doug Evans <dje@google.com>
634 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
635 (READLINE_DIR,READLINE_DEP): Delete.
636 (INTERNAL_CFLAGS): Update.
639 2008-10-10 Pedro Alves <pedro@codesourcery.com>
641 * server.c (handle_v_run): If GDB didn't specify an argv, use the
642 whole argv from the last run, not just argv[0].
644 2008-09-08 Pedro Alves <pedro@codesourcery.com>
646 * regcache.c (new_register_cache): Return NULL if the register
647 cache size isn't known yet.
648 (free_register_cache): Avoid dereferencing a NULL regcache.
650 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
652 * configure.srv: Merge MIPS and MIPS64.
654 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
656 * Makefile.in (uninstall): Apply $(EXEEXT) too.
658 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
660 * Makefile.in: Add required vsx dependencies.
662 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
663 Declare init_registers_powerpc_vsx32l.
664 Declare init_registers_powerpc_vsx64l.
665 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
666 (ppc_arch_setup): Check for VSX in hwcap.
667 (ppc_fill_vsxregset): New function.
668 (ppc_store_vsxregset): New function.
669 Add new VSX entry in regset_info target_regsets.
671 * configure.srv: Add new VSX dependencies.
673 2008-08-12 Pedro Alves <pedro@codesourcery.com>
675 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
676 (remote_open): Set or clear transport_is_reliable.
677 (putpkt_binary): Don't expect acks in noack mode.
678 (getpkt): Don't send ack/nac in noack mode.
679 * server.c (handle_general_set): Handle QStartNoAckMode.
680 (handle_query): If connected by tcp pass QStartNoAckMode+ in
682 (main): Reset noack_mode on every connection.
683 * server.h (noack_mode): Declare.
685 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
687 * Makefile.in (GDBREPLAY_OBS): New variable.
688 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
690 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
691 Daniel Jacobowitz <dan@codesourcery.com>
693 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
694 (usr_store_inferior_registers): Likewise.
695 (regsets_store_inferior_registers): Likewise.
697 2008-07-31 Rolf Jansen <rj@surtec.com>
698 Pedro Alves <pedro@codesourcery.com>
700 * configure.ac: Check for memmem declaration.
701 * server.c [HAVE_MALLOC_H]: Include malloc.h.
702 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
703 (disable_packet_qfThreadInfo): Unconditionally compile.
704 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
705 * configure, config.in: Regenerate.
707 2008-07-28 Doug Kwan <dougkwan@google.com>
709 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
710 (linux_write_memory): Remove declaration of errno.
712 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
714 * linux-low.c (handle_extended_wait): Do not use "status"
715 variable uninitialized.
717 2008-07-07 Pedro Alves <pedro@codesourcery.com>
719 * server.c (handle_v_attach): Inhibit reporting dll changes.
721 2008-06-27 Pedro Alves <pedro@codesourcery.com>
723 * remote-utils.c (prepare_resume_reply): If requested, don't
724 output "thread:TID" in the T stop reply.
726 * server.c (disable_packet_vCont, disable_packet_Tthread)
727 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
728 (handle_query): If requested, disable support for qC, qfThreadInfo
730 (handle_v_requests): If requested, disable support for vCont.
731 (gdbserver_show_disableable): New.
732 (main): Handle --disable-packet and --disable-packet=LIST.
734 * server.h (disable_packet_vCont, disable_packet_Tthread)
735 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
737 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
739 * server.c (gdbserver_usage): Mention --version.
741 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
743 * Makefile.in (gdbreplay.o): New rule.
745 2008-06-06 Joseph Myers <joseph@codesourcery.com>
747 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
748 message, not gdbserver.
750 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
751 Nathan Sidwell <nathan@codesourcery.com>
752 Joseph Myers <joseph@codesourcery.com>
754 * acinclude.m4: Include ../../config/acx.m4.
755 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
756 * configure, config.in: Regenerate.
757 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
758 * server.c (gdbserver_version): Print PKGVERSION.
759 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
760 (main): Adjust gdbserver_usage calls.
761 * gdbreplay.c (version, host_name): Add declarations.
762 (gdbreplay_version, gdbreplay_usage): New.
763 (main): Accept --version and --help options.
765 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
767 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
768 (arm_breakpoint_at): Handle Thumb.
769 (the_low_target): Add comment.
771 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
773 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
775 2008-05-09 Doug Evans <dje@google.com>
777 * server.h (decode_search_memory_packet): Declare.
778 * remote-utils.c (decode_search_memory_packet): New fn.
779 * server.c (handle_search_memory_1): New fn.
780 (handle_search_memory): New fn.
781 (handle_query): Process qSearch:memory packets.
783 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
785 * regcache.c (registers_length): Remove.
786 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
787 full register packet.
788 * regcache.h (registers_length): Remove prototype.
789 * server.h (PBUFSIZ): Define to 16384.
791 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
793 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
794 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
795 powerpc-64l.o, and powerpc-altivec64l.o.
796 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
797 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
798 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
799 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
800 rs6000/power-linux.xml, and rs6000/power64-linux.xml
803 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
804 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
805 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
806 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
807 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
808 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
809 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
810 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
811 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
812 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
815 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
816 (init_registers_powerpc_32l): ... this new prototype.
817 (init_registers_powerpc_32): Remove, replace by ...
818 (init_registers_powerpc_altivec32l): ... this new prototype.
819 (init_registers_powerpc_e500): Remove, replace by ...
820 (init_registers_powerpc_e500l): ... this new prototype.
821 (init_registers_ppc64): Remove, replace by ...
822 (init_registers_powerpc_64l): ... this new prototype.
823 (init_registers_powerpc_64): Remove, replace by ...
824 (init_registers_powerpc_altivec64l): ... this new prototype.
825 (ppc_num_regs): Set to 73.
826 (PT_ORIG_R3, PT_TRAP): Define if necessary.
827 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
828 (ppc_cannot_store_register): Handle orig_r3 and trap.
829 (ppc_arch_setup): Update init_registers_... calls.
830 (ppc_fill_gregset): Handle orig_r3 and trap.
832 * inferiors.c (clear_inferiors): Reset current_inferior.
834 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
836 * acinclude.m4: Add override.m4.
837 * configure: Regenerate.
839 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
841 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
842 initial call to init_register_ppc64.
844 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
846 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
847 powerpc*-*-linux* case.
848 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
850 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
852 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
853 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
855 * linux-ppc-low.c: Include <elf.h>.
856 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
857 (ppc_hwcap): New global variable.
858 (ppc_regmap): Remove __SPE__ #ifdef sections.
859 (ppc_regmap_e500): New global variable.
860 (ppc_cannot_store_register): Update __SPE__ special case.
861 (ppc_get_hwcap): New function.
862 (ppc_arch_setup): Use it to determine whether inferior supports
863 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
864 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
865 Do not access registers if target does not support AltiVec.
866 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
867 Do not access registers if target does not support SPE.
868 (target_regsets): Unconditionally include AltiVec and SPE regsets.
870 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
872 * linux-low.c (disabled_regsets, num_regsets): New.
873 (use_regsets_p): Delete.
874 (linux_wait_for_process): Clear disabled_regsets.
875 (regsets_fetch_inferior_registers): Check and set it.
876 (regsets_store_inferior_registers): Likewise.
877 (linux_fetch_registers, linux_store_registers): Do not use
879 (initialize_low): Allocate disabled_regsets.
881 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
883 * Makefile.in (LIBOBJS): New.
885 (memmem.o): New rule.
886 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
887 * configure: Regenerated.
889 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
891 * server.c (handle_query): Never return "unsupported" for
892 qXfer:features:read queries.
894 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
896 * server.c (get_features_xml): Fix inverted condition.
897 (handle_query): Always support qXfer:feature:read.
899 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
901 * server.c (wrapper_argv): New.
902 (start_inferior): Handle wrapper_argv. If set, expect an extra
904 (gdbserver_usage): Document --wrapper.
905 (main): Parse --wrapper.
907 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
909 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
910 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
911 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
912 (ppc_set_pc): Likewise.
913 (ppc_arch_setup): New function.
914 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
916 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
918 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
920 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
921 instead of linux-ppc64-low.o.
922 * linux-ppc64-low.c: Remove file.
923 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
924 (linux-ppc64-low.o): Remove rule.
926 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
927 (init_registers_powerpc_64): Likewise.
928 (ppc_regmap): Conditionally define depending on __powerpc64__.
929 (ppc_cannot_store_register): Do not special-case "fpscr" when
930 compiled on __powerpc64__.
931 (ppc_collect_ptrace_register): New function.
932 (ppc_supply_ptrace_register): New function.
933 (ppc_breakpoint): Change type to "unsigned int".
934 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
935 (the_low_target): Conditionally provide initializers for the
936 arch_setup member depending on __powerpc64__. Install
937 collect_ptrace_register and supply_ptrace_register members.
939 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
941 * regcache.h (gdbserver_xmltarget): Add extern declaration.
942 * server.c (gdbserver_xmltarget): Define.
943 (get_features_xml): Use it to replace "target.xml" and arch_string.
945 * configure.srv: Remove srv_xmltarget. Add XML files that were
946 mentioned there to srv_xmlfiles instead. Remove conditional tests
947 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
948 srv_xmlfiles and srv_regobj to include all possible choices.
949 * configure.ac (srv_xmltarget): Remove.
950 (srv_xmlfiles): Do not add "target.xml".
951 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
952 checks for supplementary target information.
953 * configure: Regenerate.
954 * Makefile.in (XML_TARGET): Remove.
955 (target.xml): Remove rule.
956 (clean): Do not clean up target.xml.
957 (.PRECIOUS): Do not mention target.xml.
959 * target.h (struct target_ops): Remove arch_string member.
960 * linux-low.c (linux_arch_string): Remove.
961 (linux_target_ops): Remove arch_string initializer.
962 * linux-low.h (struct linux_target_ops): Remove arch_string member.
963 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
964 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
965 * spu-low.c (spu_arch_string): Remove.
966 (spu_target_ops): Remove arch_string initializer.
967 * win32-low.c (win32_arch_string): Remove.
968 (win32_target_ops): Remove arch_string initializer.
969 * win32-low.h (struct win32_target_ops): Remove arch_string member.
970 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
971 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
973 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
975 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
976 by collect_ptrace_register and supply_ptrace_register hooks.
977 * linux-low.c (fetch_register): Use supply_ptrace_register callback
978 instead of checking for the_low_target.left_pad_xfer.
979 (usr_store_inferior_registers): Use collect_ptrace_register callback
980 instead of checking for the_low_target.left_pad_xfer.
982 * linux-s390-low.c (s390_collect_ptrace_register): New function.
983 (s390_supply_ptrace_register): Likewise.
984 (s390_fill_gregset): Call s390_collect_ptrace_register.
985 (the_low_target): Update.
987 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
988 (ppc_supply_ptrace_register): Likewise.
989 (the_low_target): Update.
991 * linux-i386-low.c (the_low_target): Update.
992 * linux-x86-64-low.c (the_low_target): Update.
994 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
996 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
997 reg-s390.o and reg-s390x.o.
999 * linux-low.c (new_inferior): New global variable.
1000 (linux_create_inferior, linux_attach): Set it.
1001 (linux_wait_for_process): Call the_low_target.arch_setup after the
1002 target has stopped for the first time.
1003 (initialize_low): Do not call the_low_target.arch_setup.
1005 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1006 (s390_set_pc): Likewise.
1007 (s390_arch_setup): New function.
1008 (the_low_target): Use s390_arch_setup as arch_setup routine.
1010 * regcache.c (realloc_register_cache): New function.
1011 (set_register_cache): Call it for each existing regcache.
1013 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1015 * server.h (init_registers): Remove prototype.
1017 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1018 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1019 instead of init_registers ().
1020 * linux-arm-low.c (init_registers_arm): Add prototype.
1021 (init_registers_arm_with_iwmmxt): Likewise.
1022 (the_low_target): Add initializer for arch_setup field.
1023 * linux-cris-low.c (init_registers_cris): Add prototype.
1024 (the_low_target): Add initializer for arch_setup field.
1025 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1026 (the_low_target): Add initializer for arch_setup field.
1027 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1028 (the_low_target): Add initializer for arch_setup field.
1029 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1030 (the_low_target): Add initializer for arch_setup field.
1031 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1032 (the_low_target): Add initializer for arch_setup field.
1033 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1034 (the_low_target): Add initializer for arch_setup field.
1035 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1036 (init_registers_mips64_linux): Likewise.
1037 (the_low_target): Add initializer for arch_setup field.
1038 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1039 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1040 (the_low_target): Add initializer for arch_setup field.
1041 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1042 (init_registers_powerpc_64): Likewise.
1043 (the_low_target): Add initializer for arch_setup field.
1044 * linux-s390-low.c (init_registers_s390): Add prototype.
1045 (init_registers_s390x): Likewise.
1046 (the_low_target): Add initializer for arch_setup field.
1047 * linux-sh-low.c (init_registers_sh): Add prototype.
1048 (the_low_target): Add initializer for arch_setup field.
1049 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1050 (the_low_target): Add initializer for arch_setup field.
1051 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1052 (the_low_target): Add initializer for arch_setup field.
1054 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1055 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1056 instead of init_registers ().
1057 * win32-arm-low.c (init_registers_arm): Add prototype.
1058 (the_low_target): Add initializer for arch_setup field.
1059 * win32-i386-low.c (init_registers_i386): Add prototype.
1060 (the_low_target): Add initializer for arch_setup field.
1062 * spu-low.c (init_registers_spu): Add prototype.
1063 (initialize_low): Call initialie_registers_spu () instead of
1064 initialize_registers ().
1066 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1068 * server.c (handle_v_requests): When handling the vRun and vAttach
1069 packets, if already debugging a process, don't kill it. Return an
1072 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1074 * server.c (handle_query): Correct length check.
1076 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1078 * win32-low.c (do_initial_child_stuff): Add process handle
1079 parameter. Set current_process_handle and current_process_id from the
1080 parameters. Clear globals.
1081 (win32_create_inferior): Don't set current_process_handle and
1082 current_process_id here. Instead pass them on the call to
1083 do_initial_child_stuff.
1084 (win32_attach): Likewise.
1085 (win32_clear_inferiors): New.
1086 (win32_kill): Don't close the current process handle or the
1087 current thread handle here. Instead call win32_clear_inferiors.
1088 (win32_detach): Don't open a new handle to the process. Call
1089 win32_clear_inferiors.
1090 (win32_join): Don't rely on current_process_handle; open a new
1091 handle using the process id.
1092 (win32_wait): Call win32_clear_inferiors when the inferior process
1095 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1097 * server.c (monitor_show_help): Add "exit".
1099 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1101 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1102 (clean): Add reg-xtensa.c.
1103 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1104 * configure.srv (xtensa*-*-linux*) New target.
1105 * linux-xtensa-low.c: New.
1106 * xtensa-xtregs.c: New.
1108 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1110 * hostio.c: Don't include errno.h.
1111 (errno_to_fileio_errno): Move to hostio-errno.
1112 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1113 error number outputting to the target->hostio_last_error callback.
1114 (hostio_packet_error): Use FILEIO_EINVAL directly.
1115 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1116 calls to hostio_error.
1117 * hostio-errno.c: New.
1118 * server.h (hostio_last_error_from_errno): Declare.
1119 * target.h (target_ops): Add hostio_last_error member.
1120 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1121 as hostio_last_error handler.
1122 * spu-low.c (spu_target_ops): Likewise.
1123 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1124 (wince_hostio_last_error): New functions.
1125 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1126 as hostio_last_error handler.
1127 (win32_target_ops) [!_WIN32_WCE]: Register
1128 hostio_last_error_from_errno as hostio_last_error handler.
1129 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1130 (hostio-errno.o): New rule.
1131 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1132 * configure.srv (srv_hostio_err_objs): New variable. Default to
1134 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1135 * configure: Regenerate.
1137 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1139 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1140 (linux_kill, linux_detach): Clean up the process list.
1141 * remote-utils.c (remote_open): Improve port number parsing.
1142 (putpkt_binary, input_interrupt): Only send interrupts if the target
1144 * server.c (extended_protocol): Make static.
1145 (attached): Define earlier.
1146 (exit_requested, response_needed, program_argv): New variables.
1147 (target_running): New.
1148 (start_inferior): Clear attached here.
1149 (attach_inferior): Set attached here.
1150 (require_running): Define.
1151 (handle_query): Use require_running and target_running. Implement
1153 (handle_v_attach, handle_v_run): New.
1154 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1155 (gdbserver_usage): Update.
1156 (main): Redo argument parsing. Handle --debug and --multi. Handle
1157 --attach along with other options or after the port. Save
1158 program_argv. Support no initial program. Resynchronize
1159 communication with GDB after an error. Handle "monitor exit".
1160 Use require_running and target_running. Always allow the extended
1161 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1162 restart in extended mode.
1163 * README: Refer to the GDB manual. Update --attach usage.
1165 2007-12-20 Andreas Schwab <schwab@suse.de>
1167 * linux-low.c (STACK_SIZE): Define.
1168 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1169 (linux_test_for_tracefork): Likewise.
1171 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1173 * linux-low.c (linux_wait_for_event): Update messages. Do not
1174 reinsert auto-delete breakpoints.
1175 * mem-break.c (struct breakpoint): Change return type of handler to
1177 (set_breakpoint_at): Update handler type.
1178 (reinsert_breakpoint_handler): Return 1 instead of calling
1180 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1182 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1183 * mem-break.h (set_breakpoint_at): Update handler type.
1184 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1185 * win32-low.c (auto_delete_breakpoint): New.
1186 (get_child_debug_event): Use it.
1188 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1190 * configure.ac: Check for pread and pwrite.
1191 * hostio.c (handle_pread): Fall back to lseek and read.
1192 (handle_pwrite): Fall back to lseek and write.
1193 * config.in, configure: Regenerated.
1195 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1197 * server.c (myresume): Add own_buf argument.
1198 (main): Update calls.
1200 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1202 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1203 * remote-utils.c (remote_open): Do not call disable_async_io.
1204 (block_async_io): Delete.
1205 (unblock_async_io): Make static.
1206 (initialize_async_io): New.
1207 * server.c (handle_v_cont): Handle async I/O here.
1208 (myresume): Likewise. Move other common resume tasks here...
1209 (main): ... from here. Call initialize_async_io. Disable async
1210 I/O before the main loop.
1211 * server.h (initialize_async_io): Declare.
1212 (block_async_io, unblock_async_io): Delete prototypes.
1213 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1215 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1217 * remote-utils.c (readchar): Allow binary data in received messages.
1219 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1221 * win32-low.c (attaching): New global.
1222 (win32_create_inferior): Clear the `attaching' global.
1223 (win32_attach): Set the `attaching' global.
1224 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1225 attaching. Only set a breakpoint at the entry point if not
1228 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1230 * server.c (main): Don't report dll events on the initial
1231 connection on attaches.
1233 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1235 * server.c (main): Relax numerical bases supported for the pid of
1236 the --attach command line argument.
1238 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1240 * win32-low.c (win32_attach): Call OpenProcess before
1241 DebugActiveProcess, not after. Add last error output to error
1244 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1246 * win32-low.c (win32_get_thread_context)
1247 (win32_set_thread_context): New functions.
1248 (thread_rec): Use win32_get_thread_context.
1249 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1250 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1253 2007-12-03 Leo Zayas
1254 Pedro Alves <pedro_alves@portugalmail.pt>
1256 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1258 (child_add_thread): Minor cleanup.
1259 (child_continue): Resume artificially suspended threads before
1260 calling ContinueDebugEvent.
1261 (suspend_one_thread): New.
1262 (fake_breakpoint_event): New.
1263 (get_child_debug_event): Change return type to int. Check here if
1264 gdb sent an interrupt request. If a soft interrupt was requested,
1265 fake a breakpoint event. Return 0 if there is no event to handle,
1267 (win32_wait): Don't check here if gdb sent an interrupt request.
1268 Ensure there is a valid event to handle.
1269 (win32_request_interrupt): Add soft interruption method as last
1272 2007-12-03 Leo Zayas
1273 Pedro Alves <pedro_alves@portugalmail.pt>
1275 * win32-low.h (win32_thread_info): Add descriptions to the
1276 structure members. Replace `suspend_count' counter by a
1278 * win32-low.c (thread_rec): Update condition of when to get the
1279 context from the inferior. Rely on ContextFlags being set if it
1280 has already been retrieved. Only suspend the inferior thread if
1281 we haven't already. Warn if that fails.
1282 (continue_one_thread): s/suspend_count/suspended/. Only call
1283 ResumeThread once. Warn if that fails.
1285 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1287 * win32-low.c (win32_wait): Don't read from the inferior when it
1290 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1292 * Makefile.in (win32_low_h): New variable.
1293 (win32-low.o): Add dependency on $(win32_low_h).
1294 (win32-arm-low.o, win32-i386-low.o): New rules.
1296 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1298 * hostio.c: Correct copyright year.
1300 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1302 * Makefile.in (OBS): Add hostio.o.
1303 (hostio.o): New rule.
1304 * server.h (handle_vFile): Declare.
1305 * hostio.c: New file.
1306 * server.c (handle_v_requests): Take packet_len and new_packet_len
1307 for binary packets. Call handle_vFile.
1308 (main): Update call to handle_v_requests.
1310 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1312 * linux-low.c: Include <sched.h>.
1314 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1316 * linux-low.c (linux_tracefork_grandchild): New.
1317 (linux_tracefork_child): Use clone.
1318 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1320 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1322 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1324 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1326 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1328 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1330 * inferiors.c (change_inferior_id): Delete.
1331 (add_pid_to_list, pull_pid_from_list): New.
1332 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1333 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1334 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1335 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1336 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1337 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1338 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1339 (using_threads): Always set to 1.
1340 (handle_extended_wait): New.
1341 (add_process): Do not set TID.
1342 (linux_create_inferior): Set must_set_ptrace_flags.
1343 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1344 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1345 (linux_thread_alive): Rename TID argument to LWPID.
1346 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1347 (linux_wait_for_event): Do not use TID or check using_threads. Update
1348 call to dead_thread_notify. Call handle_extended_wait.
1349 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1350 (send_sigstop): Delete sigstop_sent.
1351 (wait_for_sigstop): Avoid TID.
1352 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1353 (linux_test_for_tracefork): New.
1354 (linux_lookup_signals): Use thread_db_active and
1355 linux_supports_tracefork_flag.
1356 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1357 * linux-low.h (get_process_thread): Avoid TID.
1358 (struct process_ifo): Move thread_known and tid to the end. Remove
1360 (linux_attach_lwp, thread_db_init): Update prototypes.
1361 * server.h (change_inferior_id): Delete prototype.
1362 (add_pid_to_list, pull_pid_from_list): New prototypes.
1363 * thread-db.c (thread_db_use_events): New.
1364 (find_first_thread): Rename to...
1365 (find_one_thread): ...this. Update callers and messages. Do not
1366 call fatal. Check thread_db_use_events. Do not call
1367 change_inferior_id or new_thread_notify.
1368 (maybe_attach_thread): Update. Do not call new_thread_notify.
1369 (thread_db_init): Set thread_db_use_events. Check use_events.
1370 * utils.c (fatal, warning): Correct message prefix.
1372 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1374 * Makefile.in (clean): Remove new files.
1375 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1376 (powerpc-64.o, powerpc-64.c): New rules.
1377 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1378 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1380 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1382 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1383 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1384 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1385 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1386 (target_regsets): Add AltiVec and SPE register sets.
1387 * configure.ac: Check for AltiVec and SPE.
1388 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1389 (ppc_fill_vrregset, ppc_store_vrregset): New.
1390 (target_regsets): Add AltiVec register set.
1391 * configure: Regenerated.
1393 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1395 * linux-low.c (O_LARGEFILE): Define.
1396 (linux_read_memory): Use /proc/PID/mem.
1397 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1398 * configure, config.in: Regenerated.
1400 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1402 * linux-low.c (linux_wait_for_event): Do not pass signals while
1405 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1407 * win32-low.c (create_process): New.
1408 (win32_create_inferior): Use create_process instead of
1409 CreateProcess. If create_process failed retry appending an ".exe"
1410 suffix. Store the GetLastError result immediatelly after
1411 create_process calls and use it on the call to error.
1413 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1415 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1417 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1419 * configure.ac: Switch license to GPLv3.
1421 2007-08-01 Michael Snyder <msnyder@access-company.com>
1423 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1425 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1427 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1429 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1430 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1431 CloseToolhelp32Snapshot.
1432 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1433 CloseToolhelp32Snapshot.
1435 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1437 * server.c (main): Check for inferior exit before main loop.
1439 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1441 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1442 instead of on tmp_desc.
1444 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1445 Daniel Jacobowitz <dan@codesourcery.com>
1447 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1448 (add_thread): Minor cleanups.
1449 (clear_inferiors): Move lower in the file. Clear the DLL
1451 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1452 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1453 (xml_escape_text): New.
1454 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1456 (handle_v_cont): Report errors.
1457 (gdbserver_version): Update.
1458 (main): Correct size of own_buf. Do not report initial DLL events.
1459 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1460 (unloaded_dll, xml_escape_text): New.
1461 * win32-low.c (enum target_waitkind): Update comments.
1462 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1463 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1464 (win32_EnumProcessModules, win32_GetModuleInformation)
1465 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1466 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1467 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1468 (win32_Module32First, win32_Module32Next, load_toolhelp)
1469 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1470 (get_child_debug_event): Handle DLL events.
1471 (win32_wait): Likewise.
1473 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1475 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1476 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1478 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1480 * win32-low.c (handle_output_debug_string): Ignore event if not
1483 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1485 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1487 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1489 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1491 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1493 * inferiors.c (change_inferior_id): Add comment.
1494 * linux-low.c (check_removed_breakpoint): Add an early
1495 prototype. Improve debug output.
1496 (linux_attach): Doc update.
1497 (linux_detach_one_process, linux_detach): Clean up before releasing
1499 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1500 * linux-low.h (struct process_info): Doc improvement.
1501 * mem-break.c (delete_all_breakpoints): New.
1502 * mem-break.h (delete_all_breakpoints): New prototype.
1503 * thread-db.c (find_first_thread): New.
1504 (thread_db_create_event): Call it instead of
1505 thread_db_find_new_threads. Clean up unused variables.
1506 (maybe_attach_thread): Remove first thread handling.
1507 (thread_db_find_new_threads): Use find_first_thread.
1508 (thread_db_get_tls_address): Likewise.
1510 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1512 * thread-db.c (thread_db_find_new_threads): Add prototype.
1513 (thread_db_create_event): Check for the main thread before adding
1515 (maybe_attach_thread): Only enable event reporting if TID == 0.
1516 (thread_db_get_tls_address): Check for new threads.
1518 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1520 * linux-low.c (linux_create_inferior): Try execv before execvp.
1521 * spu-low.c (spu_create_inferior): Likewise.
1523 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1525 * linux-low.c (linux_create_inferior): Change execv to execvp.
1526 * spu-low.c (spu_create_inferior): Likewies.
1528 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1530 * Makefile.in (clean): Clean new files instead of deleted ones.
1531 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1532 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1534 * configure.srv: Specify XML files and new regformats for MIPS and
1536 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1537 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1538 an entry for the restart register.
1539 (mips_cannot_fetch_register, mips_cannot_store_register)
1540 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1541 register names to match the XML descriptions.
1542 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1543 restart register instead of $0.
1545 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1546 Markus Deuling <deuling@de.ibm.com>
1548 * remote-utils.c (decode_xfer_write): New function.
1549 * server.h (decode_xfer_write): Add prototype.
1550 * server.c (handle_query): Add PACKET_LEN argument. Support
1551 qXfer:spu:read and qXfer:spu:write packets.
1552 (main): Pass packet_len to handle_query.
1553 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1554 * target.h (target_ops): Add qxfer_spu.
1556 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1558 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1559 accessing non-seekable spufs files.
1561 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1563 * server.c (handle_query): Add reply for qC packet.
1565 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1566 Leo Zayas <lerele@champenstudios@com>
1568 * server.h (check_remote_input_interrupt_request): New function.
1569 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1570 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1571 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1572 (check_remote_input_interrupt_request): New function.
1573 * server.h (check_remote_input_interrupt_request): Declare.
1574 * win32-low.c (winapi_DebugBreakProcess,
1575 winapi_GenerateConsoleCtrlEvent): New typedefs.
1576 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1578 (win32_wait): Check for remote interrupt request
1579 with check_remote_input_interrupt_request.
1580 (win32_request_interrupt): New function.
1581 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1583 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1585 * win32-low.c (debug_registers_changed,
1586 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1587 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1588 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1589 (thread_rec): Get context using the low target.
1590 (child_add_thread): Call thread_added on the low target,
1591 which does the same thing.
1593 (do_initial_child_stuff): Remove debug registers references.
1594 Set context using the low target. Resume threads after
1595 setting the contexts.
1596 (child_continue): Remove dead variable. Remove debug
1597 registers references.
1598 (child_fetch_inferior_registers): Go through the low target.
1599 (do_child_store_inferior_registers): Remove.
1600 (child_store_inferior_registers): Go through the low target.
1601 (win32_resume): Remove debug registers references.
1602 Set context using the low target.
1603 (handle_exception): Change return type to void. Don't record
1604 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1605 first chance exception.
1606 (get_child_debug_event): Change return type to void. Remove
1607 goto loop. Always return after waiting for debug event.
1608 (win32_wait): Convert to switch statement. Handle spurious
1611 * win32-i386-low.c (debug_registers_changed,
1612 debug_registers_used): New.
1613 (initial_stuff): Rename to ...
1614 (i386_initial_stuff): ... this. Clear debug registers
1616 (store_debug_registers): Delete.
1617 (i386_get_thread_context): New.
1618 (load_debug_registers): Delete.
1619 (i386_set_thread_context): New.
1620 (i386_thread_added): New.
1621 (single_step): Rename to ...
1622 (i386_single_step): ... this.
1623 (do_fetch_inferior_registers): Rename to ...
1624 (i386_fetch_inferior_register): ... this.
1625 (i386_store_inferior_register): New.
1626 (the_low_target): Adapt to new interface.
1628 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1629 (arm_get_thread_context): New.
1630 (arm_set_thread_context): New.
1632 (do_fetch_inferior_registers): Rename to ...
1633 (arm_fetch_inferior_register): ... this.
1634 (arm_store_inferior_register): New.
1635 (arm_wince_breakpoint): Reimplement as unsigned long.
1636 (arm_wince_breakpoint_len): Define.
1637 (the_low_target): Adapt to new interface.
1639 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1640 load_debug_registers. Add get_thread_context, set_thread_context,
1641 thread_added and store_inferior_register. Rename
1642 fetch_inferior_registers to fetch_inferior_register.
1643 (regptr): Remove declaration.
1645 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1647 * linux-low.c (linux_detach): Change return type to int. Return 0.
1648 * spu-low.c (spu_detach): Likewise.
1650 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1652 * target.h (target_ops): Change return type of detach to int.
1654 (join_inferior): New.
1655 * server.c (main): Don't skip detach support on mingw32.
1656 If the inferior doesn't support detaching return error.
1657 Call join_inferior instead of using waitpid.
1658 * linux-low.c (linux_join): New.
1659 (linux_target_op): Add linux_join.
1660 * spu-low.c (spu_join): New.
1661 (spu_target_ops): Add spu_join.
1662 * win32-low.c (win32_detach): Adapt to new interface.
1663 Reopen current_process_handle before detaching. Issue a child
1664 resume before detaching.
1666 (win32_target_op): Add win32_join.
1668 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1670 * win32-low.c (win32-attach): Fix return value.
1671 * target.h (target_ops): Describe ATTACH return values.
1673 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1675 * win32-low.c (GETPROCADDRESS): Define.
1676 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1677 (winapi_DebugSetProcessKillOnExit): Likewise.
1678 (win32_create_inferior): Force usage of ansi CreateProcessA.
1679 (win32_attach): Use GETPROCADDRESS.
1680 (win32_detach): Likewise.
1682 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1684 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1686 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1688 * win32-low.c: Commit leftover changes from 2007-03-29.
1690 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1692 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1693 fields short instead of int. Add explicit padding.
1694 (i387_cache_to_fsave): Remove unnecessary casts.
1695 (i387_fsave_to_cache): Doc fix.
1696 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1698 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1700 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1701 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1703 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1705 * configure.srv (arm*-*-mingw32ce*): Move near the other
1708 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1710 * configure.ac: Add errno checking.
1711 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1712 sys/file.h and malloc.h.
1713 (AC_CHECK_DECLS): Add perror.
1714 (srv_mingwce): Handle.
1715 * configure.srv (i[34567]86-*-cygwin*): Add
1716 win32-i386-low.o to srv_tgtobj.
1717 (i[34567]86-*-mingw*): Likewise.
1718 (arm*-*-mingw32ce*): Add case.
1719 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1720 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1721 [__MINGW32CE__] (strerror): New function.
1722 [__MINGW32CE__] (errno): Define to GetLastError.
1723 [__MINGW32CE__] (COUNTOF): New macro.
1724 (remote_open): Remove extra close call.
1725 * mem-break.c (delete_breakpoint_at): New function.
1726 * mem-break.h (delete_breakpoint_at): Declare.
1727 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1728 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1729 [USE_WIN32API] (read, write): Add char* casts.
1730 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1731 * server.h: Include wincecompat.h on Windows CE.
1732 [HAVE_ERRNO_H]: Check.
1733 (perror): Declare if not declared.
1734 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1735 (perror_with_name): Remove errno declaration.
1736 * wincecompat.h: New.
1737 * wincecompat.c: New.
1739 * win32-arm-low.c: New.
1740 * win32-i386-low.c: New.
1741 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1742 (OUTMSG2): Make it safe.
1744 (COUNTOF): New macro.
1745 (NUM_REGS): Get it from the low target.
1746 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1747 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1748 (thread_rec): Let low target handle debug registers.
1749 (child_add_thread): Likewise.
1750 (child_init_thread_list): Likewise.
1751 (continue_one_thread): Likewise.
1753 (do_child_fetch_inferior_registers): Move to ...
1754 * win32-i386-low.c: ... here, and rename to ...
1755 (do_fetch_inferior_registers): ... this.
1756 * win32-low.c (child_fetch_inferior_registers):
1757 Go through the low target.
1758 (do_child_store_inferior_registers): Use regptr.
1759 (strwinerror): New function.
1760 (win32_create_inferior): Handle Windows CE.
1761 Use strwinerror instead of strerror on Windows error
1762 codes. Add program to the error output.
1763 Don't close the main thread handle on Windows CE.
1764 (win32_attach): Use coredll.dll on Windows CE.
1765 (win32_kill): Close current process and current
1767 (win32_detach): Use coredll.dll on Windows CE.
1768 (win32_resume): Let low target handle debug registers, and
1770 (handle_exception): Add/Remove initial breakpoint. Avoid
1771 non-existant WSTOPSIG on Windows CE.
1772 (win32_read_inferior_memory): Cast to remove warning.
1773 (win32_arch_string): Go through the low target.
1774 (initialize_low): Call set_breakpoint_data with the low
1775 target's breakpoint.
1776 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1777 FOP_REGNUM, mappings): Move to ...
1778 * win32-i386-low.c: ... here.
1779 * win32-low.c (win32_thread_info): Move to ...
1780 * win32-low.h: ... here.
1781 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1782 win32-arm-low.c and wincecompat.c.
1783 (all:): Add $EXEEXT.
1784 (install-only:): Likewise.
1785 (gdbserver:): Likewise.
1786 (gdbreplay:): Likewise.
1787 * config.in: Regenerate.
1788 * configure: Regenerate.
1790 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1792 * win32-low.c: Rename typedef thread_info to
1793 win32_thread_info throughout.
1795 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1797 * win32-i386-low.c: Rename to ...
1798 * win32-low.c: ... this.
1799 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1800 * Makefile.in: Likewise.
1802 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1804 * remote-utils.c (monitor_output): Constify msg parameter.
1805 * server.h (monitor_output): Likewise.
1806 * win32-i386-low.c (handle_output_debug_string): New.
1807 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1808 handle_output_debug_string.
1809 (get_child_debug_event): Likewise.
1811 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1813 * server.c (main): Correct strtoul check.
1815 2007-03-27 Jon Ringle <jon@ringle.org>
1817 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1819 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1821 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1823 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1825 * terminal.h: Check HAVE_SGTTY_H.
1827 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1829 * remote-utils.c (remote_open): Print out the assigned port number.
1831 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1833 * remote-utils.c (monitor_output): New function.
1834 * server.c (debug_threads): Define here.
1835 (monitor_show_help): New function.
1836 (handle_query): Handle qRcmd.
1837 (main): Do not handle 'd' packet.
1838 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1839 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1842 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1844 * Makefile.in (EXEEXT): New.
1845 (clean): Use $(EXEEXT).
1847 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1849 * target.h (target_ops): Rename send_signal to request_interrupt,
1850 and remove enum target_signal parameter.
1851 * linux-low.c (linux_request_interrupt): Rename from
1852 linux_send_signal, and always send SIGINT.
1853 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1854 and always send SIGINT.
1855 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1857 (input_interrupt): Likewise.
1859 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1861 * server.c (get_features_xml): Check if target implemented
1863 * win32-i386-low.c (win32_arch_string): New.
1864 (win32_target_ops): Add win32_arch_string as arch_string member.
1866 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1868 * spu-low.c (spu_arch_string): New.
1869 (spu_target_ops): Add spu_arch_string.
1871 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1873 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1874 * configure.ac: Do not check for terminal.h.
1875 * configure, config.in: Regenerated.
1877 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1879 * Makefile.in (OBS): Add $(XML_BUILTIN).
1880 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1882 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1883 (arm-with-iwmmxt.c): New.
1884 * config.in, configure: Regenerate.
1885 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1886 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1887 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1888 (arm*-*-linux*): Add iWMMXt and regset support.
1889 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1890 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1891 (arm_store_wmmxregset, target_regsets): New.
1892 * server.c (get_features_xml): Take annex argument. Check builtin
1894 (handle_query): Handle multiple annexes.
1896 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1898 * remote-utils.c [USE_WIN32API] (read, write): Define.
1899 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1902 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1904 * linux-i386-low.c (the_low_target): Set arch_string.
1905 * linux-x86-64-low.c (the_low_target): Likewise.
1906 * linux-low.c (linux_arch_string): New.
1907 (linux_target_ops): Add it.
1908 * linux-low.h (struct linux_target_ops): Add arch_string.
1909 * server.c (write_qxfer_response): Use const void * for DATA.
1910 (get_features_xml): New.
1911 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1912 * target.h (struct target_ops): Add arch_string method.
1914 2007-01-03 Denis Pilat <denis.pilat@st.com>
1915 Daniel Jacobowitz <dan@codesourcery.com>
1917 * linux-low.c (linux_kill): Handle being called with no threads.
1918 * win32-i386-low.c (win32_kill): Likewise.
1919 (get_child_debug_event): Clear current_process_handle.
1921 2006-12-30 Denis PILAT <denis.pilat@st.com>
1922 Daniel Jacobowitz <dan@codesourcery.com>
1924 * remote-utils.c (remote_open): Check the type of specified
1925 serial port devices before opening them.
1926 * server.c (main): Kill the inferior if an error occurs during
1927 the first remote_open.
1929 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1931 * README: Update supported targets.
1933 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1935 * Makefile.in (clean): Remove reg-mips64.c.
1936 (reg-mips64.c, reg-mips64.o): New rules.
1937 * configure.srv: Handle mips64. Include regset support for mips.
1938 * linux-mips-low.c (union mips_register): New.
1939 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1940 (mips_breakpoint, mips_breakpoint_at): Use int.
1941 (mips_collect_register, mips_supply_register)
1942 (mips_collect_register_32bit, mips_supply_register_32bit)
1943 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1944 (mips_store_fpregset, target_regsets): New.
1945 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1947 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1949 * configure.srv: Add target "spu*-*-*".
1950 * Makefile.in (clean): Remove reg-spu.c.
1951 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1952 * spu-low.c: New file.
1954 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1956 * configure.ac: Correct td_thr_tls_get_addr test.
1957 * configure: Regenerated.
1959 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1961 * linux-low.c (linux_wait_for_event): Reformat. Use the
1963 * remote-utils.c (decode_address_to_semicolon): New.
1964 * server.c (pass_signals, handle_general_set): New.
1965 (handle_query): Mention QPassSignals for qSupported.
1966 (main): Call handle_general_set.
1967 * server.h (pass_signals, decode_address_to_semicolon): New.
1969 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1971 * server.c (handle_query): Correct error handling for read_auxv.
1973 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1975 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1976 and srv_linux_thread_db to yes.
1977 * linux-s390-low.c (s390_fill_gregset): New function.
1978 (target_regsets): Define data structure.
1980 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1982 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1983 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1984 * config.in, configure: Regenerated.
1985 * inferiors.c (gdb_id_to_thread): New function.
1986 (gdb_id_to_thread_id): Use it.
1987 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1988 * linux-low.h (struct process_info): Add th member.
1989 (thread_db_get_tls_address): New prototype.
1990 * remote-utils.c (decode_address): Make non-static.
1991 * server.c (handle_query): Handle qGetTLSAddr.
1992 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1993 * target.h (struct target_ops): Add get_tls_address.
1994 * thread-db.c (maybe_attach_thread): Save the thread handle.
1995 (thread_db_get_tls_address): New.
1997 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1999 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2000 (linux_resume_one_process): Take a siginfo_t *. Update all
2001 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2002 (struct pending_signals): Add a siginfo_t.
2003 (linux_wait_for_process): Always set last_status.
2004 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2005 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2006 * linux-low.h (struct process_info): Add last_status.
2008 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2010 * remote-utils.c (try_rle): New function.
2011 (putpkt_binary): Use it.
2013 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2015 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2016 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2017 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2018 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2019 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2022 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2024 * server.c (terminal_fd): New variable.
2025 (old_foreground_pgrp): Likewise.
2026 (restore_old_foreground_pgrp): New function.
2027 (start_inferior): Record the terminal file descriptor in terminal_fd
2028 and its original foreground group in old_foreground_pgrp. Register
2029 restore_old_foreground_pgrp with atexit().
2031 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2033 * server.c (handle_query): Correct qPart to qXfer.
2035 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2037 * configure.ac: Check for more headers which are missing on
2038 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2039 * configure.srv: Add Cygwin and mingw32.
2040 * remote-utils.c: Don't include headers unconditionally which
2041 are missing on mingw32. Include <winsock.h> for mingw32.
2042 (remote_open): Adjust for mingw32 support. Flush
2043 standard error after writing to it.
2044 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2045 (unblock_async_io, enable_async_io, disable_async_io)
2046 (readchar, getpkt): Update for Winsock support.
2047 (prepare_resume_reply): Expect a protocol signal number.
2048 * server.c: Disable <sys/wait.h> on mingw32.
2049 (start_inferior): Adjust for mingw32 support. Flush
2050 standard error after writing to it.
2051 (attach_inferior): Likewise. Use protocol signal
2053 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2055 * win32-i386-low.c: New file.
2056 * Makefile.in (XM_CLIBS): Set.
2057 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2058 (win32-i386-low.o): New dependency rule.
2059 * linux-low.c (linux_wait): Use target signal numbers.
2060 * target.h (struct target_ops): Doc fix.
2061 * server.h (target_signal_to_name): New prototype.
2062 * gdbreplay.c: Don't include headers unconditionally which
2063 are missing on mingw32. Include <winsock.h> for mingw32.
2064 (remote_close, remote_open): Adjust for Winsock support.
2065 * configure, config.in: Regenerated.
2067 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2069 * server.c (decode_xfer_read, write_qxfer_response): New.
2070 (handle_query): Take a packet length argument. Handle
2071 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2072 the qSupported response.
2073 (main): Update call to handle_query.
2075 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2077 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2078 (putpkt_binary): Renamed from putpkt and adjusted for binary
2080 (putpkt): New wrapper for putpkt_binary.
2081 (readchar): Don't mask off the high bit.
2082 (decode_X_packet): New function.
2083 * server.c (main): Call putpkt_binary if a handler sets the packet
2084 length. Save the length of the incoming packet. Handle 'X'.
2085 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2087 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2089 * server.c (handle_query): Handle qSupported.
2091 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2093 * remote-utils.c (all_symbols_looked_up): New variable.
2094 (look_up_one_symbol): Check it.
2095 * server.h (look_up_one_symbol): New declaration.
2096 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2098 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2100 * Makefile.in (linux-arm-low.o): Update dependencies.
2101 * linux-arm-low.c: Include "gdb_proc_service.h".
2102 (PTRACE_GET_THREAD_AREA): Define.
2103 (ps_get_thread_area): New function.
2105 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2107 * configure.srv (m68k*-*-uclinux*): New target.
2108 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2109 (linux_resume_one_process): Remove extraneous cast.
2110 (linux_read_offsets): New.
2111 (linux_target_op): Add linux_read_offsets on mmuless systems.
2112 * server.c (handle_query): Add qOffsets logic.
2113 * target.h (struct target_ops): Add read_offsets.
2115 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2117 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2118 (PTRACE_GET_THREAD_AREA): Define.
2119 (ps_get_thread_area): New function.
2120 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2121 (linux-x86-64-low.o): Update.
2123 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2125 * configure.ac: Remove checks for prfpregset_t.
2126 * gdb_proc_service.h: New file.
2127 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2128 new "gdb_proc_service.h".
2129 * proc-service.c: Likewise.
2130 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2131 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2132 * Makefile.in (gdb_proc_service_h): Updated.
2133 * configure, config.in: Regenerated.
2135 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2137 * remote-utils.c (prepare_resume_reply): Move declaration
2138 of gdb_id_from_wait to the top of the block.
2140 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2142 * linux-low.c (regsets_store_inferior_registers): Read the regset
2143 from the target before filling it.
2145 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2147 * server.c (attach_inferior): Return SIGTRAP for a successful
2150 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2152 * Makefile.in (OBS): Add version.o.
2153 (STAGESTUFF): Delete.
2154 (version.o): Add dependencies.
2155 (version.c): Replace rule.
2156 (clean): Remove version.c.
2157 * server.c (gdbserver_version): New.
2158 (gdbserver_usage): Use printf.
2159 (main): Handle --version and --help.
2160 * server.h (version, host_name): Add declarations.
2162 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2174 * linux-x86-64-low.c:
2177 * linux-ppc64-low.c:
2186 * linux-crisv32-low.c:
2198 * gdbserver.1: Add (C) after Copyright. Update the FSF
2201 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2203 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2204 (arm_breakpoint_at): Recognize both breakpoints.
2205 (the_low_target): Use the correct breakpoint instruction.
2207 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2209 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2210 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2211 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2212 (the_low_target): Update.
2214 2005-10-25 Andreas Schwab <schwab@suse.de>
2216 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2218 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2219 (ia64_num_regs): Reduce to 462.
2221 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2223 * acinclude.m4: Correct quoting.
2224 * aclocal.m4: Regenerated.
2226 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2227 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2228 (thread_db_init): Call thread_db_err_str.
2229 * configure.ac: Check for TD_VERSION.
2230 * config.in, configure: Regenerated.
2232 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2234 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2236 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2238 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2239 is not available. Define HAVE_PTRACE_GETREGS if it is.
2240 * config.in, configure: Regenerated.
2241 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2242 * linux-i386-low.c, linux-m68k-low.c: Update to use
2243 HAVE_PTRACE_GETREGS.
2244 * linux-low.c (regsets_fetch_inferior_registers)
2245 (regsets_store_inferior_registers): Only return 0 if we processed
2247 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2248 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2250 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2252 * inferiors.c (struct thread_info): Add gdb_id.
2253 (add_thread): Add gdb_id argument.
2254 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2255 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2256 calls to add_thread.
2257 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2258 * server.c (handle_query): Use thread_to_gdb_id.
2259 (handle_v_cont, main): Use gdb_id_to_thread_id.
2260 * server.h (add_thread): Update prototype.
2261 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2264 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2266 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2267 left-padded registers.
2268 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2269 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2271 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2273 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2274 * configure: Regenerate.
2275 * config.in: Regenerate.
2276 * server.h (NEED_DECLARATION_STRERROR):
2277 Replace with !HAVE_DECL_STRERROR.
2279 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2281 * linux-low.c (linux_wait, linux_send_signal): Don't test
2282 an unsigned long variable for > 0 if it could be MAX_ULONG.
2283 * server.c (myresume): Likewise.
2284 * target.c (set_desired_inferior): Likewise.
2286 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2288 * configure.ac: Simplify and improve check for socklen_t.
2289 * configure, config.in: Regenerate.
2291 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2293 * acconfig.h: Remove.
2294 * configure.ac: Add a test for socklen_t. Use three-argument
2295 AC_DEFINE throughout.
2296 * config.in: Regenerated using autoheader 2.59.
2297 * configure: Regenerated.
2299 * gdbreplay.c (socklen_t): Provide a default.
2300 (remote_open): Use socklen_t.
2301 * remote-utils.c (socklen_t): Provide a default.
2302 (remote_open): Use socklen_t.
2303 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2306 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2308 * linux-low.c (linux_read_memory, linux_write_memory)
2309 (linux_read_auxv): Likewise.
2310 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2311 (check_mem_write): Likewise.
2312 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2314 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2315 (registers_from_string, register_data): Likewise.
2316 * server.c (handle_query, main): Likewise.
2317 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2318 (decode_M_packet): Likewise.
2319 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2320 * target.h (struct target_ops): Update read_memory, write_memory,
2322 (read_inferior_memory, write_inferior_memory): Update.
2323 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2325 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2326 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2327 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2328 linux-s390-low.c, linux-sh-low.c: Update for changes in
2329 read_inferior_memory and the_low_target->breakpoint.
2331 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2333 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2334 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2335 * configure.srv: Add powerpc64-*-linux*.
2336 * linux-ppc64-low.c: New file.
2338 2005-05-23 Orjan Friberg <orjanf@axis.com>
2340 * linux-cris-low.c: New file with support for CRIS.
2341 * linux-crisv32-low.c: Ditto for CRISv32.
2342 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2343 (clean): Add reg-cris.c and reg-crisv32.c.
2344 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2345 reg-crisv32.o, and reg-crisv32.c to make rules.
2346 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2349 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2351 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2352 of sizeof (PTRACE_XFER_TYPE).
2353 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2355 2005-05-12 Orjan Friberg <orjanf@axis.com>
2357 * target.h (struct target_ops): Add insert_watchpoint,
2358 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2359 pointers for hardware watchpoint support.
2360 * linux-low.h (struct linux_target_ops): Ditto.
2361 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2362 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2363 to linux_target_ops.
2364 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2366 * server.c (main): Recognize 'Z' and 'z' packets.
2368 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2370 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2371 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2372 (the_low_target): Add new members.
2374 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2376 * proc-service.c (ps_lgetregs): Search all_processes instead of
2379 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2381 * server.c (start_inferior): Change return type to int.
2382 (attach_inferior): Change sigptr to int *.
2383 (handle_v_cont, handle_v_requests): Change signal to int *.
2384 (main): Change signal to int.
2386 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2388 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2389 * configure.srv: Add m32r*-*-linux*.
2390 * linux-m32r-low.c: New file.
2392 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2394 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2396 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2398 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2399 Take unsigned long arguments for PIDs.
2400 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2401 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2402 (wait_for_sigstop, linux_resume_one_process)
2403 (regsets_fetch_inferior_registers, linux_send_signal)
2404 (linux_read_auxv): Likewise. Update the types of variables holding
2405 PIDs. Update format string specifiers.
2406 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2407 * remote-utils.c (prepare_resume_reply): Likewise.
2408 * server.c (cont_thread, general_thread, step_thread)
2409 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2411 (handle_query): Update format specifiers.
2412 (handle_v_cont, main): Use strtoul for thread IDs.
2413 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2414 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2415 (general_thread, step_thread, thread_from_wait)
2416 (old_thread_from_wait): Update.
2417 * target.h (struct thread_resume): Use unsigned long for THREAD.
2418 (struct target_ops): Use unsigned long for arguments to attach and
2421 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2423 * acinclude.m4: Include bfd/bfd.m4 directly.
2424 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2425 <agriffis@toolchain.org>.
2426 * aclocal.m4, configure: Regenerated.
2428 2005-01-07 Andrew Cagney <cagney@gnu.org>
2430 * configure.ac: Rename configure.in, require autoconf 2.59.
2431 * configure: Re-generate.
2433 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2435 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2437 * aclocal.m4: Regenerated.
2438 * configure: Regenerated.
2440 2004-11-21 Andreas Schwab <schwab@suse.de>
2442 * linux-m68k-low.c (m68k_num_gregs): Define.
2443 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2444 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2445 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2446 (m68k_breakpoint_at): New. Add to the_low_target.
2448 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2449 srv_linux_thread_db to yes.
2451 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2453 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2454 (ARCH_SET_FS): Likewise.
2455 (ARCH_GET_FS): Likewise.
2456 (ARCH_GET_GS): Likewise.
2458 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2460 * linux-i386-low.c (ps_get_thread_area): New.
2461 * linux-x86-64-low.c (ps_get_thread_area): New.
2462 * linux-low.c: Include <sys/syscall.h>.
2463 (linux_kill_one_process): Don't kill the first thread here.
2464 (linux_kill): Kill the first thread here.
2465 (kill_lwp): New function.
2466 (send_sigstop, linux_send_signal): Use it.
2467 * proc-service.c: Clean up #ifdefs.
2468 (fpregset_info): Delete.
2469 (ps_lgetregs): Update and enable implementation.
2470 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2472 * remote-utils.c (struct sym_cache, symbol_cache): New.
2473 (input_interrupt): Print a clearer message.
2474 (async_io_enabled): New variable.
2475 (enable_async_io, disable_async_io): Use it. Update comments.
2476 (look_up_one_symbol): Use the symbol cache.
2477 * thread-db.c (thread_db_look_up_symbols): New function.
2478 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2480 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2482 * configure.in: Test for -rdynamic.
2483 * configure: Regenerated.
2484 * Makefile (INTERNAL_LDFLAGS): New.
2485 (gdbserver, gdbreplay): Use it.
2487 2004-09-02 Andrew Cagney <cagney@gnu.org>
2489 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2491 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2493 * linux-low.c (linux_wait): Clear all_processes list also.
2495 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2497 * linux-low.c: Include <errno.h>. Remove extern declaration of
2500 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2502 * gdbreplay.c, server.h, utils.c: Update copyright years.
2504 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2506 * server.c (main): Print child status or termination signal from
2507 variable 'signal', not 'sig'.
2509 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2511 * linux-low.c (linux_read_memory): Change return type to
2512 int. Check for and return error from ptrace().
2513 * target.c (read_inferior_memory): Change return type to int. Pass
2514 back return status from the_target->read_memory().
2515 * target.h (struct target_ops): Adapt *read_memory() prototype.
2517 (read_inferior_memory): Adapt prototype.
2518 * server.c (main): Return an error packet if
2519 read_inferior_memory() returns an error.
2521 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2523 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2524 Unify with other clean targets.
2526 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2528 * server.c (handle_v_cont): Call set_desired_inferior.
2530 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2532 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2534 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2536 * linux-low.c (linux_wait): Unblock async I/O.
2537 (linux_resume): Block and enable async I/O.
2538 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2539 * server.h (block_async_io, unblock_async_io): Add prototypes.
2541 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2543 * remote-utils.c (remote_open): Print a status notice after
2545 * server.c (attach_inferior): Print a status notice after
2548 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2550 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2552 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2554 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2556 * server.c, target.h: Update copyright years.
2558 2004-02-25 Roland McGrath <roland@redhat.com>
2560 * target.h (struct target_ops): New member `read_auxv'.
2561 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2562 * linux-low.c (linux_read_auxv): New function.
2563 (linux_target_ops): Initialize `read_auxv' member to that.
2565 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2567 Committed by Jim Blandy <jimb@redhat.com>.
2569 * linux-s390-low.c (s390_num_regs): Update.
2570 (s390_regmap): Remove control registers. Use __s390x__ predefine
2571 instead of GPR_SIZE to distiguish s390 and s390x targets.
2573 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2575 * linux-low.c: Update copyright year.
2576 (check_removed_breakpoint): Clear pending_is_breakpoint.
2577 (linux_set_resume_request, linux_queue_one_thread)
2578 (resume_status_pending_p): New functions.
2579 (linux_continue_one_thread): Use process->resume.
2580 (linux_resume): Only resume threads if there are no pending events.
2581 * linux-low.h (struct process_info): Add resume request
2584 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2586 * regcache.c (new_register_cache): Clear the allocated register
2587 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2589 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2591 * linux-low.c (linux_resume): Take a struct thread_resume *
2593 (linux_wait): Update call.
2594 (resume_ptr): New static variable.
2595 (linux_continue_one_thread): Renamed from
2596 linux_continue_one_process. Use resume_ptr.
2597 (linux_resume): Use linux_continue_one_thread.
2598 * server.c (handle_v_cont, handle_v_requests): New functions.
2599 (myresume): New function.
2600 (main): Handle 'v' case.
2601 * target.h (struct thread_resume): New type.
2602 (struct target_ops): Change argument of "resume" to struct
2604 (myresume): Delete macro.
2606 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2608 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2609 (uninstall): Support DESTDIR.
2611 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2613 * configure.srv: Add xscale*linux copy of arm*linux entry.
2615 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2617 * linux-arm-low.c (arm_reinsert_addr): New function.
2618 (the_low_target): Add arm_reinsert_addr.
2620 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2622 * mem-break.c: Remove whitespace at end of file.
2624 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2626 * configure.in: Check whether we need to prototype strerror.
2627 * server.h: Optionally prototype strerror.
2628 * gdbreplay.c (perror_with_name): Use strerror.
2629 * linux-low.c (linux_attach_lwp): Use strerror.
2630 * utils.c (perror_with_name): Use strerror.
2631 * config.in, configure: Regenerated.
2633 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2635 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2636 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2638 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2640 * Makefile.in (SFILES): Update.
2641 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2642 low-sun3.c: Remove files.
2644 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2646 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2647 (linux_detach_one_process, linux_detach): New functions.
2648 (linux_target_ops): Add linux_detach.
2649 * server.c (main): Handle 'D' packet.
2650 * target.h (struct target_ops): Add "detach" member.
2651 (detach_inferior): Define.
2653 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2655 From Kelley Cook <kelleycook@wideopenwest.com>:
2656 * configure.srv: Accept i[34567]86 variants.
2658 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2660 * linux-low.c (linux_wait_for_event): Correct comment typos.
2661 (linux_resume_one_process): Call check_removed_breakpoint.
2662 (linux_send_signal): New function.
2663 (linux_target_ops): Add linux_send_signal.
2664 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2666 * target.h (struct target_ops): Add send_signal.
2668 2003-05-29 Jim Blandy <jimb@redhat.com>
2670 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2671 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2672 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2673 away part of the register's value.
2675 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2677 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2678 (linux_wait_for_event, linux_init_signals): Likewise.
2680 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2682 * configure.in: Check for stdlib.h.
2683 * configure: Regenerated.
2684 * config.in: Regenerated.
2686 2003-01-04 Andreas Schwab <schwab@suse.de>
2688 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2690 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2692 * Makefile.in: Remove obsolete code.
2694 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2696 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2697 defined(PT_FPR0_HI).
2699 2002-11-17 Stuart Hughes <seh@zee2.com>
2701 * linux-arm-low.c (arm_num_regs): Increase.
2702 (arm_regmap): Include status register.
2704 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2706 * linux-low.c (register_addr): Remove incorrect -1 check.
2708 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2710 * linux-low.c (linux_create_inferior): Call setpgid. Return
2712 (unstopped_p, linux_signal_pid): Remove.
2713 (linux_target_ops): Remove linux_signal_pid.
2714 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2715 global instead of target method.
2716 * target.h (struct target_ops): Remove signal_pid. Update comment
2717 for create_inferior.
2718 * server.c (signal_pid): New variable.
2719 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2720 gdbserver. Set the child to be the foreground process group.
2721 (attach_inferior): Set signal_pid.
2723 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2725 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2727 2002-08-20 Jim Blandy <jimb@redhat.com>
2729 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2732 2002-08-01 Andrew Cagney <cagney@redhat.com>
2734 * Makefile.in: Make chill references obsolete.
2736 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2738 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2739 * configure: Regenerate.
2740 * config.in: Regenerate.
2742 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2744 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2745 (perror_with_name, remote_close, remote_open, expect, play): Static.
2747 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2749 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2750 byte offsets instead of an array of indexes.
2751 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2753 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2755 * regcache.c: Add comment.
2757 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2759 * thread-db.c: New file.
2760 * proc-service.c: New file.
2761 * acinclude.m4: New file.
2762 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2763 proc-service.o, and thread-db.o.
2764 (linux-low.o): Add USE_THREAD_DB.
2765 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2766 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2767 * aclocal.m4: Regenerated.
2768 * config.in: Regenerated.
2769 * configure: Regenerated.
2770 * configure.in: Check for proc_service.h, sys/procfs.h,
2771 thread_db.h, and linux/elf.h headrs.
2772 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2773 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2774 Check for -lthread_db and thread support.
2775 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2776 PowerPC, and SuperH.
2777 * i387-fp.c: Constify arguments.
2778 * i387-fp.h: Likewise.
2779 * inferiors.c: (struct thread_info): Renamed from
2780 `struct inferior_info'. Remove PID member. Use generic inferior
2781 list header. All uses updated.
2782 (inferiors, signal_pid): Removed.
2783 (all_threads): New variable.
2784 (get_thread): Define.
2785 (add_inferior_to_list): New function.
2786 (for_each_inferior): New function.
2787 (change_inferior_id): New function.
2788 (add_inferior): Removed.
2789 (remove_inferior): New function.
2790 (add_thread): New function.
2791 (free_one_thread): New function.
2792 (remove_thread): New function.
2793 (clear_inferiors): Use for_each_inferior and free_one_thread.
2794 (find_inferior): New function.
2795 (find_inferior_id): New function.
2796 (inferior_target_data): Update argument type.
2797 (set_inferior_target_data): Likewise.
2798 (inferior_regcache_data): Likewise.
2799 (set_inferior_regcache_data): Likewise.
2800 * linux-low.c (linux_bp_reinsert): Remove.
2801 (all_processes, stopping_threads, using_thrads)
2802 (struct pending_signals, debug_threads, pid_of): New.
2803 (inferior_pid): Replace with macro.
2804 (struct inferior_linux_data): Remove.
2805 (get_stop_pc, add_process): New functions.
2806 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2807 Use add_process and add_thread.
2808 (linux_attach_lwp): New function, based on old linux_attach. Use
2809 add_process and add_thread. Set stop_expected for new threads.
2810 (linux_attach): New function.
2811 (linux_kill_one_process): New function.
2812 (linux_kill): Kill all LWPs.
2813 (linux_thread_alive): Use find_inferior_id.
2814 (check_removed_breakpoints, status_pending_p): New functions.
2815 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2816 Update. Use WNOHANG. Wait for cloned processes also. Update process
2817 struct for the found process.
2818 (linux_wait_for_event): New function.
2819 (linux_wait): Use it. Support LWPs.
2820 (send_sigstop, wait_for_sigstop, stop_all_processes)
2821 (linux_resume_one_process, linux_continue_one_process): New functions.
2822 (linux_resume): Support LWPs.
2823 (REGISTER_RAW_SIZE): Remove.
2824 (fetch_register): Use register_size instead. Call supply_register.
2825 (usr_store_inferior_registers): Likewise. Call collect_register.
2827 (regsets_fetch_inferior_registers): Improve error message.
2828 (regsets_store_inferior_registers): Add debugging.
2829 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2830 (unstopped_p, linux_signal_pid): New functions.
2831 (linux_target_ops): Add linux_signal_pid.
2832 (linux_init_signals): New function.
2833 (initialize_low): Call it. Initialize using_threads.
2834 * regcache.c (inferior_regcache_data): Add valid
2836 (get_regcache): Fetch registers lazily. Add fetch argument
2837 and update all callers.
2838 (regcache_invalidate_one, regcache_invalidate): New
2840 (new_register_cache): Renamed from create_register_cache.
2841 Return the new regcache.
2842 (free_register_cache): Change argument to a void *.
2843 (registers_to_string, registers_from_string): Call get_regcache
2844 with fetch flag set.
2845 (register_data): Make static. Pass fetch flag to get_regcache.
2846 (supply_register): Call get_regcache with fetch flag clear.
2847 (collect_register): Call get_regcache with fetch flag set.
2848 (collect_register_as_string): New function.
2849 * regcache.h: Update.
2850 * remote-utils.c (putpkt): Flush after debug output and use
2852 Handle input interrupts while waiting for an ACK.
2853 (input_interrupt): Use signal_pid method.
2854 (getpkt): Flush after debug output and use stderr.
2855 (outreg): Use collect_register_as_string.
2856 (new_thread_notify, dead_thread_notify): New functions.
2857 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2859 (look_up_one_symbol): Flush after debug output.
2860 * server.c (step_thread, server_waiting): New variables.
2861 (start_inferior): Don't use signal_pid. Update call to mywait.
2862 (attach_inferior): Update call to mywait.
2863 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2864 (main): Don't fetch/store registers explicitly. Use
2865 set_desired_inferior. Support proposed ``Hs'' packet. Update
2868 (struct inferior_list, struct_inferior_list_entry): New.
2869 * target.c (set_desired_inferior): New.
2870 (write_inferior_memory): Constify.
2871 (mywait): New function.
2873 (struct target_ops): New signal_pid method.
2874 (mywait): Removed macro, added prototype.
2876 * linux-low.h (regset_func): Removed.
2877 (regset_fill_func, regset_store_func): New.
2878 (enum regset_type): New.
2879 (struct regset_info): Add type field. Use new operation types.
2880 (struct linux_target_ops): stop_pc renamed to get_pc.
2881 Add decr_pc_after_break and breakpoint_at.
2882 (get_process, get_thread_proess, get_process_thread)
2883 (strut process_info, all_processes, linux_attach_lwp)
2884 (thread_db_init): New.
2886 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2887 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2888 (the_low_target): Add new members.
2889 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2890 (i386_store_fpxregset): Constify.
2891 (target_regsets): Add new kind identifier.
2892 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2893 (i386_set_pc): Add debugging.
2894 (i386_breakpoint_at): New function.
2895 (the_low_target): Add new members.
2896 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2897 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2898 (mips_breakpoint_at): New.
2899 (the_low_target): Add new members.
2900 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2901 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2902 (the_low_target): Add new members.
2903 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2904 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2905 (the_low_target): Add new members.
2906 * linux-x86-64-low.c (target_regsets): Add new kind
2909 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2911 From Martin Pool <mbp@samba.org>:
2912 * server.c (gdbserver_usage): New function.
2915 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2917 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2920 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2922 * Makefile.in: Remove obsolete code.
2924 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2926 * linux-low.c (regsets_fetch_inferior_registers),
2927 (regsets_store_inferior_registers): Removed cast to int from
2929 * regcache.h: Added declaration of struct inferior_info.
2931 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2933 * inferiors.c (struct inferior_info): Add regcache_data.
2934 (add_inferior): Call create_register_cache.
2935 (clear_inferiors): Call free_register_cache.
2936 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2937 * regcache.c (struct inferior_regcache_data): New.
2938 (registers): Remove.
2939 (get_regcache): New function.
2940 (create_register_cache, free_register_cache): New functions.
2941 (set_register_cache): Don't initialize the register cache here.
2942 (registers_to_string, registers_from_string, register_data): Call
2944 * regcache.h: Add prototypes.
2945 * server.h: Likewise.
2947 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2949 * mem-break.c: New file.
2950 * mem-break.h: New file.
2951 * Makefile.in: Add mem-break.o rule; update server.h
2953 * inferiors.c (struct inferior_info): Add target_data
2955 (clear_inferiors): Free target_data member if set.
2956 (inferior_target_data, set_inferior_target_data): New functions.
2957 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2958 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2959 * linux-low.c (linux_bp_reinsert): New variable.
2960 (struct inferior_linux_data): New.
2961 (linux_create_inferior): Use set_inferior_target_data.
2962 (linux_attach): Likewise. Call add_inferior.
2963 (linux_wait_for_one_inferior): New function.
2964 (linux_wait): Call it.
2965 (linux_write_memory): Add const.
2966 (initialize_low): Call set_breakpoint_data.
2967 * linux-low.h (struct linux_target_ops): Add breakpoint
2969 * server.c (attach_inferior): Remove extra add_inferior
2971 * server.h: Include mem-break.h. Update inferior.c
2973 * target.c (read_inferior_memory)
2974 (write_inferior_memory): New functions.
2975 * target.h (read_inferior_memory)
2976 (write_inferior_memory): Change macros to prototypes.
2977 (struct target_ops): Update comments. Add const to write_memory
2980 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2982 * linux-low.c (usr_store_inferior_registers): Support
2983 registers which are allowed to fail to store.
2984 * linux-low.h (linux_target_ops): Likewise.
2985 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2986 (ppc_cannot_store_register): FPSCR may not be storable.
2988 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2990 * server.h: Include <string.h> if HAVE_STRING_H.
2991 * ChangeLog: Correct paths in last ChangeLog entry.
2993 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2995 * linux-low.h: Remove obsolete prototypes.
2996 (struct linux_target_ops): New.
2997 (extern the_low_target): New.
2998 * linux-low.c (num_regs, regmap): Remove declarations.
2999 (register_addr): Use the_low_target explicitly.
3000 (fetch_register): Likewise.
3001 (usr_fetch_inferior_registers): Likewise.
3002 (usr_store_inferior_registers): Likewise.
3003 * linux-arm-low.c (num_regs): Remove.
3004 (arm_num_regs): Define.
3005 (arm_regmap): Renamed from regmap, made static.
3006 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3008 (arm_cannot_store_register): Renamed from cannot_store_register,
3010 (the_low_target): New.
3011 * linux-i386-low.c (num_regs): Remove.
3012 (i386_num_regs): Define.
3013 (i386_regmap): Renamed from regmap, made static.
3014 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3016 (i386_cannot_store_register): Renamed from cannot_store_register,
3018 (the_low_target): New.
3019 * linux-ia64-low.c (num_regs): Remove.
3020 (ia64_num_regs): Define.
3021 (ia64_regmap): Renamed from regmap, made static.
3022 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3024 (ia64_cannot_store_register): Renamed from cannot_store_register,
3026 (the_low_target): New.
3027 * linux-m68k-low.c (num_regs): Remove.
3028 (m68k_num_regs): Define.
3029 (m68k_regmap): Renamed from regmap, made static.
3030 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3032 (m68k_cannot_store_register): Renamed from cannot_store_register,
3034 (the_low_target): New.
3035 * linux-mips-low.c (num_regs): Remove.
3036 (mips_num_regs): Define.
3037 (mips_regmap): Renamed from regmap, made static.
3038 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3040 (mips_cannot_store_register): Renamed from cannot_store_register,
3042 (the_low_target): New.
3043 * linux-ppc-low.c (num_regs): Remove.
3044 (ppc_num_regs): Define.
3045 (ppc_regmap): Renamed from regmap, made static.
3046 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3048 (ppc_cannot_store_register): Renamed from cannot_store_register,
3050 (the_low_target): New.
3051 * linux-s390-low.c (num_regs): Remove.
3052 (s390_num_regs): Define.
3053 (s390_regmap): Renamed from regmap, made static.
3054 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3056 (s390_cannot_store_register): Renamed from cannot_store_register,
3058 (the_low_target): New.
3059 * linux-sh-low.c (num_regs): Remove.
3060 (sh_num_regs): Define.
3061 (sh_regmap): Renamed from regmap, made static.
3062 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3064 (sh_cannot_store_register): Renamed from cannot_store_register,
3066 (the_low_target): New.
3067 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3068 (the_low_target): New.
3070 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3072 * Makefile.in: Add stamp-h target.
3073 * configure.in: Create stamp-h.
3074 * configure: Regenerated.
3076 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3078 * inferiors.c: New file.
3079 * target.c: New file.
3080 * target.h: New file.
3081 * Makefile.in: Add target.o and inferiors.o. Update
3083 * linux-low.c (inferior_pid): New static variable,
3084 moved from server.c.
3085 (linux_create_inferior): Renamed from create_inferior.
3086 Call add_inferior. Return 0 on success instead of a PID.
3087 (linux_attach): Renamed from myattach.
3088 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3089 (linux_thread_alive): Renamed from mythread_alive.
3090 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3092 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3093 (regsets_store_inferior_registers): Correct error message.
3094 Add missing ``return 0''.
3095 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3096 (linux_store_registers): Renamed from store_inferior_registers.
3097 (linux_read_memory): Renamed from read_inferior_memory.
3098 (linux_write_memory): Renamed from write_inferior_memory.
3099 (linux_target_ops): New structure.
3100 (initialize_low): Call set_target_ops ().
3101 * remote-utils.c (unhexify): New function.
3102 (hexify): New function.
3103 (input_interrupt): Send signals to ``signal_pid''.
3104 * server.c (inferior_pid): Remove.
3105 (start_inferior): Update create_inferior call.
3106 (attach_inferior): Call add_inferior.
3107 (handle_query): New function.
3108 (main): Call handle_query for `q' packets.
3109 * server.h: Include "target.h". Remove obsolete prototypes.
3110 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3112 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3114 * Makefile.in: Add WARN_CFLAGS. Update configury
3116 * configure.in: Check for <string.h>
3117 * configure: Regenerate.
3118 * config.in: Regenerate.
3119 * gdbreplay.c: Include needed system headers.
3120 (remote_open): Remove strchr prototype.
3121 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3122 * regcache.c (supply_register): Change buf argument to const void *.
3123 (supply_register_by_name): Likewise.
3124 (collect_register): Change buf argument to void *.
3125 (collect_register_by_name): Likewise.
3126 * regcache.h: Add missing prototypes.
3127 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3128 * server.c (handle_query): New function.
3129 (attached): New static variable, moved out of main.
3130 (main): Quiet longjmp clobber warnings.
3131 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3132 * utils.c (error): Remove NORETURN.