1 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10 (init_registers_powerpc_cell32l): Add prototype.
11 (init_registers_powerpc_cell64l): Likewise.
12 (ppc_arch_setup): Detect Cell/B.E. architecture.
14 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 * Makefile.in (datarootdir): New variable.
18 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
20 * linux-low.c (linux_write_memory): Update debugging output.
21 * Makefile.in (clean): Add new descriptions.
22 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
23 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
24 * configure.srv: Add new files for arm*-*-linux*.
25 * linux-arm-low.c: Add new declarations.
26 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
27 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
28 (HWCAP_VFPv3D16): New.
29 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
30 instead of __IWMMXT__.
31 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
32 (arm_arch_setup): New.
33 (target_regsets): Remove #ifdef. Add VFP regset.
34 (the_low_target): Use arm_arch_setup.
36 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
38 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
39 the main thread again.
41 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
43 Adding Neutrino gdbserver.
44 * configure: Regenerated.
45 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
46 * configure.srv (i[34567]86-*-nto*): New target.
47 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
48 * remote-utils.c [__QNX__]: Include sys/iomgr.h
49 (nto_comctrl) [__QNX__]: New function.
50 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
52 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
54 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
57 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
58 Pedro Alves <pedro@codesourcery.com>
60 * win32-i386-low.c (i386_get_thread_context): Handle systems that
61 don't support CONTEXT_EXTENDED_REGISTERS.
62 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
63 (the_low_target): Install them.
64 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
65 failing with ERROR_PIPE_NOT_CONNECTED.
67 2009-06-30 Doug Evans <dje@google.com>
68 Pierre Muller <muller@ics.u-strasbg.fr>
70 Add h/w watchpoint support to x86-linux, win32-i386.
71 * Makefile.in (SFILES): Add i386-low.c
73 (i386-low.o): Add dependencies.
74 (linux-x86-low.o): Add i386-low.h dependency.
75 (win32-i386-low.o): Ditto.
76 * i386-low.c: New file.
77 * i386-low.h: New file.
78 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
79 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
80 * linux-low.c (linux_add_process): Initialize arch_private.
81 (linux_remove_process): Free arch_private.
82 (add_lwp): Initialize arch_private.
83 (delete_lwp): Free arch_private.
84 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
86 * linux-low.h (process_info_private): New member arch_private.
87 (lwp_info): New member arch_private.
88 (linux_target_ops): New members new_process, new_thread,
91 * linux-x86-low.c: Include stddef.h, i386-low.h.
92 (arch_process_info): New struct.
93 (arch_lwp_info): New struct.
94 (x86_linux_dr_get, x86_linux_dr_set): New functions.
95 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
96 (i386_dr_low_get_status): New function.
97 (x86_insert_point, x86_remove_point): New functions.
98 (x86_stopped_by_watchpoint): New function.
99 (x86_stopped_data_address): New function.
100 (x86_linux_new_process, x86_linux_new_thread): New functions.
101 (x86_linux_prepare_to_resume): New function.
102 (the_low_target): Add entries for insert_point, remove_point,
103 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
105 * server.c (debug_hw_points): New global.
106 (monitor_show_help): Document set debug-hw-points.
107 (handle_query): Process "set debug-hw-points".
108 * server.h (debug_hw_points): Declare.
110 * utils.c (NUMCELLS, CELLSIZE): New macros.
111 (get_sell, xsnprintf, paddress): New functions.
112 * win32-arm-low.c (the_low_target): Add entries for insert_point,
113 remove_point, stopped_by_watchpoint, stopped_data_address.
114 * win32-i386-low.c: Include i386-low.h.
115 (debug_reg_state): Replaces dr.
116 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
117 (i386_dr_low_get_status): New function.
118 (i386_insert_point, i386_remove_point): New functions.
119 (i386_stopped_by_watchpoint): New function.
120 (i386_stopped_data_address): New function.
121 (i386_initial_stuff): Update.
122 (get_thread_context,set_thread_context,i386_thread_added): Update.
123 (the_low_target): Add entries for insert_point,
124 remove_point, stopped_by_watchpoint, stopped_data_address.
125 * win32-low.c (win32_insert_watchpoint): New function.
126 (win32_remove_watchpoint): New function.
127 (win32_stopped_by_watchpoint): New function.
128 (win32_stopped_data_address): New function.
129 (win32_target_ops): Add entries for insert_watchpoint,
130 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
131 * win32-low.h (win32_target_ops): New members insert_point,
132 remove_point, stopped_by_watchpoint, stopped_data_address.
134 2009-06-25 Pedro Alves <pedro@codesourcery.com>
136 * server.c (process_serial_event): Re-return unsupported, not
137 error, if the type isn't recognized. Re-allow supporting only
138 insert or remove packets. Also call require_running for
139 breakpoints. Add missing break statement to default case. Tidy.
140 * target.h (struct target_ops): Rename insert_watchpoint to
141 insert_point, and remove_watchpoint to remove_point.
143 * linux-low.h (struct linux_target_ops): Likewise.
144 * linux-low.c (linux_insert_watchpoint): Rename to ...
145 (linux_insert_point): ... this. Adjust.
146 (linux_remove_watchpoint): Rename to ...
147 (linux_remove_point): ... this. Adjust.
148 (linux_target_ops): Adjust.
149 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
150 (cris_insert_point): ... this.
151 (cris_remove_watchpoint): Rename to ...
152 (cris_remove_point): ... this.
153 (the_low_target): Adjust.
155 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
157 * server.c (handle_v_kill): Pass signal_pid to
158 kill_inferior if multi_process is zero.
160 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
162 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
163 * target.h (target_ops): Comment for *_watchpoint to make it clear
164 the functions can get types '0' and '1'.
166 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
168 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
169 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
170 * regcache.c (get_regcache): Likewise.
171 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
172 * win32-low.c (child_fetch_inferior_registers): Remove check for
175 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
176 Pedro Alves <pedro@codesourcery.com>
178 * target.h (struct target_ops) <supports_multi_process>: New
180 (target_supports_multi_process): New.
181 * server.c (handle_query): Even if GDB reports support, only
182 enable multi-process if the target also supports it. Report
183 multi-process support only if the target backend supports it.
184 * linux-low.c (linux_supports_multi_process): New function.
185 (linux_target_ops): Install it as target_supports_multi_process
188 2009-05-24 Doug Evans <dje@google.com>
190 Global renaming of find_thread_pid to find_thread_ptid.
191 * server.h (find_thread_ptid): Renamed from find_thread_pid.
192 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
195 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
196 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
199 * linux-low.c (get_stop_pc): Print pc if debug_threads.
200 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
201 (linux_resume_one_lwp): Ditto.
203 2009-05-23 Doug Evans <dje@google.com>
205 * linux-low.c (linux_resume_one_lwp): Change type of first arg
206 from struct inferior_list_entry * to struct lwp_info *.
209 2009-05-13 Doug Evans <dje@google.com>
211 * linux-x86-low.c: Don't include assert.h.
212 (x86_siginfo_fixup): Use fatal, not assert.
213 (x86_arch_setup): Fix comment.
215 2009-05-12 Doug Evans <dje@google.com>
217 Biarch support for i386/amd64 gdbserver.
218 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
220 (linux-i386-low.o, linux-x86-64-low.o): Delete.
221 (linux-x86-low.o): Add.
222 * linux-x86-64-low.c: Delete.
223 * linux-i386-low.c: Delete.
224 * linux-x86-low.c: New file.
225 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
227 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
229 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
230 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
231 (linux_child_pid_to_exec_file): New function.
232 (elf_64_header_p, elf_64_file_p): New functions.
233 (siginfo_fixup): New function.
234 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
235 give target a chance to convert layout.
236 * linux-low.h (linux_target_ops): New member siginfo_fixup.
237 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
239 2009-05-07 Doug Evans <dje@google.com>
241 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
242 (regsets_store_inferior_registers): Ditto.
244 2009-05-06 Pedro Alves <pedro@codesourcery.com>
248 * linux-low.c (must_set_ptrace_flags): Delete.
249 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
251 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
252 `lwp->must_set_ptrace_flags' instead.
253 (linux_wait_for_event_1): Set ptrace options here.
254 (linux_wait_1): ... not here.
256 2009-04-30 Doug Evans <dje@google.com>
258 * inferiors.c (started_inferior_callback): New function.
259 (attached_inferior_callback): New function.
260 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
261 * server.c (print_started_pid, print_attached_pid): New functions.
262 (detach_or_kill_for_exit): New function.
263 (main): Call it instead of for_each_inferior (kill_inferior_callback).
264 * server.h (have_started_inferiors_p): Declare.
265 (have_attached_inferiors_p): Declare.
267 * inferiors.c (remove_process): Fix memory leak, free process.
268 * linux-low.c (linux_remove_process): New function.
269 (linux_kill): Call it instead of remove_process.
270 (linux_detach, linux_wait_1): Ditto.
272 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
274 * configure.srv: Add x86 Windows CE target.
276 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
278 * inferiors.c (get_thread_process): Make global.
279 * server.h (get_thread_process): Add prototype.
280 * thread-db.c (find_one_thread): Use get_thread_process
281 instead of current_process.
282 (thread_db_get_tls_address): Do not crash if called when
283 thread layer is not yet initialized.
285 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
287 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
288 * spu-low.c (current_tid): Rename to ...
289 (current_ptid): ... this.
290 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
291 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
292 ptid_get_lwp (current_ptid) instead of current_tid.
293 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
294 instead of current_tid. Use find_process_pid to verify pid
295 argument is valid. Pass proper argument to remove_process.
296 (spu_thread_alive): Compare current_ptid instead of current_tid.
297 (spu_resume): Likewise.
299 2009-04-02 Pedro Alves <pedro@codesourcery.com>
301 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
304 2009-04-01 Pedro Alves <pedro@codesourcery.com>
306 Implement the multiprocess extensions, and add linux multiprocess
309 * server.h (ULONGEST): Declare.
310 (struct ptid, ptid_t): New.
311 (minus_one_ptid, null_ptid): Declare.
312 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
313 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
314 (struct inferior_list_entry): Change `id' type from unsigned from
316 (struct sym_cache, struct breakpoint, struct
317 process_info_private): Forward declare.
318 (struct process_info): Declare.
319 (current_process): Declare.
320 (all_processes): Declare.
321 (initialize_inferiors): Declare.
322 (add_thread): Adjust to use ptid_t.
323 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
324 (add_process, remove_process, find_thread_pid): Declare.
325 (find_inferior_id): Adjust to use ptid_t.
326 (cont_thread, general_thread, step_thread): Change type to ptid_t.
327 (multi_process): Declare.
328 (push_event): Adjust to use ptid_t.
329 (read_ptid, write_ptid): Declare.
330 (prepare_resume_reply): Adjust to use ptid_t.
331 (clear_symbol_cache): Declare.
332 * inferiors.c (all_processes): New.
333 (null_ptid, minus_one_ptid): New.
334 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
335 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
336 (add_thread): Change unsigned long to ptid. Remove gdb_id
338 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
339 (gdb_id_to_thread): Rename to ...
340 (find_thread_pid): ... this. Change unsigned long to ptid.
341 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
342 (loaded_dll, pull_pid_from_list): Adjust.
343 (add_process, remove_process, find_process_pid)
344 (get_thread_process, current_process, initialize_inferiors): New.
345 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
346 (struct target_waitstatus) <related_pid>: Ditto.
347 (struct target_ops) <kill, detach>: Add `pid' argument. Change
349 (struct target_ops) <join>: Add `pid' argument.
350 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
351 (struct target_ops) <wait>: Add `ptid' field. Change return type
353 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
354 (mywait): Add `ptid' argument. Change return type to ptid_t.
355 (target_pid_to_str): Declare.
356 * target.c (set_desired_inferior): Adjust to use ptids.
357 (mywait): Add new `ptid' argument. Adjust.
358 (target_pid_to_str): New.
359 * mem-break.h (free_all_breakpoints): Declare.
360 * mem-break.c (breakpoints): Delelete.
361 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
362 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
363 to use per-process breakpoint list.
364 (free_all_breakpoints): New.
365 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
366 (symbol_cache, all_symbols_looked_up): Delete.
368 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
370 (prepare_resume_reply): Change ptid argument's type from unsigned
371 long to ptid_t. Adjust. Implement W;process and X;process.
372 (free_sym_cache, clear_symbol_cache): New.
373 (look_up_one_symbol): Adjust to per-process symbol cache. *
374 * server.c (cont_thread, general_thread, step_thread): Change type
377 (multi_process): New.
378 (last_ptid): Change type to ptid_t.
379 (struct vstop_notif) <ptid>: Change type to ptid_t.
380 (queue_stop_reply, push_event): Change `ptid' argument's type to
382 (discard_queued_stop_replies): Add `pid' argument.
383 (start_inferior): Adjust to use ptids. Adjust to mywait interface
384 changes. Don't reference the `attached' global.
385 (attach_inferior): Adjust to mywait interface changes.
386 (handle_query): Adjust to use ptids. Parse GDB's qSupported
387 features. Handle and report "multiprocess+". Handle
389 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
391 (handle_v_kill): New.
392 (handle_v_stopped): Adjust to use target_pid_to_str.
393 (handle_v_requests): Allow multiple attaches and runs when
394 multiprocess extensions are in effect. Handle "vKill".
395 (myresume): Adjust to use ptids.
396 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
397 (handle_status): Adjust to discard_queued_stop_replies interface
399 (first_thread_of, kill_inferior_callback)
400 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
401 (main): Call initialize_inferiors. Adjust to use ptids, killing
402 and detaching from all inferiors. Handle multiprocess packet
404 * linux-low.h: Include gdb_proc_service.h.
405 (struct process_info_private): New.
406 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
407 <lwpid_of>: Use ptid_get_lwp.
408 (get_lwp_thread): Adjust.
409 (struct lwp_info): Add `dead' member.
410 (find_lwp_pid): Declare.
411 * linux-low.c (thread_db_active): Delete.
412 (new_inferior): Adjust comment.
413 (inferior_pid): Delete.
414 (linux_add_process): New.
415 (handle_extended_wait): Adjust.
416 (add_lwp): Change unsigned long to ptid.
417 (linux_create_inferior): Add process to processes table. Adjust
418 to use ptids. Don't set new_inferior here.
419 (linux_attach_lwp): Rename to ...
420 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
421 it. Adjust to use ptids.
422 (linux_attach_lwp): New.
423 (linux_attach): Add process to processes table. Don't set
425 (struct counter): New.
426 (second_thread_of_pid_p, last_thread_of_process_p): New.
427 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
429 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
430 processes. Remove process from process table.
431 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
432 to multiple processes.
433 (any_thread_of): New.
434 (linux_detach): Add `pid' argument, and handle it. Remove process
435 from processes table.
436 (linux_join): Add `pid' argument. Handle it.
437 (linux_thread_alive): Change unsighed long argument to ptid_t.
438 Consider dead lwps as not being alive.
439 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
440 threads we're not interested in.
441 (same_lwp, find_lwp_pid): New.
442 (linux_wait_for_lwp): Change `pid' argument's type from int to
444 (linux_wait_for_event): Rename to ...
445 (linux_wait_for_event_1): ... this. Change `pid' argument's type
446 from int to ptid_t. Adjust.
447 (linux_wait_for_event): New.
448 (linux_wait_1): Add `ptid' argument. Change return type to
449 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
450 that exit from the process table.
451 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
453 (mark_lwp_dead): New.
454 (wait_for_sigstop): Adjust to use ptids. If a process exits while
455 stopping all threads, mark its main lwp as dead.
456 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
458 (fetch_register, usr_store_inferior_registers)
459 (regsets_fetch_inferior_registers)
460 (regsets_store_inferior_registers, linux_read_memory)
461 (linux_write_memory): Inline `inferior_pid'.
462 (linux_look_up_symbols): Adjust to use per-process
464 (linux_request_interrupt): Adjust to use ptids.
465 (linux_read_auxv): Inline `inferior_pid'.
466 (initialize_low): Don't reference thread_db_active.
467 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
468 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
469 (ps_getpid): Return the pid of the current inferior.
470 * thread-db.c (proc_handle, thread_agent): Delete.
471 (thread_db_create_event, thread_db_enable_reporting): Adjust to
473 (find_one_thread): Change argument type to ptid_t. Adjust to
475 (maybe_attach_thread): Adjust to per-process data and ptids.
476 (thread_db_find_new_threads): Ditto.
477 (thread_db_init): Ditto.
478 * spu-low.c (spu_create_inferior, spu_attach): Add process to
479 processes table. Adjust to use ptids.
480 (spu_kill, spu_detach): Adjust interface. Remove process from
482 (spu_join, spu_thread_alive): Adjust interface.
483 (spu_wait): Adjust interface. Remove process from processes
484 table. Adjust to use ptids.
485 * win32-low.c (current_inferior_tid): Delete.
486 (current_inferior_ptid): New.
487 (debug_event_ptid): New.
488 (thread_rec): Take a ptid. Adjust.
489 (child_add_thread): Add `pid' argument. Adjust to use ptids.
490 (child_delete_thread): Ditto.
491 (do_initial_child_stuff): Add `attached' argument. Add process to
493 (child_fetch_inferior_registers, child_store_inferior_registers):
495 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
496 (win32_attach): Pass 1 to do_initial_child_stuff.
497 (win32_kill): Adjust interface. Remove process from processes
499 (win32_detach): Ditto.
500 (win32_join): Adjust interface.
501 (win32_thread_alive): Take a ptid.
502 (win32_resume): Adjust to use ptids.
503 (get_child_debug_event): Ditto.
504 (win32_wait): Adjust interface. Remove exiting process from
507 2009-04-01 Pedro Alves <pedro@codesourcery.com>
509 Non-stop mode support.
511 * server.h (non_stop): Declare.
512 (gdb_client_data, handler_func): Declare.
513 (delete_file_handler, add_file_handler, start_event_loop):
515 (handle_serial_event, handle_target_event, push_event)
516 (putpkt_notif): Declare.
517 * target.h (enum resume_kind): New.
518 (struct thread_resume): Replace `step' field by `kind' field.
519 (TARGET_WNOHANG): Define.
520 (struct target_ops) <wait>: Add `options' argument.
521 <supports_non_stop, async, start_non_stop>: New fields.
522 (target_supports_non_stop, target_async): New.
523 (start_non_stop): Declare.
524 (mywait): Add `options' argument.
525 * target.c (mywait): Add `options' argument. Print child exit
527 (start_non_stop): New.
528 * server.c (non_stop, own_buf, mem_buf): New globals.
529 (struct vstop_notif): New.
530 (notif_queue): New global.
531 (queue_stop_reply, push_event, discard_queued_stop_replies)
532 (send_next_stop_reply): New.
533 (start_inferior): Adjust to use resume_kind. Adjust to mywait
535 (attach_inferior): In non-stop mode, don't wait for the target
537 (handle_general_set): Handle QNonStop.
538 (handle_query): When handling qC, return the current general
539 thread, instead of the first thread of the list.
540 (handle_query): If the backend supports non-stop mode, include
541 QNonStop+ in the qSupported query response.
542 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
544 (handle_v_attach, handle_v_run): Handle non-stop mode.
545 (handle_v_stopped): New.
546 (handle_v_requests): Report support for vCont;t. Handle vStopped.
547 (myresume): Adjust to use resume_kind. Handle non-stop.
548 (queue_stop_reply_callback): New.
549 (handle_status): Handle non-stop mode.
550 (main): Clear non_stop flag on reconnection. Use the event-loop.
551 Refactor serial protocol handling from here ...
552 (process_serial_event): ... to this new function. When GDB
553 selects any thread, select one here. In non-stop mode, wait until
554 GDB acks all pending events before exiting.
555 (handle_serial_event, handle_target_event): New.
556 * remote-utils.c (remote_open): Install remote_desc in the event
558 (remote_close): Remove remote_desc from the event loop.
559 (putpkt_binary): Rename to...
560 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
561 (putpkt_binary): New as wrapper around putpkt_binary_1.
563 (prepare_resume_reply): In non-stop mode, don't change the
566 * Makefile.in (OBJ): Add event-loop.o.
567 (event-loop.o): New rule.
569 * linux-low.h (pid_of): Moved here.
571 (get_lwp_thread): Use lwpid_of.
572 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
573 * linux-low.c (pid_of): Delete.
574 (inferior_pid): Use lwpid_of.
575 (linux_event_pipe): New.
576 (target_is_async_p): New.
578 (handle_extended_wait): Use lwpid_of.
579 (add_lwp): Don't set lwpid field.
580 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
581 (linux_kill_one_lwp): If killing a running lwp, stop it first.
582 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
583 (linux_detach_one_lwp): If detaching from a running lwp, stop it
584 first. Adjust to linux_wait_for_event interface changes. Use
586 (linux_detach): Don't delete the main lwp here.
587 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
588 (status_pending_p): Don't consider explicitly suspended lwps.
589 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
590 pointer. Add OPTIONS argument. Change return type to int. Use
591 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
592 (linux_wait_for_event): Take an integer pid instead of a lwp_info
593 pointer. Add status pointer argument. Return a pid instead of a
594 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
595 changes. In non-stop mode, don't switch to a random thread.
596 (linux_wait): Rename to...
597 (linux_wait_1): ... this. Add target_options argument, and handle
598 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
599 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
600 clean exit and signal exit code. Don't stop all threads in
601 non-stop mode. In all-stop mode, only stop all threads when
602 reporting a stop to GDB. Handle explicit thread stop requests.
603 (async_file_flush, async_file_mark): New.
605 (send_sigstop): Use lwpid_of.
606 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
607 interface changes. In non-stop mode, don't switch to a random
609 (linux_resume_one_lwp): Use lwpid_of.
610 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
611 (linux_resume_one_thread): ... this. Handle resume_stop. In
612 non-stop mode, don't look for pending flag in all threads.
613 (resume_status_pending_p): Don't consider explicitly suspended
615 (my_waitpid): Reimplement. Emulate __WALL.
616 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
618 (sigchld_handler, linux_supports_non_stop, linux_async)
619 (linux_start_non_stop): New.
620 (linux_target_ops): Register linux_supports_non_stop, linux_async
621 and linux_start_non_stop.
622 (initialize_low): Install SIGCHLD handler.
623 * thread-db.c (thread_db_create_event, find_one_thread)
624 (thread_db_get_tls_address): Use lwpid_of.
625 * win32-low.c (win32_detach): Adjust to use resume_kind.
626 (win32_wait): Add `options' argument.
627 * spu-low.c (spu_resume): Adjust to use resume_kind.
628 (spu_wait): Add `options' argument.
630 2009-04-01 Pedro Alves <pedro@codesourcery.com>
632 Decouple target code from remote protocol.
634 * target.h (enum target_waitkind): New.
635 (struct target_waitstatus): New.
636 (struct target_ops) <wait>: Return an unsigned long. Take a
637 target_waitstatus pointer instead of a char pointer.
639 * target.c (mywait): Change prototype to return an unsigned long.
640 Take a target_waitstatus pointer instead of a char pointer. Adjust.
641 * server.h (thread_from_wait, old_thread_from_wait): Delete
643 (prepare_resume_reply): Change prototype to take a
645 * server.c (thread_from_wait, old_thread_from_wait): Delete.
646 (last_status, last_ptid): New.
647 (start_inferior): Remove "statusptr" argument. Adjust. Return a
648 pid instead of a signal.
649 (attach_inferior): Remove "status" and "signal" parameters.
651 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
653 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
654 (handle_v_requests, myresume): Remove "status" and "signal"
656 (handle_status): New.
657 (main): Delete local `status'. Adjust.
658 * remote-utils.c: Include target.h.
659 (prepare_resume_reply): Change prototype to take a
660 target_waitstatus. Adjust.
662 * linux-low.c (linux_wait): Adjust to new target_ops->wait
664 * spu-low.c (spu_wait): Adjust.
665 * win32-low.c (enum target_waitkind, struct target_waitstatus):
667 (win32_wait): Adjust.
669 2009-04-01 Pedro Alves <pedro@codesourcery.com>
671 * target.h (struct thread_resume): Delete leave_stopped member.
672 (struct target_ops): Add a `n' argument to the `resume' callback.
673 * server.c (start_inferior): Adjust.
674 (handle_v_cont, myresume): Adjust.
675 * linux-low.c (check_removed_breakpoint): Adjust to resume
676 interface change, and to removed leave_stopped field.
677 (resume_ptr): Delete.
678 (struct thread_resume_array): New.
679 (linux_set_resume_request): Add new `arg' parameter. Adjust to
680 resume interface change.
681 (linux_continue_one_thread, linux_queue_one_thread)
682 (resume_status_pending_p): Check if the resume field is NULL
683 instead of checking the leave_stopped member.
684 (linux_resume): Adjust to the target resume interface change.
685 * spu-low.c (spu_resume): Adjust to the target resume interface
687 * win32-low.c (win32_detach, win32_resume): Ditto.
689 2009-04-01 Pedro Alves <pedro@codesourcery.com>
691 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
693 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
695 (linux_continue_one_thread): Only preserve the stepping flag if
696 there's a pending breakpoint.
698 2009-03-31 Pedro Alves <pedro@codesourcery.com>
700 * server.c (main): After the inferior having exited, call
701 remote_close before exiting gdbserver.
703 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
705 Fix size of FPSCR in Power 7 processors.
706 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
707 (PPC_FEATURE_HAS_DFP): New #define.
708 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
711 2009-03-23 Pedro Alves <pedro@codesourcery.com>
713 * server.c (handle_query) Whitespace and formatting.
715 2009-03-22 Pedro Alves <pedro@codesourcery.com>
717 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
718 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
719 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
720 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
721 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
722 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
723 Makefile.in, configure.ac: Fix whitespace throughout.
724 * configure: Regenerate.
726 2009-03-22 Pedro Alves <pedro@codesourcery.com>
728 * inferiors.c (find_inferior): Make it safe for the callback
729 function to delete the currently iterated inferior.
731 2009-03-22 Pedro Alves <pedro@codesourcery.com>
733 * Makefile.in (linuw_low_h): Move higher.
734 (thread-db.o): Depend on $(linux_low_h).
736 2009-03-17 Pedro Alves <pedro@codesourcery.com>
738 Rename "process" to "lwp" throughout.
740 * linux-low.c (all_processes): Rename to...
741 (all_lwps): ... this.
742 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
743 (add_process): Rename to ...
744 (add_lwp): ... this. Adjust.
745 (linux_create_inferior): Adjust.
746 (linux_attach_lwp): Adjust.
747 (linux_attach): Adjust.
748 (linux_kill_one_process): Rename to ...
749 (linux_kill_one_lwp): ... this. Adjust.
750 (linux_kill): Adjust.
751 (linux_detach_one_process): Rename to ...
752 (linux_detach_one_lwp): ... this. Adjust.
753 (linux_detach): Adjust.
754 (check_removed_breakpoint): Adjust.
755 (status_pending_p): Adjust.
756 (linux_wait_for_process): Rename to ...
757 (linux_wait_for_lwp): ... this. Adjust.
758 (linux_wait_for_event): Adjust.
759 (send_sigstop): Adjust.
760 (wait_for_sigstop): Adjust.
761 (stop_all_processes): Rename to ...
762 (stop_all_lwps): ... this.
763 (linux_resume_one_process): Rename to ...
764 (linux_resume_one_lwp): ... this. Adjust.
765 (linux_set_resume_request, linux_continue_one_thread)
766 (linux_queue_one_thread, resume_status_pending_p)
767 (usr_store_inferior_registers, regsets_store_inferior_registers)
768 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
770 * linux-low.h (get_process): Rename to ...
771 (get_lwp): ... this. Adjust.
772 (get_thread_process): Rename to ...
773 (get_thread_lwp): ... this. Adjust.
774 (get_process_thread): Rename to ...
775 (get_lwp_thread): ... this. Adjust.
776 (struct process_info): Rename to ...
777 (struct lwp_info): ... this.
778 (all_processes): Rename to ...
779 (all_lwps): ... this.
780 * proc-service.c (ps_lgetregs): Adjust.
781 * thread-db.c (thread_db_create_event, find_one_thread)
782 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
784 2009-03-14 Pedro Alves <pedro@codesourcery.com>
786 * server.c (handle_query): Handle "qAttached".
788 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
790 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
791 GPLv3, update license URL.
793 2009-03-01 Doug Evans <dje@google.com>
795 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
796 (server_h): Add gdb_signals.h.
798 * server.h (target_signal_from_host,target_signal_to_host_p)
799 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
801 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
803 * remote-utils.c (getpkt): Also generate remote-debug
804 information if noack_mode is set.
806 2009-02-06 Pedro Alves <pedro@codesourcery.com>
808 * server.c (handle_query): Report qXfer:siginfo:read and
809 qXfer:siginfo:write as supported and handle them.
810 * target.h (struct target_ops) <qxfer_siginfo>: New field.
811 * linux-low.c (linux_xfer_siginfo): New.
812 (linux_target_ops): Set it.
814 2009-01-26 Pedro Alves <pedro@codesourcery.com>
816 * server.c (gdbserver_usage): Mention --remote-debug.
817 (main): Accept '--remote-debug' switch.
819 2009-01-18 Doug Evans <dje@google.com>
821 * regcache.c (new_register_cache): No need to check result of xcalloc.
822 * server.c (handle_search_memory): Back out calls to xmalloc,
823 result is checked and error is returned to user upon failure.
824 (handle_query): Ditto. Add more checks for result of malloc.
825 (handle_v_cont): Check result of malloc, report error back to
827 (handle_v_run): Ditto. Call freeargv.
828 * server.h (freeargv): Declare.
829 * utils.c (freeargv): New fn.
831 2009-01-15 Doug Evans <dje@google.com>
833 * gdbreplay.c (perror_with_name): Make arg const char *.
834 * server.h (target_signal_to_name): Make return type const char *.
835 * thread-db.c (thread_db_err_str): Make return type const char *.
836 * utils.c (perror_with_name): Make arg const char *.
838 2009-01-14 Pedro Alves <pedro@codesourcery.com>
840 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
841 when handling a EXIT_PROCESS_DEBUG_EVENT.
843 2009-01-06 Joel Brobecker <brobecker@adacore.com>
845 * gdbreplay.c (gdbreplay_version): Update copyright year.
846 * server.c (gdbserver_version): Likewise.
848 2009-01-05 Doug Evans <dje@google.com>
850 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
851 (handle_extended_wait): Improve comment.
853 2008-12-13 Doug Evans <dje@google.com>
855 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
856 * server.h (ATTR_MALLOC): New macro.
857 (xmalloc,xcalloc,xstrdup): Declare.
858 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
859 * inferiors.c: Ditto.
860 * linux-low.c: Ditto.
861 * mem-break.c: Ditto.
863 * remote-utils.c: Ditto.
866 * win32-low.c: Ditto.
868 2008-12-12 Doug Evans <dje@google.com>
870 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
873 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
875 2008-12-09 Doug Evans <dje@google.com>
877 * linux-low.h (struct process_info): Delete member tid, unused.
878 * thread-db.c (find_one_thread): Update.
879 (maybe_attach_thread): Update.
881 2008-12-02 Pedro Alves <pedro@codesourcery.com>
883 * target.h (struct target_ops): Add qxfer_osdata member.
884 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
886 (linux_qxfer_osdata): New functions.
887 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
889 * server.c (handle_query): Handle "qXfer:osdata:read:".
890 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
891 (buffer_xml_printf): New functions.
892 * server.h (struct buffer): New.
893 (buffer_grow_str, buffer_grow_str0): New macros.
894 (buffer_grow, buffer_free, buffer_init, buffer_finish)
895 (buffer_xml_printf): Declare.
897 2008-11-24 Doug Evans <dje@google.com>
899 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
901 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
903 * server.c (handle_v_run): Always use the supplied argument list.
905 2008-11-19 Bob Wilson <bob.wilson@acm.org>
907 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
908 (xtensa_regmap_table): Add entry for scompare1.
910 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
912 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
913 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
914 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
915 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
916 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
917 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
918 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
919 XML target descriptions.
920 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
921 when inferior is running on an ISA 2.05 or later processor. Add
922 special case to return offset for full 64-bit slot of FPSCR when
925 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
927 * Makefile.in (SFILES, clean): Added sparc64 files.
928 (reg-sparc64.o, reg-sparc64.c): New.
929 * configure.srv (sparc*-*-linux*): New configuration.
930 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
931 syscall arguments for SPARC.
932 (regsets_store_inferior_registers): Likewise.
933 * linux-sparc-low.c: New file.
935 2008-10-21 Doug Evans <dje@google.com>
937 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
938 (READLINE_DIR,READLINE_DEP): Delete.
939 (INTERNAL_CFLAGS): Update.
942 2008-10-10 Pedro Alves <pedro@codesourcery.com>
944 * server.c (handle_v_run): If GDB didn't specify an argv, use the
945 whole argv from the last run, not just argv[0].
947 2008-09-08 Pedro Alves <pedro@codesourcery.com>
949 * regcache.c (new_register_cache): Return NULL if the register
950 cache size isn't known yet.
951 (free_register_cache): Avoid dereferencing a NULL regcache.
953 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
955 * configure.srv: Merge MIPS and MIPS64.
957 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
959 * Makefile.in (uninstall): Apply $(EXEEXT) too.
961 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
963 * Makefile.in: Add required vsx dependencies.
965 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
966 Declare init_registers_powerpc_vsx32l.
967 Declare init_registers_powerpc_vsx64l.
968 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
969 (ppc_arch_setup): Check for VSX in hwcap.
970 (ppc_fill_vsxregset): New function.
971 (ppc_store_vsxregset): New function.
972 Add new VSX entry in regset_info target_regsets.
974 * configure.srv: Add new VSX dependencies.
976 2008-08-12 Pedro Alves <pedro@codesourcery.com>
978 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
979 (remote_open): Set or clear transport_is_reliable.
980 (putpkt_binary): Don't expect acks in noack mode.
981 (getpkt): Don't send ack/nac in noack mode.
982 * server.c (handle_general_set): Handle QStartNoAckMode.
983 (handle_query): If connected by tcp pass QStartNoAckMode+ in
985 (main): Reset noack_mode on every connection.
986 * server.h (noack_mode): Declare.
988 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
990 * Makefile.in (GDBREPLAY_OBS): New variable.
991 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
993 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
994 Daniel Jacobowitz <dan@codesourcery.com>
996 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
997 (usr_store_inferior_registers): Likewise.
998 (regsets_store_inferior_registers): Likewise.
1000 2008-07-31 Rolf Jansen <rj@surtec.com>
1001 Pedro Alves <pedro@codesourcery.com>
1003 * configure.ac: Check for memmem declaration.
1004 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1005 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1006 (disable_packet_qfThreadInfo): Unconditionally compile.
1007 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1008 * configure, config.in: Regenerate.
1010 2008-07-28 Doug Kwan <dougkwan@google.com>
1012 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1013 (linux_write_memory): Remove declaration of errno.
1015 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1017 * linux-low.c (handle_extended_wait): Do not use "status"
1018 variable uninitialized.
1020 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1022 * server.c (handle_v_attach): Inhibit reporting dll changes.
1024 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1026 * remote-utils.c (prepare_resume_reply): If requested, don't
1027 output "thread:TID" in the T stop reply.
1029 * server.c (disable_packet_vCont, disable_packet_Tthread)
1030 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1031 (handle_query): If requested, disable support for qC, qfThreadInfo
1033 (handle_v_requests): If requested, disable support for vCont.
1034 (gdbserver_show_disableable): New.
1035 (main): Handle --disable-packet and --disable-packet=LIST.
1037 * server.h (disable_packet_vCont, disable_packet_Tthread)
1038 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1040 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1042 * server.c (gdbserver_usage): Mention --version.
1044 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1046 * Makefile.in (gdbreplay.o): New rule.
1048 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1050 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1051 message, not gdbserver.
1053 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1054 Nathan Sidwell <nathan@codesourcery.com>
1055 Joseph Myers <joseph@codesourcery.com>
1057 * acinclude.m4: Include ../../config/acx.m4.
1058 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1059 * configure, config.in: Regenerate.
1060 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1061 * server.c (gdbserver_version): Print PKGVERSION.
1062 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1063 (main): Adjust gdbserver_usage calls.
1064 * gdbreplay.c (version, host_name): Add declarations.
1065 (gdbreplay_version, gdbreplay_usage): New.
1066 (main): Accept --version and --help options.
1068 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1070 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1071 (arm_breakpoint_at): Handle Thumb.
1072 (the_low_target): Add comment.
1074 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1076 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1078 2008-05-09 Doug Evans <dje@google.com>
1080 * server.h (decode_search_memory_packet): Declare.
1081 * remote-utils.c (decode_search_memory_packet): New fn.
1082 * server.c (handle_search_memory_1): New fn.
1083 (handle_search_memory): New fn.
1084 (handle_query): Process qSearch:memory packets.
1086 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1088 * regcache.c (registers_length): Remove.
1089 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1090 full register packet.
1091 * regcache.h (registers_length): Remove prototype.
1092 * server.h (PBUFSIZ): Define to 16384.
1094 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1096 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1097 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1098 powerpc-64l.o, and powerpc-altivec64l.o.
1099 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1100 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1101 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1102 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1103 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1106 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1107 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1108 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1109 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1110 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1111 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1112 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1113 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1114 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1115 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1118 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1119 (init_registers_powerpc_32l): ... this new prototype.
1120 (init_registers_powerpc_32): Remove, replace by ...
1121 (init_registers_powerpc_altivec32l): ... this new prototype.
1122 (init_registers_powerpc_e500): Remove, replace by ...
1123 (init_registers_powerpc_e500l): ... this new prototype.
1124 (init_registers_ppc64): Remove, replace by ...
1125 (init_registers_powerpc_64l): ... this new prototype.
1126 (init_registers_powerpc_64): Remove, replace by ...
1127 (init_registers_powerpc_altivec64l): ... this new prototype.
1128 (ppc_num_regs): Set to 73.
1129 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1130 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1131 (ppc_cannot_store_register): Handle orig_r3 and trap.
1132 (ppc_arch_setup): Update init_registers_... calls.
1133 (ppc_fill_gregset): Handle orig_r3 and trap.
1135 * inferiors.c (clear_inferiors): Reset current_inferior.
1137 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1139 * acinclude.m4: Add override.m4.
1140 * configure: Regenerate.
1142 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1144 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1145 initial call to init_register_ppc64.
1147 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1149 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1150 powerpc*-*-linux* case.
1151 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1153 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1155 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1156 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1158 * linux-ppc-low.c: Include <elf.h>.
1159 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1160 (ppc_hwcap): New global variable.
1161 (ppc_regmap): Remove __SPE__ #ifdef sections.
1162 (ppc_regmap_e500): New global variable.
1163 (ppc_cannot_store_register): Update __SPE__ special case.
1164 (ppc_get_hwcap): New function.
1165 (ppc_arch_setup): Use it to determine whether inferior supports
1166 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1167 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1168 Do not access registers if target does not support AltiVec.
1169 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1170 Do not access registers if target does not support SPE.
1171 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1173 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1175 * linux-low.c (disabled_regsets, num_regsets): New.
1176 (use_regsets_p): Delete.
1177 (linux_wait_for_process): Clear disabled_regsets.
1178 (regsets_fetch_inferior_registers): Check and set it.
1179 (regsets_store_inferior_registers): Likewise.
1180 (linux_fetch_registers, linux_store_registers): Do not use
1182 (initialize_low): Allocate disabled_regsets.
1184 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1186 * Makefile.in (LIBOBJS): New.
1188 (memmem.o): New rule.
1189 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1190 * configure: Regenerated.
1192 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1194 * server.c (handle_query): Never return "unsupported" for
1195 qXfer:features:read queries.
1197 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1199 * server.c (get_features_xml): Fix inverted condition.
1200 (handle_query): Always support qXfer:feature:read.
1202 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1204 * server.c (wrapper_argv): New.
1205 (start_inferior): Handle wrapper_argv. If set, expect an extra
1207 (gdbserver_usage): Document --wrapper.
1208 (main): Parse --wrapper.
1210 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1212 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1213 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1214 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1215 (ppc_set_pc): Likewise.
1216 (ppc_arch_setup): New function.
1217 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1218 of collect_register.
1219 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1221 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1223 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1224 instead of linux-ppc64-low.o.
1225 * linux-ppc64-low.c: Remove file.
1226 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1227 (linux-ppc64-low.o): Remove rule.
1229 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1230 (init_registers_powerpc_64): Likewise.
1231 (ppc_regmap): Conditionally define depending on __powerpc64__.
1232 (ppc_cannot_store_register): Do not special-case "fpscr" when
1233 compiled on __powerpc64__.
1234 (ppc_collect_ptrace_register): New function.
1235 (ppc_supply_ptrace_register): New function.
1236 (ppc_breakpoint): Change type to "unsigned int".
1237 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1238 (the_low_target): Conditionally provide initializers for the
1239 arch_setup member depending on __powerpc64__. Install
1240 collect_ptrace_register and supply_ptrace_register members.
1242 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1244 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1245 * server.c (gdbserver_xmltarget): Define.
1246 (get_features_xml): Use it to replace "target.xml" and arch_string.
1248 * configure.srv: Remove srv_xmltarget. Add XML files that were
1249 mentioned there to srv_xmlfiles instead. Remove conditional tests
1250 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1251 srv_xmlfiles and srv_regobj to include all possible choices.
1252 * configure.ac (srv_xmltarget): Remove.
1253 (srv_xmlfiles): Do not add "target.xml".
1254 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1255 checks for supplementary target information.
1256 * configure: Regenerate.
1257 * Makefile.in (XML_TARGET): Remove.
1258 (target.xml): Remove rule.
1259 (clean): Do not clean up target.xml.
1260 (.PRECIOUS): Do not mention target.xml.
1262 * target.h (struct target_ops): Remove arch_string member.
1263 * linux-low.c (linux_arch_string): Remove.
1264 (linux_target_ops): Remove arch_string initializer.
1265 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1266 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1267 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1268 * spu-low.c (spu_arch_string): Remove.
1269 (spu_target_ops): Remove arch_string initializer.
1270 * win32-low.c (win32_arch_string): Remove.
1271 (win32_target_ops): Remove arch_string initializer.
1272 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1273 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1274 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1276 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1278 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1279 by collect_ptrace_register and supply_ptrace_register hooks.
1280 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1281 instead of checking for the_low_target.left_pad_xfer.
1282 (usr_store_inferior_registers): Use collect_ptrace_register callback
1283 instead of checking for the_low_target.left_pad_xfer.
1285 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1286 (s390_supply_ptrace_register): Likewise.
1287 (s390_fill_gregset): Call s390_collect_ptrace_register.
1288 (the_low_target): Update.
1290 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1291 (ppc_supply_ptrace_register): Likewise.
1292 (the_low_target): Update.
1294 * linux-i386-low.c (the_low_target): Update.
1295 * linux-x86-64-low.c (the_low_target): Update.
1297 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1299 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1300 reg-s390.o and reg-s390x.o.
1302 * linux-low.c (new_inferior): New global variable.
1303 (linux_create_inferior, linux_attach): Set it.
1304 (linux_wait_for_process): Call the_low_target.arch_setup after the
1305 target has stopped for the first time.
1306 (initialize_low): Do not call the_low_target.arch_setup.
1308 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1309 (s390_set_pc): Likewise.
1310 (s390_arch_setup): New function.
1311 (the_low_target): Use s390_arch_setup as arch_setup routine.
1313 * regcache.c (realloc_register_cache): New function.
1314 (set_register_cache): Call it for each existing regcache.
1316 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1318 * server.h (init_registers): Remove prototype.
1320 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1321 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1322 instead of init_registers ().
1323 * linux-arm-low.c (init_registers_arm): Add prototype.
1324 (init_registers_arm_with_iwmmxt): Likewise.
1325 (the_low_target): Add initializer for arch_setup field.
1326 * linux-cris-low.c (init_registers_cris): Add prototype.
1327 (the_low_target): Add initializer for arch_setup field.
1328 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1329 (the_low_target): Add initializer for arch_setup field.
1330 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1331 (the_low_target): Add initializer for arch_setup field.
1332 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1333 (the_low_target): Add initializer for arch_setup field.
1334 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1335 (the_low_target): Add initializer for arch_setup field.
1336 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1337 (the_low_target): Add initializer for arch_setup field.
1338 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1339 (init_registers_mips64_linux): Likewise.
1340 (the_low_target): Add initializer for arch_setup field.
1341 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1342 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1343 (the_low_target): Add initializer for arch_setup field.
1344 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1345 (init_registers_powerpc_64): Likewise.
1346 (the_low_target): Add initializer for arch_setup field.
1347 * linux-s390-low.c (init_registers_s390): Add prototype.
1348 (init_registers_s390x): Likewise.
1349 (the_low_target): Add initializer for arch_setup field.
1350 * linux-sh-low.c (init_registers_sh): Add prototype.
1351 (the_low_target): Add initializer for arch_setup field.
1352 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1353 (the_low_target): Add initializer for arch_setup field.
1354 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1355 (the_low_target): Add initializer for arch_setup field.
1357 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1358 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1359 instead of init_registers ().
1360 * win32-arm-low.c (init_registers_arm): Add prototype.
1361 (the_low_target): Add initializer for arch_setup field.
1362 * win32-i386-low.c (init_registers_i386): Add prototype.
1363 (the_low_target): Add initializer for arch_setup field.
1365 * spu-low.c (init_registers_spu): Add prototype.
1366 (initialize_low): Call initialie_registers_spu () instead of
1367 initialize_registers ().
1369 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1371 * server.c (handle_v_requests): When handling the vRun and vAttach
1372 packets, if already debugging a process, don't kill it. Return an
1375 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1377 * server.c (handle_query): Correct length check.
1379 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1381 * win32-low.c (do_initial_child_stuff): Add process handle
1382 parameter. Set current_process_handle and current_process_id from the
1383 parameters. Clear globals.
1384 (win32_create_inferior): Don't set current_process_handle and
1385 current_process_id here. Instead pass them on the call to
1386 do_initial_child_stuff.
1387 (win32_attach): Likewise.
1388 (win32_clear_inferiors): New.
1389 (win32_kill): Don't close the current process handle or the
1390 current thread handle here. Instead call win32_clear_inferiors.
1391 (win32_detach): Don't open a new handle to the process. Call
1392 win32_clear_inferiors.
1393 (win32_join): Don't rely on current_process_handle; open a new
1394 handle using the process id.
1395 (win32_wait): Call win32_clear_inferiors when the inferior process
1398 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1400 * server.c (monitor_show_help): Add "exit".
1402 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1404 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1405 (clean): Add reg-xtensa.c.
1406 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1407 * configure.srv (xtensa*-*-linux*) New target.
1408 * linux-xtensa-low.c: New.
1409 * xtensa-xtregs.c: New.
1411 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1413 * hostio.c: Don't include errno.h.
1414 (errno_to_fileio_errno): Move to hostio-errno.
1415 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1416 error number outputting to the target->hostio_last_error callback.
1417 (hostio_packet_error): Use FILEIO_EINVAL directly.
1418 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1419 calls to hostio_error.
1420 * hostio-errno.c: New.
1421 * server.h (hostio_last_error_from_errno): Declare.
1422 * target.h (target_ops): Add hostio_last_error member.
1423 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1424 as hostio_last_error handler.
1425 * spu-low.c (spu_target_ops): Likewise.
1426 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1427 (wince_hostio_last_error): New functions.
1428 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1429 as hostio_last_error handler.
1430 (win32_target_ops) [!_WIN32_WCE]: Register
1431 hostio_last_error_from_errno as hostio_last_error handler.
1432 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1433 (hostio-errno.o): New rule.
1434 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1435 * configure.srv (srv_hostio_err_objs): New variable. Default to
1437 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1438 * configure: Regenerate.
1440 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1442 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1443 (linux_kill, linux_detach): Clean up the process list.
1444 * remote-utils.c (remote_open): Improve port number parsing.
1445 (putpkt_binary, input_interrupt): Only send interrupts if the target
1447 * server.c (extended_protocol): Make static.
1448 (attached): Define earlier.
1449 (exit_requested, response_needed, program_argv): New variables.
1450 (target_running): New.
1451 (start_inferior): Clear attached here.
1452 (attach_inferior): Set attached here.
1453 (require_running): Define.
1454 (handle_query): Use require_running and target_running. Implement
1456 (handle_v_attach, handle_v_run): New.
1457 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1458 (gdbserver_usage): Update.
1459 (main): Redo argument parsing. Handle --debug and --multi. Handle
1460 --attach along with other options or after the port. Save
1461 program_argv. Support no initial program. Resynchronize
1462 communication with GDB after an error. Handle "monitor exit".
1463 Use require_running and target_running. Always allow the extended
1464 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1465 restart in extended mode.
1466 * README: Refer to the GDB manual. Update --attach usage.
1468 2007-12-20 Andreas Schwab <schwab@suse.de>
1470 * linux-low.c (STACK_SIZE): Define.
1471 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1472 (linux_test_for_tracefork): Likewise.
1474 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1476 * linux-low.c (linux_wait_for_event): Update messages. Do not
1477 reinsert auto-delete breakpoints.
1478 * mem-break.c (struct breakpoint): Change return type of handler to
1480 (set_breakpoint_at): Update handler type.
1481 (reinsert_breakpoint_handler): Return 1 instead of calling
1483 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1485 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1486 * mem-break.h (set_breakpoint_at): Update handler type.
1487 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1488 * win32-low.c (auto_delete_breakpoint): New.
1489 (get_child_debug_event): Use it.
1491 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1493 * configure.ac: Check for pread and pwrite.
1494 * hostio.c (handle_pread): Fall back to lseek and read.
1495 (handle_pwrite): Fall back to lseek and write.
1496 * config.in, configure: Regenerated.
1498 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1500 * server.c (myresume): Add own_buf argument.
1501 (main): Update calls.
1503 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1505 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1506 * remote-utils.c (remote_open): Do not call disable_async_io.
1507 (block_async_io): Delete.
1508 (unblock_async_io): Make static.
1509 (initialize_async_io): New.
1510 * server.c (handle_v_cont): Handle async I/O here.
1511 (myresume): Likewise. Move other common resume tasks here...
1512 (main): ... from here. Call initialize_async_io. Disable async
1513 I/O before the main loop.
1514 * server.h (initialize_async_io): Declare.
1515 (block_async_io, unblock_async_io): Delete prototypes.
1516 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1518 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1520 * remote-utils.c (readchar): Allow binary data in received messages.
1522 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1524 * win32-low.c (attaching): New global.
1525 (win32_create_inferior): Clear the `attaching' global.
1526 (win32_attach): Set the `attaching' global.
1527 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1528 attaching. Only set a breakpoint at the entry point if not
1531 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1533 * server.c (main): Don't report dll events on the initial
1534 connection on attaches.
1536 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1538 * server.c (main): Relax numerical bases supported for the pid of
1539 the --attach command line argument.
1541 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1543 * win32-low.c (win32_attach): Call OpenProcess before
1544 DebugActiveProcess, not after. Add last error output to error
1547 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1549 * win32-low.c (win32_get_thread_context)
1550 (win32_set_thread_context): New functions.
1551 (thread_rec): Use win32_get_thread_context.
1552 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1553 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1556 2007-12-03 Leo Zayas
1557 Pedro Alves <pedro_alves@portugalmail.pt>
1559 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1561 (child_add_thread): Minor cleanup.
1562 (child_continue): Resume artificially suspended threads before
1563 calling ContinueDebugEvent.
1564 (suspend_one_thread): New.
1565 (fake_breakpoint_event): New.
1566 (get_child_debug_event): Change return type to int. Check here if
1567 gdb sent an interrupt request. If a soft interrupt was requested,
1568 fake a breakpoint event. Return 0 if there is no event to handle,
1570 (win32_wait): Don't check here if gdb sent an interrupt request.
1571 Ensure there is a valid event to handle.
1572 (win32_request_interrupt): Add soft interruption method as last
1575 2007-12-03 Leo Zayas
1576 Pedro Alves <pedro_alves@portugalmail.pt>
1578 * win32-low.h (win32_thread_info): Add descriptions to the
1579 structure members. Replace `suspend_count' counter by a
1581 * win32-low.c (thread_rec): Update condition of when to get the
1582 context from the inferior. Rely on ContextFlags being set if it
1583 has already been retrieved. Only suspend the inferior thread if
1584 we haven't already. Warn if that fails.
1585 (continue_one_thread): s/suspend_count/suspended/. Only call
1586 ResumeThread once. Warn if that fails.
1588 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1590 * win32-low.c (win32_wait): Don't read from the inferior when it
1593 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1595 * Makefile.in (win32_low_h): New variable.
1596 (win32-low.o): Add dependency on $(win32_low_h).
1597 (win32-arm-low.o, win32-i386-low.o): New rules.
1599 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1601 * hostio.c: Correct copyright year.
1603 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1605 * Makefile.in (OBS): Add hostio.o.
1606 (hostio.o): New rule.
1607 * server.h (handle_vFile): Declare.
1608 * hostio.c: New file.
1609 * server.c (handle_v_requests): Take packet_len and new_packet_len
1610 for binary packets. Call handle_vFile.
1611 (main): Update call to handle_v_requests.
1613 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1615 * linux-low.c: Include <sched.h>.
1617 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1619 * linux-low.c (linux_tracefork_grandchild): New.
1620 (linux_tracefork_child): Use clone.
1621 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1623 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1625 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1627 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1629 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1631 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1633 * inferiors.c (change_inferior_id): Delete.
1634 (add_pid_to_list, pull_pid_from_list): New.
1635 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1636 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1637 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1638 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1639 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1640 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1641 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1642 (using_threads): Always set to 1.
1643 (handle_extended_wait): New.
1644 (add_process): Do not set TID.
1645 (linux_create_inferior): Set must_set_ptrace_flags.
1646 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1647 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1648 (linux_thread_alive): Rename TID argument to LWPID.
1649 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1650 (linux_wait_for_event): Do not use TID or check using_threads. Update
1651 call to dead_thread_notify. Call handle_extended_wait.
1652 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1653 (send_sigstop): Delete sigstop_sent.
1654 (wait_for_sigstop): Avoid TID.
1655 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1656 (linux_test_for_tracefork): New.
1657 (linux_lookup_signals): Use thread_db_active and
1658 linux_supports_tracefork_flag.
1659 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1660 * linux-low.h (get_process_thread): Avoid TID.
1661 (struct process_ifo): Move thread_known and tid to the end. Remove
1663 (linux_attach_lwp, thread_db_init): Update prototypes.
1664 * server.h (change_inferior_id): Delete prototype.
1665 (add_pid_to_list, pull_pid_from_list): New prototypes.
1666 * thread-db.c (thread_db_use_events): New.
1667 (find_first_thread): Rename to...
1668 (find_one_thread): ...this. Update callers and messages. Do not
1669 call fatal. Check thread_db_use_events. Do not call
1670 change_inferior_id or new_thread_notify.
1671 (maybe_attach_thread): Update. Do not call new_thread_notify.
1672 (thread_db_init): Set thread_db_use_events. Check use_events.
1673 * utils.c (fatal, warning): Correct message prefix.
1675 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1677 * Makefile.in (clean): Remove new files.
1678 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1679 (powerpc-64.o, powerpc-64.c): New rules.
1680 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1681 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1683 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1685 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1686 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1687 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1688 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1689 (target_regsets): Add AltiVec and SPE register sets.
1690 * configure.ac: Check for AltiVec and SPE.
1691 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1692 (ppc_fill_vrregset, ppc_store_vrregset): New.
1693 (target_regsets): Add AltiVec register set.
1694 * configure: Regenerated.
1696 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1698 * linux-low.c (O_LARGEFILE): Define.
1699 (linux_read_memory): Use /proc/PID/mem.
1700 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1701 * configure, config.in: Regenerated.
1703 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1705 * linux-low.c (linux_wait_for_event): Do not pass signals while
1708 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1710 * win32-low.c (create_process): New.
1711 (win32_create_inferior): Use create_process instead of
1712 CreateProcess. If create_process failed retry appending an ".exe"
1713 suffix. Store the GetLastError result immediatelly after
1714 create_process calls and use it on the call to error.
1716 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1718 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1720 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1722 * configure.ac: Switch license to GPLv3.
1724 2007-08-01 Michael Snyder <msnyder@access-company.com>
1726 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1728 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1730 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1732 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1733 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1734 CloseToolhelp32Snapshot.
1735 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1736 CloseToolhelp32Snapshot.
1738 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1740 * server.c (main): Check for inferior exit before main loop.
1742 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1744 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1745 instead of on tmp_desc.
1747 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1748 Daniel Jacobowitz <dan@codesourcery.com>
1750 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1751 (add_thread): Minor cleanups.
1752 (clear_inferiors): Move lower in the file. Clear the DLL
1754 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1755 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1756 (xml_escape_text): New.
1757 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1759 (handle_v_cont): Report errors.
1760 (gdbserver_version): Update.
1761 (main): Correct size of own_buf. Do not report initial DLL events.
1762 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1763 (unloaded_dll, xml_escape_text): New.
1764 * win32-low.c (enum target_waitkind): Update comments.
1765 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1766 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1767 (win32_EnumProcessModules, win32_GetModuleInformation)
1768 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1769 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1770 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1771 (win32_Module32First, win32_Module32Next, load_toolhelp)
1772 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1773 (get_child_debug_event): Handle DLL events.
1774 (win32_wait): Likewise.
1776 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1778 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1779 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1781 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1783 * win32-low.c (handle_output_debug_string): Ignore event if not
1786 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1788 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1790 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1792 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1794 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1796 * inferiors.c (change_inferior_id): Add comment.
1797 * linux-low.c (check_removed_breakpoint): Add an early
1798 prototype. Improve debug output.
1799 (linux_attach): Doc update.
1800 (linux_detach_one_process, linux_detach): Clean up before releasing
1802 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1803 * linux-low.h (struct process_info): Doc improvement.
1804 * mem-break.c (delete_all_breakpoints): New.
1805 * mem-break.h (delete_all_breakpoints): New prototype.
1806 * thread-db.c (find_first_thread): New.
1807 (thread_db_create_event): Call it instead of
1808 thread_db_find_new_threads. Clean up unused variables.
1809 (maybe_attach_thread): Remove first thread handling.
1810 (thread_db_find_new_threads): Use find_first_thread.
1811 (thread_db_get_tls_address): Likewise.
1813 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1815 * thread-db.c (thread_db_find_new_threads): Add prototype.
1816 (thread_db_create_event): Check for the main thread before adding
1818 (maybe_attach_thread): Only enable event reporting if TID == 0.
1819 (thread_db_get_tls_address): Check for new threads.
1821 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1823 * linux-low.c (linux_create_inferior): Try execv before execvp.
1824 * spu-low.c (spu_create_inferior): Likewise.
1826 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1828 * linux-low.c (linux_create_inferior): Change execv to execvp.
1829 * spu-low.c (spu_create_inferior): Likewies.
1831 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1833 * Makefile.in (clean): Clean new files instead of deleted ones.
1834 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1835 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1837 * configure.srv: Specify XML files and new regformats for MIPS and
1839 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1840 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1841 an entry for the restart register.
1842 (mips_cannot_fetch_register, mips_cannot_store_register)
1843 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1844 register names to match the XML descriptions.
1845 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1846 restart register instead of $0.
1848 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1849 Markus Deuling <deuling@de.ibm.com>
1851 * remote-utils.c (decode_xfer_write): New function.
1852 * server.h (decode_xfer_write): Add prototype.
1853 * server.c (handle_query): Add PACKET_LEN argument. Support
1854 qXfer:spu:read and qXfer:spu:write packets.
1855 (main): Pass packet_len to handle_query.
1856 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1857 * target.h (target_ops): Add qxfer_spu.
1859 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1861 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1862 accessing non-seekable spufs files.
1864 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1866 * server.c (handle_query): Add reply for qC packet.
1868 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1869 Leo Zayas <lerele@champenstudios@com>
1871 * server.h (check_remote_input_interrupt_request): New function.
1872 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1873 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1874 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1875 (check_remote_input_interrupt_request): New function.
1876 * server.h (check_remote_input_interrupt_request): Declare.
1877 * win32-low.c (winapi_DebugBreakProcess,
1878 winapi_GenerateConsoleCtrlEvent): New typedefs.
1879 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1881 (win32_wait): Check for remote interrupt request
1882 with check_remote_input_interrupt_request.
1883 (win32_request_interrupt): New function.
1884 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1886 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1888 * win32-low.c (debug_registers_changed,
1889 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1890 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1891 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1892 (thread_rec): Get context using the low target.
1893 (child_add_thread): Call thread_added on the low target,
1894 which does the same thing.
1896 (do_initial_child_stuff): Remove debug registers references.
1897 Set context using the low target. Resume threads after
1898 setting the contexts.
1899 (child_continue): Remove dead variable. Remove debug
1900 registers references.
1901 (child_fetch_inferior_registers): Go through the low target.
1902 (do_child_store_inferior_registers): Remove.
1903 (child_store_inferior_registers): Go through the low target.
1904 (win32_resume): Remove debug registers references.
1905 Set context using the low target.
1906 (handle_exception): Change return type to void. Don't record
1907 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1908 first chance exception.
1909 (get_child_debug_event): Change return type to void. Remove
1910 goto loop. Always return after waiting for debug event.
1911 (win32_wait): Convert to switch statement. Handle spurious
1914 * win32-i386-low.c (debug_registers_changed,
1915 debug_registers_used): New.
1916 (initial_stuff): Rename to ...
1917 (i386_initial_stuff): ... this. Clear debug registers
1919 (store_debug_registers): Delete.
1920 (i386_get_thread_context): New.
1921 (load_debug_registers): Delete.
1922 (i386_set_thread_context): New.
1923 (i386_thread_added): New.
1924 (single_step): Rename to ...
1925 (i386_single_step): ... this.
1926 (do_fetch_inferior_registers): Rename to ...
1927 (i386_fetch_inferior_register): ... this.
1928 (i386_store_inferior_register): New.
1929 (the_low_target): Adapt to new interface.
1931 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1932 (arm_get_thread_context): New.
1933 (arm_set_thread_context): New.
1935 (do_fetch_inferior_registers): Rename to ...
1936 (arm_fetch_inferior_register): ... this.
1937 (arm_store_inferior_register): New.
1938 (arm_wince_breakpoint): Reimplement as unsigned long.
1939 (arm_wince_breakpoint_len): Define.
1940 (the_low_target): Adapt to new interface.
1942 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1943 load_debug_registers. Add get_thread_context, set_thread_context,
1944 thread_added and store_inferior_register. Rename
1945 fetch_inferior_registers to fetch_inferior_register.
1946 (regptr): Remove declaration.
1948 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1950 * linux-low.c (linux_detach): Change return type to int. Return 0.
1951 * spu-low.c (spu_detach): Likewise.
1953 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1955 * target.h (target_ops): Change return type of detach to int.
1957 (join_inferior): New.
1958 * server.c (main): Don't skip detach support on mingw32.
1959 If the inferior doesn't support detaching return error.
1960 Call join_inferior instead of using waitpid.
1961 * linux-low.c (linux_join): New.
1962 (linux_target_op): Add linux_join.
1963 * spu-low.c (spu_join): New.
1964 (spu_target_ops): Add spu_join.
1965 * win32-low.c (win32_detach): Adapt to new interface.
1966 Reopen current_process_handle before detaching. Issue a child
1967 resume before detaching.
1969 (win32_target_op): Add win32_join.
1971 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1973 * win32-low.c (win32-attach): Fix return value.
1974 * target.h (target_ops): Describe ATTACH return values.
1976 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1978 * win32-low.c (GETPROCADDRESS): Define.
1979 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1980 (winapi_DebugSetProcessKillOnExit): Likewise.
1981 (win32_create_inferior): Force usage of ansi CreateProcessA.
1982 (win32_attach): Use GETPROCADDRESS.
1983 (win32_detach): Likewise.
1985 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1987 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1989 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1991 * win32-low.c: Commit leftover changes from 2007-03-29.
1993 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1995 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1996 fields short instead of int. Add explicit padding.
1997 (i387_cache_to_fsave): Remove unnecessary casts.
1998 (i387_fsave_to_cache): Doc fix.
1999 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2001 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2003 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2004 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2006 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2008 * configure.srv (arm*-*-mingw32ce*): Move near the other
2011 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2013 * configure.ac: Add errno checking.
2014 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2015 sys/file.h and malloc.h.
2016 (AC_CHECK_DECLS): Add perror.
2017 (srv_mingwce): Handle.
2018 * configure.srv (i[34567]86-*-cygwin*): Add
2019 win32-i386-low.o to srv_tgtobj.
2020 (i[34567]86-*-mingw*): Likewise.
2021 (arm*-*-mingw32ce*): Add case.
2022 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2023 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2024 [__MINGW32CE__] (strerror): New function.
2025 [__MINGW32CE__] (errno): Define to GetLastError.
2026 [__MINGW32CE__] (COUNTOF): New macro.
2027 (remote_open): Remove extra close call.
2028 * mem-break.c (delete_breakpoint_at): New function.
2029 * mem-break.h (delete_breakpoint_at): Declare.
2030 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2031 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2032 [USE_WIN32API] (read, write): Add char* casts.
2033 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2034 * server.h: Include wincecompat.h on Windows CE.
2035 [HAVE_ERRNO_H]: Check.
2036 (perror): Declare if not declared.
2037 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2038 (perror_with_name): Remove errno declaration.
2039 * wincecompat.h: New.
2040 * wincecompat.c: New.
2042 * win32-arm-low.c: New.
2043 * win32-i386-low.c: New.
2044 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2045 (OUTMSG2): Make it safe.
2047 (COUNTOF): New macro.
2048 (NUM_REGS): Get it from the low target.
2049 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2050 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2051 (thread_rec): Let low target handle debug registers.
2052 (child_add_thread): Likewise.
2053 (child_init_thread_list): Likewise.
2054 (continue_one_thread): Likewise.
2056 (do_child_fetch_inferior_registers): Move to ...
2057 * win32-i386-low.c: ... here, and rename to ...
2058 (do_fetch_inferior_registers): ... this.
2059 * win32-low.c (child_fetch_inferior_registers):
2060 Go through the low target.
2061 (do_child_store_inferior_registers): Use regptr.
2062 (strwinerror): New function.
2063 (win32_create_inferior): Handle Windows CE.
2064 Use strwinerror instead of strerror on Windows error
2065 codes. Add program to the error output.
2066 Don't close the main thread handle on Windows CE.
2067 (win32_attach): Use coredll.dll on Windows CE.
2068 (win32_kill): Close current process and current
2070 (win32_detach): Use coredll.dll on Windows CE.
2071 (win32_resume): Let low target handle debug registers, and
2073 (handle_exception): Add/Remove initial breakpoint. Avoid
2074 non-existant WSTOPSIG on Windows CE.
2075 (win32_read_inferior_memory): Cast to remove warning.
2076 (win32_arch_string): Go through the low target.
2077 (initialize_low): Call set_breakpoint_data with the low
2078 target's breakpoint.
2079 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2080 FOP_REGNUM, mappings): Move to ...
2081 * win32-i386-low.c: ... here.
2082 * win32-low.c (win32_thread_info): Move to ...
2083 * win32-low.h: ... here.
2084 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2085 win32-arm-low.c and wincecompat.c.
2086 (all:): Add $EXEEXT.
2087 (install-only:): Likewise.
2088 (gdbserver:): Likewise.
2089 (gdbreplay:): Likewise.
2090 * config.in: Regenerate.
2091 * configure: Regenerate.
2093 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2095 * win32-low.c: Rename typedef thread_info to
2096 win32_thread_info throughout.
2098 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2100 * win32-i386-low.c: Rename to ...
2101 * win32-low.c: ... this.
2102 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2103 * Makefile.in: Likewise.
2105 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2107 * remote-utils.c (monitor_output): Constify msg parameter.
2108 * server.h (monitor_output): Likewise.
2109 * win32-i386-low.c (handle_output_debug_string): New.
2110 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2111 handle_output_debug_string.
2112 (get_child_debug_event): Likewise.
2114 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2116 * server.c (main): Correct strtoul check.
2118 2007-03-27 Jon Ringle <jon@ringle.org>
2120 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2122 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2124 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2126 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2128 * terminal.h: Check HAVE_SGTTY_H.
2130 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2132 * remote-utils.c (remote_open): Print out the assigned port number.
2134 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2136 * remote-utils.c (monitor_output): New function.
2137 * server.c (debug_threads): Define here.
2138 (monitor_show_help): New function.
2139 (handle_query): Handle qRcmd.
2140 (main): Do not handle 'd' packet.
2141 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2142 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2145 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2147 * Makefile.in (EXEEXT): New.
2148 (clean): Use $(EXEEXT).
2150 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2152 * target.h (target_ops): Rename send_signal to request_interrupt,
2153 and remove enum target_signal parameter.
2154 * linux-low.c (linux_request_interrupt): Rename from
2155 linux_send_signal, and always send SIGINT.
2156 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2157 and always send SIGINT.
2158 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2160 (input_interrupt): Likewise.
2162 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2164 * server.c (get_features_xml): Check if target implemented
2166 * win32-i386-low.c (win32_arch_string): New.
2167 (win32_target_ops): Add win32_arch_string as arch_string member.
2169 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2171 * spu-low.c (spu_arch_string): New.
2172 (spu_target_ops): Add spu_arch_string.
2174 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2176 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2177 * configure.ac: Do not check for terminal.h.
2178 * configure, config.in: Regenerated.
2180 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2182 * Makefile.in (OBS): Add $(XML_BUILTIN).
2183 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2185 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2186 (arm-with-iwmmxt.c): New.
2187 * config.in, configure: Regenerate.
2188 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2189 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2190 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2191 (arm*-*-linux*): Add iWMMXt and regset support.
2192 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2193 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2194 (arm_store_wmmxregset, target_regsets): New.
2195 * server.c (get_features_xml): Take annex argument. Check builtin
2197 (handle_query): Handle multiple annexes.
2199 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2201 * remote-utils.c [USE_WIN32API] (read, write): Define.
2202 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2205 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2207 * linux-i386-low.c (the_low_target): Set arch_string.
2208 * linux-x86-64-low.c (the_low_target): Likewise.
2209 * linux-low.c (linux_arch_string): New.
2210 (linux_target_ops): Add it.
2211 * linux-low.h (struct linux_target_ops): Add arch_string.
2212 * server.c (write_qxfer_response): Use const void * for DATA.
2213 (get_features_xml): New.
2214 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2215 * target.h (struct target_ops): Add arch_string method.
2217 2007-01-03 Denis Pilat <denis.pilat@st.com>
2218 Daniel Jacobowitz <dan@codesourcery.com>
2220 * linux-low.c (linux_kill): Handle being called with no threads.
2221 * win32-i386-low.c (win32_kill): Likewise.
2222 (get_child_debug_event): Clear current_process_handle.
2224 2006-12-30 Denis PILAT <denis.pilat@st.com>
2225 Daniel Jacobowitz <dan@codesourcery.com>
2227 * remote-utils.c (remote_open): Check the type of specified
2228 serial port devices before opening them.
2229 * server.c (main): Kill the inferior if an error occurs during
2230 the first remote_open.
2232 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2234 * README: Update supported targets.
2236 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2238 * Makefile.in (clean): Remove reg-mips64.c.
2239 (reg-mips64.c, reg-mips64.o): New rules.
2240 * configure.srv: Handle mips64. Include regset support for mips.
2241 * linux-mips-low.c (union mips_register): New.
2242 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2243 (mips_breakpoint, mips_breakpoint_at): Use int.
2244 (mips_collect_register, mips_supply_register)
2245 (mips_collect_register_32bit, mips_supply_register_32bit)
2246 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2247 (mips_store_fpregset, target_regsets): New.
2248 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2250 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2252 * configure.srv: Add target "spu*-*-*".
2253 * Makefile.in (clean): Remove reg-spu.c.
2254 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2255 * spu-low.c: New file.
2257 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2259 * configure.ac: Correct td_thr_tls_get_addr test.
2260 * configure: Regenerated.
2262 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2264 * linux-low.c (linux_wait_for_event): Reformat. Use the
2266 * remote-utils.c (decode_address_to_semicolon): New.
2267 * server.c (pass_signals, handle_general_set): New.
2268 (handle_query): Mention QPassSignals for qSupported.
2269 (main): Call handle_general_set.
2270 * server.h (pass_signals, decode_address_to_semicolon): New.
2272 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2274 * server.c (handle_query): Correct error handling for read_auxv.
2276 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2278 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2279 and srv_linux_thread_db to yes.
2280 * linux-s390-low.c (s390_fill_gregset): New function.
2281 (target_regsets): Define data structure.
2283 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2285 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2286 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2287 * config.in, configure: Regenerated.
2288 * inferiors.c (gdb_id_to_thread): New function.
2289 (gdb_id_to_thread_id): Use it.
2290 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2291 * linux-low.h (struct process_info): Add th member.
2292 (thread_db_get_tls_address): New prototype.
2293 * remote-utils.c (decode_address): Make non-static.
2294 * server.c (handle_query): Handle qGetTLSAddr.
2295 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2296 * target.h (struct target_ops): Add get_tls_address.
2297 * thread-db.c (maybe_attach_thread): Save the thread handle.
2298 (thread_db_get_tls_address): New.
2300 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2302 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2303 (linux_resume_one_process): Take a siginfo_t *. Update all
2304 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2305 (struct pending_signals): Add a siginfo_t.
2306 (linux_wait_for_process): Always set last_status.
2307 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2308 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2309 * linux-low.h (struct process_info): Add last_status.
2311 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2313 * remote-utils.c (try_rle): New function.
2314 (putpkt_binary): Use it.
2316 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2318 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2319 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2320 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2321 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2322 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2325 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2327 * server.c (terminal_fd): New variable.
2328 (old_foreground_pgrp): Likewise.
2329 (restore_old_foreground_pgrp): New function.
2330 (start_inferior): Record the terminal file descriptor in terminal_fd
2331 and its original foreground group in old_foreground_pgrp. Register
2332 restore_old_foreground_pgrp with atexit().
2334 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2336 * server.c (handle_query): Correct qPart to qXfer.
2338 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2340 * configure.ac: Check for more headers which are missing on
2341 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2342 * configure.srv: Add Cygwin and mingw32.
2343 * remote-utils.c: Don't include headers unconditionally which
2344 are missing on mingw32. Include <winsock.h> for mingw32.
2345 (remote_open): Adjust for mingw32 support. Flush
2346 standard error after writing to it.
2347 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2348 (unblock_async_io, enable_async_io, disable_async_io)
2349 (readchar, getpkt): Update for Winsock support.
2350 (prepare_resume_reply): Expect a protocol signal number.
2351 * server.c: Disable <sys/wait.h> on mingw32.
2352 (start_inferior): Adjust for mingw32 support. Flush
2353 standard error after writing to it.
2354 (attach_inferior): Likewise. Use protocol signal
2356 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2358 * win32-i386-low.c: New file.
2359 * Makefile.in (XM_CLIBS): Set.
2360 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2361 (win32-i386-low.o): New dependency rule.
2362 * linux-low.c (linux_wait): Use target signal numbers.
2363 * target.h (struct target_ops): Doc fix.
2364 * server.h (target_signal_to_name): New prototype.
2365 * gdbreplay.c: Don't include headers unconditionally which
2366 are missing on mingw32. Include <winsock.h> for mingw32.
2367 (remote_close, remote_open): Adjust for Winsock support.
2368 * configure, config.in: Regenerated.
2370 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2372 * server.c (decode_xfer_read, write_qxfer_response): New.
2373 (handle_query): Take a packet length argument. Handle
2374 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2375 the qSupported response.
2376 (main): Update call to handle_query.
2378 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2380 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2381 (putpkt_binary): Renamed from putpkt and adjusted for binary
2383 (putpkt): New wrapper for putpkt_binary.
2384 (readchar): Don't mask off the high bit.
2385 (decode_X_packet): New function.
2386 * server.c (main): Call putpkt_binary if a handler sets the packet
2387 length. Save the length of the incoming packet. Handle 'X'.
2388 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2390 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2392 * server.c (handle_query): Handle qSupported.
2394 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2396 * remote-utils.c (all_symbols_looked_up): New variable.
2397 (look_up_one_symbol): Check it.
2398 * server.h (look_up_one_symbol): New declaration.
2399 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2401 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2403 * Makefile.in (linux-arm-low.o): Update dependencies.
2404 * linux-arm-low.c: Include "gdb_proc_service.h".
2405 (PTRACE_GET_THREAD_AREA): Define.
2406 (ps_get_thread_area): New function.
2408 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2410 * configure.srv (m68k*-*-uclinux*): New target.
2411 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2412 (linux_resume_one_process): Remove extraneous cast.
2413 (linux_read_offsets): New.
2414 (linux_target_op): Add linux_read_offsets on mmuless systems.
2415 * server.c (handle_query): Add qOffsets logic.
2416 * target.h (struct target_ops): Add read_offsets.
2418 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2420 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2421 (PTRACE_GET_THREAD_AREA): Define.
2422 (ps_get_thread_area): New function.
2423 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2424 (linux-x86-64-low.o): Update.
2426 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2428 * configure.ac: Remove checks for prfpregset_t.
2429 * gdb_proc_service.h: New file.
2430 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2431 new "gdb_proc_service.h".
2432 * proc-service.c: Likewise.
2433 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2434 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2435 * Makefile.in (gdb_proc_service_h): Updated.
2436 * configure, config.in: Regenerated.
2438 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2440 * remote-utils.c (prepare_resume_reply): Move declaration
2441 of gdb_id_from_wait to the top of the block.
2443 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2445 * linux-low.c (regsets_store_inferior_registers): Read the regset
2446 from the target before filling it.
2448 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2450 * server.c (attach_inferior): Return SIGTRAP for a successful
2453 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2455 * Makefile.in (OBS): Add version.o.
2456 (STAGESTUFF): Delete.
2457 (version.o): Add dependencies.
2458 (version.c): Replace rule.
2459 (clean): Remove version.c.
2460 * server.c (gdbserver_version): New.
2461 (gdbserver_usage): Use printf.
2462 (main): Handle --version and --help.
2463 * server.h (version, host_name): Add declarations.
2465 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2477 * linux-x86-64-low.c:
2480 * linux-ppc64-low.c:
2489 * linux-crisv32-low.c:
2501 * gdbserver.1: Add (C) after Copyright. Update the FSF
2504 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2506 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2507 (arm_breakpoint_at): Recognize both breakpoints.
2508 (the_low_target): Use the correct breakpoint instruction.
2510 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2512 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2513 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2514 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2515 (the_low_target): Update.
2517 2005-10-25 Andreas Schwab <schwab@suse.de>
2519 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2521 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2522 (ia64_num_regs): Reduce to 462.
2524 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2526 * acinclude.m4: Correct quoting.
2527 * aclocal.m4: Regenerated.
2529 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2530 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2531 (thread_db_init): Call thread_db_err_str.
2532 * configure.ac: Check for TD_VERSION.
2533 * config.in, configure: Regenerated.
2535 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2537 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2539 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2541 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2542 is not available. Define HAVE_PTRACE_GETREGS if it is.
2543 * config.in, configure: Regenerated.
2544 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2545 * linux-i386-low.c, linux-m68k-low.c: Update to use
2546 HAVE_PTRACE_GETREGS.
2547 * linux-low.c (regsets_fetch_inferior_registers)
2548 (regsets_store_inferior_registers): Only return 0 if we processed
2550 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2551 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2553 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2555 * inferiors.c (struct thread_info): Add gdb_id.
2556 (add_thread): Add gdb_id argument.
2557 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2558 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2559 calls to add_thread.
2560 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2561 * server.c (handle_query): Use thread_to_gdb_id.
2562 (handle_v_cont, main): Use gdb_id_to_thread_id.
2563 * server.h (add_thread): Update prototype.
2564 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2567 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2569 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2570 left-padded registers.
2571 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2572 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2574 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2576 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2577 * configure: Regenerate.
2578 * config.in: Regenerate.
2579 * server.h (NEED_DECLARATION_STRERROR):
2580 Replace with !HAVE_DECL_STRERROR.
2582 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2584 * linux-low.c (linux_wait, linux_send_signal): Don't test
2585 an unsigned long variable for > 0 if it could be MAX_ULONG.
2586 * server.c (myresume): Likewise.
2587 * target.c (set_desired_inferior): Likewise.
2589 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2591 * configure.ac: Simplify and improve check for socklen_t.
2592 * configure, config.in: Regenerate.
2594 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2596 * acconfig.h: Remove.
2597 * configure.ac: Add a test for socklen_t. Use three-argument
2598 AC_DEFINE throughout.
2599 * config.in: Regenerated using autoheader 2.59.
2600 * configure: Regenerated.
2602 * gdbreplay.c (socklen_t): Provide a default.
2603 (remote_open): Use socklen_t.
2604 * remote-utils.c (socklen_t): Provide a default.
2605 (remote_open): Use socklen_t.
2606 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2609 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2611 * linux-low.c (linux_read_memory, linux_write_memory)
2612 (linux_read_auxv): Likewise.
2613 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2614 (check_mem_write): Likewise.
2615 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2617 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2618 (registers_from_string, register_data): Likewise.
2619 * server.c (handle_query, main): Likewise.
2620 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2621 (decode_M_packet): Likewise.
2622 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2623 * target.h (struct target_ops): Update read_memory, write_memory,
2625 (read_inferior_memory, write_inferior_memory): Update.
2626 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2628 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2629 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2630 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2631 linux-s390-low.c, linux-sh-low.c: Update for changes in
2632 read_inferior_memory and the_low_target->breakpoint.
2634 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2636 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2637 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2638 * configure.srv: Add powerpc64-*-linux*.
2639 * linux-ppc64-low.c: New file.
2641 2005-05-23 Orjan Friberg <orjanf@axis.com>
2643 * linux-cris-low.c: New file with support for CRIS.
2644 * linux-crisv32-low.c: Ditto for CRISv32.
2645 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2646 (clean): Add reg-cris.c and reg-crisv32.c.
2647 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2648 reg-crisv32.o, and reg-crisv32.c to make rules.
2649 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2652 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2654 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2655 of sizeof (PTRACE_XFER_TYPE).
2656 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2658 2005-05-12 Orjan Friberg <orjanf@axis.com>
2660 * target.h (struct target_ops): Add insert_watchpoint,
2661 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2662 pointers for hardware watchpoint support.
2663 * linux-low.h (struct linux_target_ops): Ditto.
2664 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2665 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2666 to linux_target_ops.
2667 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2669 * server.c (main): Recognize 'Z' and 'z' packets.
2671 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2673 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2674 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2675 (the_low_target): Add new members.
2677 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2679 * proc-service.c (ps_lgetregs): Search all_processes instead of
2682 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2684 * server.c (start_inferior): Change return type to int.
2685 (attach_inferior): Change sigptr to int *.
2686 (handle_v_cont, handle_v_requests): Change signal to int *.
2687 (main): Change signal to int.
2689 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2691 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2692 * configure.srv: Add m32r*-*-linux*.
2693 * linux-m32r-low.c: New file.
2695 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2697 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2699 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2701 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2702 Take unsigned long arguments for PIDs.
2703 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2704 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2705 (wait_for_sigstop, linux_resume_one_process)
2706 (regsets_fetch_inferior_registers, linux_send_signal)
2707 (linux_read_auxv): Likewise. Update the types of variables holding
2708 PIDs. Update format string specifiers.
2709 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2710 * remote-utils.c (prepare_resume_reply): Likewise.
2711 * server.c (cont_thread, general_thread, step_thread)
2712 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2714 (handle_query): Update format specifiers.
2715 (handle_v_cont, main): Use strtoul for thread IDs.
2716 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2717 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2718 (general_thread, step_thread, thread_from_wait)
2719 (old_thread_from_wait): Update.
2720 * target.h (struct thread_resume): Use unsigned long for THREAD.
2721 (struct target_ops): Use unsigned long for arguments to attach and
2724 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2726 * acinclude.m4: Include bfd/bfd.m4 directly.
2727 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2728 <agriffis@toolchain.org>.
2729 * aclocal.m4, configure: Regenerated.
2731 2005-01-07 Andrew Cagney <cagney@gnu.org>
2733 * configure.ac: Rename configure.in, require autoconf 2.59.
2734 * configure: Re-generate.
2736 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2738 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2740 * aclocal.m4: Regenerated.
2741 * configure: Regenerated.
2743 2004-11-21 Andreas Schwab <schwab@suse.de>
2745 * linux-m68k-low.c (m68k_num_gregs): Define.
2746 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2747 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2748 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2749 (m68k_breakpoint_at): New. Add to the_low_target.
2751 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2752 srv_linux_thread_db to yes.
2754 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2756 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2757 (ARCH_SET_FS): Likewise.
2758 (ARCH_GET_FS): Likewise.
2759 (ARCH_GET_GS): Likewise.
2761 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2763 * linux-i386-low.c (ps_get_thread_area): New.
2764 * linux-x86-64-low.c (ps_get_thread_area): New.
2765 * linux-low.c: Include <sys/syscall.h>.
2766 (linux_kill_one_process): Don't kill the first thread here.
2767 (linux_kill): Kill the first thread here.
2768 (kill_lwp): New function.
2769 (send_sigstop, linux_send_signal): Use it.
2770 * proc-service.c: Clean up #ifdefs.
2771 (fpregset_info): Delete.
2772 (ps_lgetregs): Update and enable implementation.
2773 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2775 * remote-utils.c (struct sym_cache, symbol_cache): New.
2776 (input_interrupt): Print a clearer message.
2777 (async_io_enabled): New variable.
2778 (enable_async_io, disable_async_io): Use it. Update comments.
2779 (look_up_one_symbol): Use the symbol cache.
2780 * thread-db.c (thread_db_look_up_symbols): New function.
2781 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2783 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2785 * configure.in: Test for -rdynamic.
2786 * configure: Regenerated.
2787 * Makefile (INTERNAL_LDFLAGS): New.
2788 (gdbserver, gdbreplay): Use it.
2790 2004-09-02 Andrew Cagney <cagney@gnu.org>
2792 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2794 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2796 * linux-low.c (linux_wait): Clear all_processes list also.
2798 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2800 * linux-low.c: Include <errno.h>. Remove extern declaration of
2803 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2805 * gdbreplay.c, server.h, utils.c: Update copyright years.
2807 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2809 * server.c (main): Print child status or termination signal from
2810 variable 'signal', not 'sig'.
2812 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2814 * linux-low.c (linux_read_memory): Change return type to
2815 int. Check for and return error from ptrace().
2816 * target.c (read_inferior_memory): Change return type to int. Pass
2817 back return status from the_target->read_memory().
2818 * target.h (struct target_ops): Adapt *read_memory() prototype.
2820 (read_inferior_memory): Adapt prototype.
2821 * server.c (main): Return an error packet if
2822 read_inferior_memory() returns an error.
2824 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2826 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2827 Unify with other clean targets.
2829 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2831 * server.c (handle_v_cont): Call set_desired_inferior.
2833 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2835 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2837 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2839 * linux-low.c (linux_wait): Unblock async I/O.
2840 (linux_resume): Block and enable async I/O.
2841 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2842 * server.h (block_async_io, unblock_async_io): Add prototypes.
2844 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2846 * remote-utils.c (remote_open): Print a status notice after
2848 * server.c (attach_inferior): Print a status notice after
2851 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2853 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2855 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2857 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2859 * server.c, target.h: Update copyright years.
2861 2004-02-25 Roland McGrath <roland@redhat.com>
2863 * target.h (struct target_ops): New member `read_auxv'.
2864 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2865 * linux-low.c (linux_read_auxv): New function.
2866 (linux_target_ops): Initialize `read_auxv' member to that.
2868 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2870 Committed by Jim Blandy <jimb@redhat.com>.
2872 * linux-s390-low.c (s390_num_regs): Update.
2873 (s390_regmap): Remove control registers. Use __s390x__ predefine
2874 instead of GPR_SIZE to distiguish s390 and s390x targets.
2876 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2878 * linux-low.c: Update copyright year.
2879 (check_removed_breakpoint): Clear pending_is_breakpoint.
2880 (linux_set_resume_request, linux_queue_one_thread)
2881 (resume_status_pending_p): New functions.
2882 (linux_continue_one_thread): Use process->resume.
2883 (linux_resume): Only resume threads if there are no pending events.
2884 * linux-low.h (struct process_info): Add resume request
2887 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2889 * regcache.c (new_register_cache): Clear the allocated register
2890 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2892 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2894 * linux-low.c (linux_resume): Take a struct thread_resume *
2896 (linux_wait): Update call.
2897 (resume_ptr): New static variable.
2898 (linux_continue_one_thread): Renamed from
2899 linux_continue_one_process. Use resume_ptr.
2900 (linux_resume): Use linux_continue_one_thread.
2901 * server.c (handle_v_cont, handle_v_requests): New functions.
2902 (myresume): New function.
2903 (main): Handle 'v' case.
2904 * target.h (struct thread_resume): New type.
2905 (struct target_ops): Change argument of "resume" to struct
2907 (myresume): Delete macro.
2909 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2911 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2912 (uninstall): Support DESTDIR.
2914 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2916 * configure.srv: Add xscale*linux copy of arm*linux entry.
2918 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2920 * linux-arm-low.c (arm_reinsert_addr): New function.
2921 (the_low_target): Add arm_reinsert_addr.
2923 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2925 * mem-break.c: Remove whitespace at end of file.
2927 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2929 * configure.in: Check whether we need to prototype strerror.
2930 * server.h: Optionally prototype strerror.
2931 * gdbreplay.c (perror_with_name): Use strerror.
2932 * linux-low.c (linux_attach_lwp): Use strerror.
2933 * utils.c (perror_with_name): Use strerror.
2934 * config.in, configure: Regenerated.
2936 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2938 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2939 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2941 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2943 * Makefile.in (SFILES): Update.
2944 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2945 low-sun3.c: Remove files.
2947 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2949 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2950 (linux_detach_one_process, linux_detach): New functions.
2951 (linux_target_ops): Add linux_detach.
2952 * server.c (main): Handle 'D' packet.
2953 * target.h (struct target_ops): Add "detach" member.
2954 (detach_inferior): Define.
2956 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2958 From Kelley Cook <kelleycook@wideopenwest.com>:
2959 * configure.srv: Accept i[34567]86 variants.
2961 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2963 * linux-low.c (linux_wait_for_event): Correct comment typos.
2964 (linux_resume_one_process): Call check_removed_breakpoint.
2965 (linux_send_signal): New function.
2966 (linux_target_ops): Add linux_send_signal.
2967 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2969 * target.h (struct target_ops): Add send_signal.
2971 2003-05-29 Jim Blandy <jimb@redhat.com>
2973 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2974 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2975 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2976 away part of the register's value.
2978 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2980 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2981 (linux_wait_for_event, linux_init_signals): Likewise.
2983 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2985 * configure.in: Check for stdlib.h.
2986 * configure: Regenerated.
2987 * config.in: Regenerated.
2989 2003-01-04 Andreas Schwab <schwab@suse.de>
2991 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2993 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2995 * Makefile.in: Remove obsolete code.
2997 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2999 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3000 defined(PT_FPR0_HI).
3002 2002-11-17 Stuart Hughes <seh@zee2.com>
3004 * linux-arm-low.c (arm_num_regs): Increase.
3005 (arm_regmap): Include status register.
3007 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3009 * linux-low.c (register_addr): Remove incorrect -1 check.
3011 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3013 * linux-low.c (linux_create_inferior): Call setpgid. Return
3015 (unstopped_p, linux_signal_pid): Remove.
3016 (linux_target_ops): Remove linux_signal_pid.
3017 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3018 global instead of target method.
3019 * target.h (struct target_ops): Remove signal_pid. Update comment
3020 for create_inferior.
3021 * server.c (signal_pid): New variable.
3022 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3023 gdbserver. Set the child to be the foreground process group.
3024 (attach_inferior): Set signal_pid.
3026 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3028 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3030 2002-08-20 Jim Blandy <jimb@redhat.com>
3032 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3035 2002-08-01 Andrew Cagney <cagney@redhat.com>
3037 * Makefile.in: Make chill references obsolete.
3039 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3041 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3042 * configure: Regenerate.
3043 * config.in: Regenerate.
3045 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3047 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3048 (perror_with_name, remote_close, remote_open, expect, play): Static.
3050 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3052 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3053 byte offsets instead of an array of indexes.
3054 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3056 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3058 * regcache.c: Add comment.
3060 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3062 * thread-db.c: New file.
3063 * proc-service.c: New file.
3064 * acinclude.m4: New file.
3065 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3066 proc-service.o, and thread-db.o.
3067 (linux-low.o): Add USE_THREAD_DB.
3068 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3069 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3070 * aclocal.m4: Regenerated.
3071 * config.in: Regenerated.
3072 * configure: Regenerated.
3073 * configure.in: Check for proc_service.h, sys/procfs.h,
3074 thread_db.h, and linux/elf.h headrs.
3075 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3076 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3077 Check for -lthread_db and thread support.
3078 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3079 PowerPC, and SuperH.
3080 * i387-fp.c: Constify arguments.
3081 * i387-fp.h: Likewise.
3082 * inferiors.c: (struct thread_info): Renamed from
3083 `struct inferior_info'. Remove PID member. Use generic inferior
3084 list header. All uses updated.
3085 (inferiors, signal_pid): Removed.
3086 (all_threads): New variable.
3087 (get_thread): Define.
3088 (add_inferior_to_list): New function.
3089 (for_each_inferior): New function.
3090 (change_inferior_id): New function.
3091 (add_inferior): Removed.
3092 (remove_inferior): New function.
3093 (add_thread): New function.
3094 (free_one_thread): New function.
3095 (remove_thread): New function.
3096 (clear_inferiors): Use for_each_inferior and free_one_thread.
3097 (find_inferior): New function.
3098 (find_inferior_id): New function.
3099 (inferior_target_data): Update argument type.
3100 (set_inferior_target_data): Likewise.
3101 (inferior_regcache_data): Likewise.
3102 (set_inferior_regcache_data): Likewise.
3103 * linux-low.c (linux_bp_reinsert): Remove.
3104 (all_processes, stopping_threads, using_thrads)
3105 (struct pending_signals, debug_threads, pid_of): New.
3106 (inferior_pid): Replace with macro.
3107 (struct inferior_linux_data): Remove.
3108 (get_stop_pc, add_process): New functions.
3109 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3110 Use add_process and add_thread.
3111 (linux_attach_lwp): New function, based on old linux_attach. Use
3112 add_process and add_thread. Set stop_expected for new threads.
3113 (linux_attach): New function.
3114 (linux_kill_one_process): New function.
3115 (linux_kill): Kill all LWPs.
3116 (linux_thread_alive): Use find_inferior_id.
3117 (check_removed_breakpoints, status_pending_p): New functions.
3118 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3119 Update. Use WNOHANG. Wait for cloned processes also. Update process
3120 struct for the found process.
3121 (linux_wait_for_event): New function.
3122 (linux_wait): Use it. Support LWPs.
3123 (send_sigstop, wait_for_sigstop, stop_all_processes)
3124 (linux_resume_one_process, linux_continue_one_process): New functions.
3125 (linux_resume): Support LWPs.
3126 (REGISTER_RAW_SIZE): Remove.
3127 (fetch_register): Use register_size instead. Call supply_register.
3128 (usr_store_inferior_registers): Likewise. Call collect_register.
3130 (regsets_fetch_inferior_registers): Improve error message.
3131 (regsets_store_inferior_registers): Add debugging.
3132 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3133 (unstopped_p, linux_signal_pid): New functions.
3134 (linux_target_ops): Add linux_signal_pid.
3135 (linux_init_signals): New function.
3136 (initialize_low): Call it. Initialize using_threads.
3137 * regcache.c (inferior_regcache_data): Add valid
3139 (get_regcache): Fetch registers lazily. Add fetch argument
3140 and update all callers.
3141 (regcache_invalidate_one, regcache_invalidate): New
3143 (new_register_cache): Renamed from create_register_cache.
3144 Return the new regcache.
3145 (free_register_cache): Change argument to a void *.
3146 (registers_to_string, registers_from_string): Call get_regcache
3147 with fetch flag set.
3148 (register_data): Make static. Pass fetch flag to get_regcache.
3149 (supply_register): Call get_regcache with fetch flag clear.
3150 (collect_register): Call get_regcache with fetch flag set.
3151 (collect_register_as_string): New function.
3152 * regcache.h: Update.
3153 * remote-utils.c (putpkt): Flush after debug output and use
3155 Handle input interrupts while waiting for an ACK.
3156 (input_interrupt): Use signal_pid method.
3157 (getpkt): Flush after debug output and use stderr.
3158 (outreg): Use collect_register_as_string.
3159 (new_thread_notify, dead_thread_notify): New functions.
3160 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3162 (look_up_one_symbol): Flush after debug output.
3163 * server.c (step_thread, server_waiting): New variables.
3164 (start_inferior): Don't use signal_pid. Update call to mywait.
3165 (attach_inferior): Update call to mywait.
3166 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3167 (main): Don't fetch/store registers explicitly. Use
3168 set_desired_inferior. Support proposed ``Hs'' packet. Update
3171 (struct inferior_list, struct_inferior_list_entry): New.
3172 * target.c (set_desired_inferior): New.
3173 (write_inferior_memory): Constify.
3174 (mywait): New function.
3176 (struct target_ops): New signal_pid method.
3177 (mywait): Removed macro, added prototype.
3179 * linux-low.h (regset_func): Removed.
3180 (regset_fill_func, regset_store_func): New.
3181 (enum regset_type): New.
3182 (struct regset_info): Add type field. Use new operation types.
3183 (struct linux_target_ops): stop_pc renamed to get_pc.
3184 Add decr_pc_after_break and breakpoint_at.
3185 (get_process, get_thread_proess, get_process_thread)
3186 (strut process_info, all_processes, linux_attach_lwp)
3187 (thread_db_init): New.
3189 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3190 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3191 (the_low_target): Add new members.
3192 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3193 (i386_store_fpxregset): Constify.
3194 (target_regsets): Add new kind identifier.
3195 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3196 (i386_set_pc): Add debugging.
3197 (i386_breakpoint_at): New function.
3198 (the_low_target): Add new members.
3199 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3200 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3201 (mips_breakpoint_at): New.
3202 (the_low_target): Add new members.
3203 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3204 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3205 (the_low_target): Add new members.
3206 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3207 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3208 (the_low_target): Add new members.
3209 * linux-x86-64-low.c (target_regsets): Add new kind
3212 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3214 From Martin Pool <mbp@samba.org>:
3215 * server.c (gdbserver_usage): New function.
3218 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3220 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3223 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3225 * Makefile.in: Remove obsolete code.
3227 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3229 * linux-low.c (regsets_fetch_inferior_registers),
3230 (regsets_store_inferior_registers): Removed cast to int from
3232 * regcache.h: Added declaration of struct inferior_info.
3234 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3236 * inferiors.c (struct inferior_info): Add regcache_data.
3237 (add_inferior): Call create_register_cache.
3238 (clear_inferiors): Call free_register_cache.
3239 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3240 * regcache.c (struct inferior_regcache_data): New.
3241 (registers): Remove.
3242 (get_regcache): New function.
3243 (create_register_cache, free_register_cache): New functions.
3244 (set_register_cache): Don't initialize the register cache here.
3245 (registers_to_string, registers_from_string, register_data): Call
3247 * regcache.h: Add prototypes.
3248 * server.h: Likewise.
3250 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3252 * mem-break.c: New file.
3253 * mem-break.h: New file.
3254 * Makefile.in: Add mem-break.o rule; update server.h
3256 * inferiors.c (struct inferior_info): Add target_data
3258 (clear_inferiors): Free target_data member if set.
3259 (inferior_target_data, set_inferior_target_data): New functions.
3260 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3261 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3262 * linux-low.c (linux_bp_reinsert): New variable.
3263 (struct inferior_linux_data): New.
3264 (linux_create_inferior): Use set_inferior_target_data.
3265 (linux_attach): Likewise. Call add_inferior.
3266 (linux_wait_for_one_inferior): New function.
3267 (linux_wait): Call it.
3268 (linux_write_memory): Add const.
3269 (initialize_low): Call set_breakpoint_data.
3270 * linux-low.h (struct linux_target_ops): Add breakpoint
3272 * server.c (attach_inferior): Remove extra add_inferior
3274 * server.h: Include mem-break.h. Update inferior.c
3276 * target.c (read_inferior_memory)
3277 (write_inferior_memory): New functions.
3278 * target.h (read_inferior_memory)
3279 (write_inferior_memory): Change macros to prototypes.
3280 (struct target_ops): Update comments. Add const to write_memory
3283 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3285 * linux-low.c (usr_store_inferior_registers): Support
3286 registers which are allowed to fail to store.
3287 * linux-low.h (linux_target_ops): Likewise.
3288 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3289 (ppc_cannot_store_register): FPSCR may not be storable.
3291 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3293 * server.h: Include <string.h> if HAVE_STRING_H.
3294 * ChangeLog: Correct paths in last ChangeLog entry.
3296 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3298 * linux-low.h: Remove obsolete prototypes.
3299 (struct linux_target_ops): New.
3300 (extern the_low_target): New.
3301 * linux-low.c (num_regs, regmap): Remove declarations.
3302 (register_addr): Use the_low_target explicitly.
3303 (fetch_register): Likewise.
3304 (usr_fetch_inferior_registers): Likewise.
3305 (usr_store_inferior_registers): Likewise.
3306 * linux-arm-low.c (num_regs): Remove.
3307 (arm_num_regs): Define.
3308 (arm_regmap): Renamed from regmap, made static.
3309 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3311 (arm_cannot_store_register): Renamed from cannot_store_register,
3313 (the_low_target): New.
3314 * linux-i386-low.c (num_regs): Remove.
3315 (i386_num_regs): Define.
3316 (i386_regmap): Renamed from regmap, made static.
3317 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3319 (i386_cannot_store_register): Renamed from cannot_store_register,
3321 (the_low_target): New.
3322 * linux-ia64-low.c (num_regs): Remove.
3323 (ia64_num_regs): Define.
3324 (ia64_regmap): Renamed from regmap, made static.
3325 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3327 (ia64_cannot_store_register): Renamed from cannot_store_register,
3329 (the_low_target): New.
3330 * linux-m68k-low.c (num_regs): Remove.
3331 (m68k_num_regs): Define.
3332 (m68k_regmap): Renamed from regmap, made static.
3333 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3335 (m68k_cannot_store_register): Renamed from cannot_store_register,
3337 (the_low_target): New.
3338 * linux-mips-low.c (num_regs): Remove.
3339 (mips_num_regs): Define.
3340 (mips_regmap): Renamed from regmap, made static.
3341 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3343 (mips_cannot_store_register): Renamed from cannot_store_register,
3345 (the_low_target): New.
3346 * linux-ppc-low.c (num_regs): Remove.
3347 (ppc_num_regs): Define.
3348 (ppc_regmap): Renamed from regmap, made static.
3349 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3351 (ppc_cannot_store_register): Renamed from cannot_store_register,
3353 (the_low_target): New.
3354 * linux-s390-low.c (num_regs): Remove.
3355 (s390_num_regs): Define.
3356 (s390_regmap): Renamed from regmap, made static.
3357 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3359 (s390_cannot_store_register): Renamed from cannot_store_register,
3361 (the_low_target): New.
3362 * linux-sh-low.c (num_regs): Remove.
3363 (sh_num_regs): Define.
3364 (sh_regmap): Renamed from regmap, made static.
3365 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3367 (sh_cannot_store_register): Renamed from cannot_store_register,
3369 (the_low_target): New.
3370 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3371 (the_low_target): New.
3373 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3375 * Makefile.in: Add stamp-h target.
3376 * configure.in: Create stamp-h.
3377 * configure: Regenerated.
3379 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3381 * inferiors.c: New file.
3382 * target.c: New file.
3383 * target.h: New file.
3384 * Makefile.in: Add target.o and inferiors.o. Update
3386 * linux-low.c (inferior_pid): New static variable,
3387 moved from server.c.
3388 (linux_create_inferior): Renamed from create_inferior.
3389 Call add_inferior. Return 0 on success instead of a PID.
3390 (linux_attach): Renamed from myattach.
3391 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3392 (linux_thread_alive): Renamed from mythread_alive.
3393 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3395 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3396 (regsets_store_inferior_registers): Correct error message.
3397 Add missing ``return 0''.
3398 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3399 (linux_store_registers): Renamed from store_inferior_registers.
3400 (linux_read_memory): Renamed from read_inferior_memory.
3401 (linux_write_memory): Renamed from write_inferior_memory.
3402 (linux_target_ops): New structure.
3403 (initialize_low): Call set_target_ops ().
3404 * remote-utils.c (unhexify): New function.
3405 (hexify): New function.
3406 (input_interrupt): Send signals to ``signal_pid''.
3407 * server.c (inferior_pid): Remove.
3408 (start_inferior): Update create_inferior call.
3409 (attach_inferior): Call add_inferior.
3410 (handle_query): New function.
3411 (main): Call handle_query for `q' packets.
3412 * server.h: Include "target.h". Remove obsolete prototypes.
3413 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3415 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3417 * Makefile.in: Add WARN_CFLAGS. Update configury
3419 * configure.in: Check for <string.h>
3420 * configure: Regenerate.
3421 * config.in: Regenerate.
3422 * gdbreplay.c: Include needed system headers.
3423 (remote_open): Remove strchr prototype.
3424 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3425 * regcache.c (supply_register): Change buf argument to const void *.
3426 (supply_register_by_name): Likewise.
3427 (collect_register): Change buf argument to void *.
3428 (collect_register_by_name): Likewise.
3429 * regcache.h: Add missing prototypes.
3430 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3431 * server.c (handle_query): New function.
3432 (attached): New static variable, moved out of main.
3433 (main): Quiet longjmp clobber warnings.
3434 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3435 * utils.c (error): Remove NORETURN.