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