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