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