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