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