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