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