1 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3 * spu-low.c (spu_kill): Wait for inferior to terminate.
5 (spu_detach): Call clear_inferiors.
7 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9 * aclocal.m4: Regenerate.
10 * config.in: Likewise.
11 * configure: Likewise.
13 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16 (parse_spufs_run): New function.
17 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18 (ppc_breakpoint_at): Handle SPU breakpoints.
20 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
22 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
23 (SPUFS_MAGIC): Define.
24 (spu_enumerate_spu_ids): New function.
25 (linux_qxfer_spu): New function.
26 (linux_target_ops): Install linux_qxfer_spu.
28 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
30 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
31 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
32 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
33 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
34 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
35 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
36 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
37 (init_registers_powerpc_cell32l): Add prototype.
38 (init_registers_powerpc_cell64l): Likewise.
39 (ppc_arch_setup): Detect Cell/B.E. architecture.
41 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
43 * Makefile.in (datarootdir): New variable.
45 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
47 * linux-low.c (linux_write_memory): Update debugging output.
48 * Makefile.in (clean): Add new descriptions.
49 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
50 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
51 * configure.srv: Add new files for arm*-*-linux*.
52 * linux-arm-low.c: Add new declarations.
53 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
54 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
55 (HWCAP_VFPv3D16): New.
56 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
57 instead of __IWMMXT__.
58 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
59 (arm_arch_setup): New.
60 (target_regsets): Remove #ifdef. Add VFP regset.
61 (the_low_target): Use arm_arch_setup.
63 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
65 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
66 the main thread again.
68 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
70 Adding Neutrino gdbserver.
71 * configure: Regenerated.
72 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
73 * configure.srv (i[34567]86-*-nto*): New target.
74 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
75 * remote-utils.c [__QNX__]: Include sys/iomgr.h
76 (nto_comctrl) [__QNX__]: New function.
77 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
79 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
81 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
84 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
85 Pedro Alves <pedro@codesourcery.com>
87 * win32-i386-low.c (i386_get_thread_context): Handle systems that
88 don't support CONTEXT_EXTENDED_REGISTERS.
89 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
90 (the_low_target): Install them.
91 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
92 failing with ERROR_PIPE_NOT_CONNECTED.
94 2009-06-30 Doug Evans <dje@google.com>
95 Pierre Muller <muller@ics.u-strasbg.fr>
97 Add h/w watchpoint support to x86-linux, win32-i386.
98 * Makefile.in (SFILES): Add i386-low.c
100 (i386-low.o): Add dependencies.
101 (linux-x86-low.o): Add i386-low.h dependency.
102 (win32-i386-low.o): Ditto.
103 * i386-low.c: New file.
104 * i386-low.h: New file.
105 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
106 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
107 * linux-low.c (linux_add_process): Initialize arch_private.
108 (linux_remove_process): Free arch_private.
109 (add_lwp): Initialize arch_private.
110 (delete_lwp): Free arch_private.
111 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
113 * linux-low.h (process_info_private): New member arch_private.
114 (lwp_info): New member arch_private.
115 (linux_target_ops): New members new_process, new_thread,
117 (ptid_of): New macro.
118 * linux-x86-low.c: Include stddef.h, i386-low.h.
119 (arch_process_info): New struct.
120 (arch_lwp_info): New struct.
121 (x86_linux_dr_get, x86_linux_dr_set): New functions.
122 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
123 (i386_dr_low_get_status): New function.
124 (x86_insert_point, x86_remove_point): New functions.
125 (x86_stopped_by_watchpoint): New function.
126 (x86_stopped_data_address): New function.
127 (x86_linux_new_process, x86_linux_new_thread): New functions.
128 (x86_linux_prepare_to_resume): New function.
129 (the_low_target): Add entries for insert_point, remove_point,
130 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
132 * server.c (debug_hw_points): New global.
133 (monitor_show_help): Document set debug-hw-points.
134 (handle_query): Process "set debug-hw-points".
135 * server.h (debug_hw_points): Declare.
137 * utils.c (NUMCELLS, CELLSIZE): New macros.
138 (get_sell, xsnprintf, paddress): New functions.
139 * win32-arm-low.c (the_low_target): Add entries for insert_point,
140 remove_point, stopped_by_watchpoint, stopped_data_address.
141 * win32-i386-low.c: Include i386-low.h.
142 (debug_reg_state): Replaces dr.
143 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
144 (i386_dr_low_get_status): New function.
145 (i386_insert_point, i386_remove_point): New functions.
146 (i386_stopped_by_watchpoint): New function.
147 (i386_stopped_data_address): New function.
148 (i386_initial_stuff): Update.
149 (get_thread_context,set_thread_context,i386_thread_added): Update.
150 (the_low_target): Add entries for insert_point,
151 remove_point, stopped_by_watchpoint, stopped_data_address.
152 * win32-low.c (win32_insert_watchpoint): New function.
153 (win32_remove_watchpoint): New function.
154 (win32_stopped_by_watchpoint): New function.
155 (win32_stopped_data_address): New function.
156 (win32_target_ops): Add entries for insert_watchpoint,
157 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
158 * win32-low.h (win32_target_ops): New members insert_point,
159 remove_point, stopped_by_watchpoint, stopped_data_address.
161 2009-06-25 Pedro Alves <pedro@codesourcery.com>
163 * server.c (process_serial_event): Re-return unsupported, not
164 error, if the type isn't recognized. Re-allow supporting only
165 insert or remove packets. Also call require_running for
166 breakpoints. Add missing break statement to default case. Tidy.
167 * target.h (struct target_ops): Rename insert_watchpoint to
168 insert_point, and remove_watchpoint to remove_point.
170 * linux-low.h (struct linux_target_ops): Likewise.
171 * linux-low.c (linux_insert_watchpoint): Rename to ...
172 (linux_insert_point): ... this. Adjust.
173 (linux_remove_watchpoint): Rename to ...
174 (linux_remove_point): ... this. Adjust.
175 (linux_target_ops): Adjust.
176 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
177 (cris_insert_point): ... this.
178 (cris_remove_watchpoint): Rename to ...
179 (cris_remove_point): ... this.
180 (the_low_target): Adjust.
182 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
184 * server.c (handle_v_kill): Pass signal_pid to
185 kill_inferior if multi_process is zero.
187 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
189 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
190 * target.h (target_ops): Comment for *_watchpoint to make it clear
191 the functions can get types '0' and '1'.
193 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
195 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
196 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
197 * regcache.c (get_regcache): Likewise.
198 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
199 * win32-low.c (child_fetch_inferior_registers): Remove check for
202 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
203 Pedro Alves <pedro@codesourcery.com>
205 * target.h (struct target_ops) <supports_multi_process>: New
207 (target_supports_multi_process): New.
208 * server.c (handle_query): Even if GDB reports support, only
209 enable multi-process if the target also supports it. Report
210 multi-process support only if the target backend supports it.
211 * linux-low.c (linux_supports_multi_process): New function.
212 (linux_target_ops): Install it as target_supports_multi_process
215 2009-05-24 Doug Evans <dje@google.com>
217 Global renaming of find_thread_pid to find_thread_ptid.
218 * server.h (find_thread_ptid): Renamed from find_thread_pid.
219 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
222 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
223 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
226 * linux-low.c (get_stop_pc): Print pc if debug_threads.
227 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
228 (linux_resume_one_lwp): Ditto.
230 2009-05-23 Doug Evans <dje@google.com>
232 * linux-low.c (linux_resume_one_lwp): Change type of first arg
233 from struct inferior_list_entry * to struct lwp_info *.
236 2009-05-13 Doug Evans <dje@google.com>
238 * linux-x86-low.c: Don't include assert.h.
239 (x86_siginfo_fixup): Use fatal, not assert.
240 (x86_arch_setup): Fix comment.
242 2009-05-12 Doug Evans <dje@google.com>
244 Biarch support for i386/amd64 gdbserver.
245 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
247 (linux-i386-low.o, linux-x86-64-low.o): Delete.
248 (linux-x86-low.o): Add.
249 * linux-x86-64-low.c: Delete.
250 * linux-i386-low.c: Delete.
251 * linux-x86-low.c: New file.
252 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
254 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
256 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
257 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
258 (linux_child_pid_to_exec_file): New function.
259 (elf_64_header_p, elf_64_file_p): New functions.
260 (siginfo_fixup): New function.
261 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
262 give target a chance to convert layout.
263 * linux-low.h (linux_target_ops): New member siginfo_fixup.
264 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
266 2009-05-07 Doug Evans <dje@google.com>
268 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
269 (regsets_store_inferior_registers): Ditto.
271 2009-05-06 Pedro Alves <pedro@codesourcery.com>
275 * linux-low.c (must_set_ptrace_flags): Delete.
276 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
278 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
279 `lwp->must_set_ptrace_flags' instead.
280 (linux_wait_for_event_1): Set ptrace options here.
281 (linux_wait_1): ... not here.
283 2009-04-30 Doug Evans <dje@google.com>
285 * inferiors.c (started_inferior_callback): New function.
286 (attached_inferior_callback): New function.
287 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
288 * server.c (print_started_pid, print_attached_pid): New functions.
289 (detach_or_kill_for_exit): New function.
290 (main): Call it instead of for_each_inferior (kill_inferior_callback).
291 * server.h (have_started_inferiors_p): Declare.
292 (have_attached_inferiors_p): Declare.
294 * inferiors.c (remove_process): Fix memory leak, free process.
295 * linux-low.c (linux_remove_process): New function.
296 (linux_kill): Call it instead of remove_process.
297 (linux_detach, linux_wait_1): Ditto.
299 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
301 * configure.srv: Add x86 Windows CE target.
303 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
305 * inferiors.c (get_thread_process): Make global.
306 * server.h (get_thread_process): Add prototype.
307 * thread-db.c (find_one_thread): Use get_thread_process
308 instead of current_process.
309 (thread_db_get_tls_address): Do not crash if called when
310 thread layer is not yet initialized.
312 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
314 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
315 * spu-low.c (current_tid): Rename to ...
316 (current_ptid): ... this.
317 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
318 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
319 ptid_get_lwp (current_ptid) instead of current_tid.
320 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
321 instead of current_tid. Use find_process_pid to verify pid
322 argument is valid. Pass proper argument to remove_process.
323 (spu_thread_alive): Compare current_ptid instead of current_tid.
324 (spu_resume): Likewise.
326 2009-04-02 Pedro Alves <pedro@codesourcery.com>
328 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
331 2009-04-01 Pedro Alves <pedro@codesourcery.com>
333 Implement the multiprocess extensions, and add linux multiprocess
336 * server.h (ULONGEST): Declare.
337 (struct ptid, ptid_t): New.
338 (minus_one_ptid, null_ptid): Declare.
339 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
340 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
341 (struct inferior_list_entry): Change `id' type from unsigned from
343 (struct sym_cache, struct breakpoint, struct
344 process_info_private): Forward declare.
345 (struct process_info): Declare.
346 (current_process): Declare.
347 (all_processes): Declare.
348 (initialize_inferiors): Declare.
349 (add_thread): Adjust to use ptid_t.
350 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
351 (add_process, remove_process, find_thread_pid): Declare.
352 (find_inferior_id): Adjust to use ptid_t.
353 (cont_thread, general_thread, step_thread): Change type to ptid_t.
354 (multi_process): Declare.
355 (push_event): Adjust to use ptid_t.
356 (read_ptid, write_ptid): Declare.
357 (prepare_resume_reply): Adjust to use ptid_t.
358 (clear_symbol_cache): Declare.
359 * inferiors.c (all_processes): New.
360 (null_ptid, minus_one_ptid): New.
361 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
362 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
363 (add_thread): Change unsigned long to ptid. Remove gdb_id
365 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
366 (gdb_id_to_thread): Rename to ...
367 (find_thread_pid): ... this. Change unsigned long to ptid.
368 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
369 (loaded_dll, pull_pid_from_list): Adjust.
370 (add_process, remove_process, find_process_pid)
371 (get_thread_process, current_process, initialize_inferiors): New.
372 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
373 (struct target_waitstatus) <related_pid>: Ditto.
374 (struct target_ops) <kill, detach>: Add `pid' argument. Change
376 (struct target_ops) <join>: Add `pid' argument.
377 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
378 (struct target_ops) <wait>: Add `ptid' field. Change return type
380 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
381 (mywait): Add `ptid' argument. Change return type to ptid_t.
382 (target_pid_to_str): Declare.
383 * target.c (set_desired_inferior): Adjust to use ptids.
384 (mywait): Add new `ptid' argument. Adjust.
385 (target_pid_to_str): New.
386 * mem-break.h (free_all_breakpoints): Declare.
387 * mem-break.c (breakpoints): Delelete.
388 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
389 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
390 to use per-process breakpoint list.
391 (free_all_breakpoints): New.
392 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
393 (symbol_cache, all_symbols_looked_up): Delete.
395 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
397 (prepare_resume_reply): Change ptid argument's type from unsigned
398 long to ptid_t. Adjust. Implement W;process and X;process.
399 (free_sym_cache, clear_symbol_cache): New.
400 (look_up_one_symbol): Adjust to per-process symbol cache. *
401 * server.c (cont_thread, general_thread, step_thread): Change type
404 (multi_process): New.
405 (last_ptid): Change type to ptid_t.
406 (struct vstop_notif) <ptid>: Change type to ptid_t.
407 (queue_stop_reply, push_event): Change `ptid' argument's type to
409 (discard_queued_stop_replies): Add `pid' argument.
410 (start_inferior): Adjust to use ptids. Adjust to mywait interface
411 changes. Don't reference the `attached' global.
412 (attach_inferior): Adjust to mywait interface changes.
413 (handle_query): Adjust to use ptids. Parse GDB's qSupported
414 features. Handle and report "multiprocess+". Handle
416 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
418 (handle_v_kill): New.
419 (handle_v_stopped): Adjust to use target_pid_to_str.
420 (handle_v_requests): Allow multiple attaches and runs when
421 multiprocess extensions are in effect. Handle "vKill".
422 (myresume): Adjust to use ptids.
423 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
424 (handle_status): Adjust to discard_queued_stop_replies interface
426 (first_thread_of, kill_inferior_callback)
427 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
428 (main): Call initialize_inferiors. Adjust to use ptids, killing
429 and detaching from all inferiors. Handle multiprocess packet
431 * linux-low.h: Include gdb_proc_service.h.
432 (struct process_info_private): New.
433 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
434 <lwpid_of>: Use ptid_get_lwp.
435 (get_lwp_thread): Adjust.
436 (struct lwp_info): Add `dead' member.
437 (find_lwp_pid): Declare.
438 * linux-low.c (thread_db_active): Delete.
439 (new_inferior): Adjust comment.
440 (inferior_pid): Delete.
441 (linux_add_process): New.
442 (handle_extended_wait): Adjust.
443 (add_lwp): Change unsigned long to ptid.
444 (linux_create_inferior): Add process to processes table. Adjust
445 to use ptids. Don't set new_inferior here.
446 (linux_attach_lwp): Rename to ...
447 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
448 it. Adjust to use ptids.
449 (linux_attach_lwp): New.
450 (linux_attach): Add process to processes table. Don't set
452 (struct counter): New.
453 (second_thread_of_pid_p, last_thread_of_process_p): New.
454 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
456 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
457 processes. Remove process from process table.
458 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
459 to multiple processes.
460 (any_thread_of): New.
461 (linux_detach): Add `pid' argument, and handle it. Remove process
462 from processes table.
463 (linux_join): Add `pid' argument. Handle it.
464 (linux_thread_alive): Change unsighed long argument to ptid_t.
465 Consider dead lwps as not being alive.
466 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
467 threads we're not interested in.
468 (same_lwp, find_lwp_pid): New.
469 (linux_wait_for_lwp): Change `pid' argument's type from int to
471 (linux_wait_for_event): Rename to ...
472 (linux_wait_for_event_1): ... this. Change `pid' argument's type
473 from int to ptid_t. Adjust.
474 (linux_wait_for_event): New.
475 (linux_wait_1): Add `ptid' argument. Change return type to
476 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
477 that exit from the process table.
478 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
480 (mark_lwp_dead): New.
481 (wait_for_sigstop): Adjust to use ptids. If a process exits while
482 stopping all threads, mark its main lwp as dead.
483 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
485 (fetch_register, usr_store_inferior_registers)
486 (regsets_fetch_inferior_registers)
487 (regsets_store_inferior_registers, linux_read_memory)
488 (linux_write_memory): Inline `inferior_pid'.
489 (linux_look_up_symbols): Adjust to use per-process
491 (linux_request_interrupt): Adjust to use ptids.
492 (linux_read_auxv): Inline `inferior_pid'.
493 (initialize_low): Don't reference thread_db_active.
494 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
495 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
496 (ps_getpid): Return the pid of the current inferior.
497 * thread-db.c (proc_handle, thread_agent): Delete.
498 (thread_db_create_event, thread_db_enable_reporting): Adjust to
500 (find_one_thread): Change argument type to ptid_t. Adjust to
502 (maybe_attach_thread): Adjust to per-process data and ptids.
503 (thread_db_find_new_threads): Ditto.
504 (thread_db_init): Ditto.
505 * spu-low.c (spu_create_inferior, spu_attach): Add process to
506 processes table. Adjust to use ptids.
507 (spu_kill, spu_detach): Adjust interface. Remove process from
509 (spu_join, spu_thread_alive): Adjust interface.
510 (spu_wait): Adjust interface. Remove process from processes
511 table. Adjust to use ptids.
512 * win32-low.c (current_inferior_tid): Delete.
513 (current_inferior_ptid): New.
514 (debug_event_ptid): New.
515 (thread_rec): Take a ptid. Adjust.
516 (child_add_thread): Add `pid' argument. Adjust to use ptids.
517 (child_delete_thread): Ditto.
518 (do_initial_child_stuff): Add `attached' argument. Add process to
520 (child_fetch_inferior_registers, child_store_inferior_registers):
522 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
523 (win32_attach): Pass 1 to do_initial_child_stuff.
524 (win32_kill): Adjust interface. Remove process from processes
526 (win32_detach): Ditto.
527 (win32_join): Adjust interface.
528 (win32_thread_alive): Take a ptid.
529 (win32_resume): Adjust to use ptids.
530 (get_child_debug_event): Ditto.
531 (win32_wait): Adjust interface. Remove exiting process from
534 2009-04-01 Pedro Alves <pedro@codesourcery.com>
536 Non-stop mode support.
538 * server.h (non_stop): Declare.
539 (gdb_client_data, handler_func): Declare.
540 (delete_file_handler, add_file_handler, start_event_loop):
542 (handle_serial_event, handle_target_event, push_event)
543 (putpkt_notif): Declare.
544 * target.h (enum resume_kind): New.
545 (struct thread_resume): Replace `step' field by `kind' field.
546 (TARGET_WNOHANG): Define.
547 (struct target_ops) <wait>: Add `options' argument.
548 <supports_non_stop, async, start_non_stop>: New fields.
549 (target_supports_non_stop, target_async): New.
550 (start_non_stop): Declare.
551 (mywait): Add `options' argument.
552 * target.c (mywait): Add `options' argument. Print child exit
554 (start_non_stop): New.
555 * server.c (non_stop, own_buf, mem_buf): New globals.
556 (struct vstop_notif): New.
557 (notif_queue): New global.
558 (queue_stop_reply, push_event, discard_queued_stop_replies)
559 (send_next_stop_reply): New.
560 (start_inferior): Adjust to use resume_kind. Adjust to mywait
562 (attach_inferior): In non-stop mode, don't wait for the target
564 (handle_general_set): Handle QNonStop.
565 (handle_query): When handling qC, return the current general
566 thread, instead of the first thread of the list.
567 (handle_query): If the backend supports non-stop mode, include
568 QNonStop+ in the qSupported query response.
569 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
571 (handle_v_attach, handle_v_run): Handle non-stop mode.
572 (handle_v_stopped): New.
573 (handle_v_requests): Report support for vCont;t. Handle vStopped.
574 (myresume): Adjust to use resume_kind. Handle non-stop.
575 (queue_stop_reply_callback): New.
576 (handle_status): Handle non-stop mode.
577 (main): Clear non_stop flag on reconnection. Use the event-loop.
578 Refactor serial protocol handling from here ...
579 (process_serial_event): ... to this new function. When GDB
580 selects any thread, select one here. In non-stop mode, wait until
581 GDB acks all pending events before exiting.
582 (handle_serial_event, handle_target_event): New.
583 * remote-utils.c (remote_open): Install remote_desc in the event
585 (remote_close): Remove remote_desc from the event loop.
586 (putpkt_binary): Rename to...
587 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
588 (putpkt_binary): New as wrapper around putpkt_binary_1.
590 (prepare_resume_reply): In non-stop mode, don't change the
593 * Makefile.in (OBJ): Add event-loop.o.
594 (event-loop.o): New rule.
596 * linux-low.h (pid_of): Moved here.
598 (get_lwp_thread): Use lwpid_of.
599 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
600 * linux-low.c (pid_of): Delete.
601 (inferior_pid): Use lwpid_of.
602 (linux_event_pipe): New.
603 (target_is_async_p): New.
605 (handle_extended_wait): Use lwpid_of.
606 (add_lwp): Don't set lwpid field.
607 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
608 (linux_kill_one_lwp): If killing a running lwp, stop it first.
609 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
610 (linux_detach_one_lwp): If detaching from a running lwp, stop it
611 first. Adjust to linux_wait_for_event interface changes. Use
613 (linux_detach): Don't delete the main lwp here.
614 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
615 (status_pending_p): Don't consider explicitly suspended lwps.
616 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
617 pointer. Add OPTIONS argument. Change return type to int. Use
618 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
619 (linux_wait_for_event): Take an integer pid instead of a lwp_info
620 pointer. Add status pointer argument. Return a pid instead of a
621 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
622 changes. In non-stop mode, don't switch to a random thread.
623 (linux_wait): Rename to...
624 (linux_wait_1): ... this. Add target_options argument, and handle
625 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
626 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
627 clean exit and signal exit code. Don't stop all threads in
628 non-stop mode. In all-stop mode, only stop all threads when
629 reporting a stop to GDB. Handle explicit thread stop requests.
630 (async_file_flush, async_file_mark): New.
632 (send_sigstop): Use lwpid_of.
633 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
634 interface changes. In non-stop mode, don't switch to a random
636 (linux_resume_one_lwp): Use lwpid_of.
637 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
638 (linux_resume_one_thread): ... this. Handle resume_stop. In
639 non-stop mode, don't look for pending flag in all threads.
640 (resume_status_pending_p): Don't consider explicitly suspended
642 (my_waitpid): Reimplement. Emulate __WALL.
643 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
645 (sigchld_handler, linux_supports_non_stop, linux_async)
646 (linux_start_non_stop): New.
647 (linux_target_ops): Register linux_supports_non_stop, linux_async
648 and linux_start_non_stop.
649 (initialize_low): Install SIGCHLD handler.
650 * thread-db.c (thread_db_create_event, find_one_thread)
651 (thread_db_get_tls_address): Use lwpid_of.
652 * win32-low.c (win32_detach): Adjust to use resume_kind.
653 (win32_wait): Add `options' argument.
654 * spu-low.c (spu_resume): Adjust to use resume_kind.
655 (spu_wait): Add `options' argument.
657 2009-04-01 Pedro Alves <pedro@codesourcery.com>
659 Decouple target code from remote protocol.
661 * target.h (enum target_waitkind): New.
662 (struct target_waitstatus): New.
663 (struct target_ops) <wait>: Return an unsigned long. Take a
664 target_waitstatus pointer instead of a char pointer.
666 * target.c (mywait): Change prototype to return an unsigned long.
667 Take a target_waitstatus pointer instead of a char pointer. Adjust.
668 * server.h (thread_from_wait, old_thread_from_wait): Delete
670 (prepare_resume_reply): Change prototype to take a
672 * server.c (thread_from_wait, old_thread_from_wait): Delete.
673 (last_status, last_ptid): New.
674 (start_inferior): Remove "statusptr" argument. Adjust. Return a
675 pid instead of a signal.
676 (attach_inferior): Remove "status" and "signal" parameters.
678 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
680 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
681 (handle_v_requests, myresume): Remove "status" and "signal"
683 (handle_status): New.
684 (main): Delete local `status'. Adjust.
685 * remote-utils.c: Include target.h.
686 (prepare_resume_reply): Change prototype to take a
687 target_waitstatus. Adjust.
689 * linux-low.c (linux_wait): Adjust to new target_ops->wait
691 * spu-low.c (spu_wait): Adjust.
692 * win32-low.c (enum target_waitkind, struct target_waitstatus):
694 (win32_wait): Adjust.
696 2009-04-01 Pedro Alves <pedro@codesourcery.com>
698 * target.h (struct thread_resume): Delete leave_stopped member.
699 (struct target_ops): Add a `n' argument to the `resume' callback.
700 * server.c (start_inferior): Adjust.
701 (handle_v_cont, myresume): Adjust.
702 * linux-low.c (check_removed_breakpoint): Adjust to resume
703 interface change, and to removed leave_stopped field.
704 (resume_ptr): Delete.
705 (struct thread_resume_array): New.
706 (linux_set_resume_request): Add new `arg' parameter. Adjust to
707 resume interface change.
708 (linux_continue_one_thread, linux_queue_one_thread)
709 (resume_status_pending_p): Check if the resume field is NULL
710 instead of checking the leave_stopped member.
711 (linux_resume): Adjust to the target resume interface change.
712 * spu-low.c (spu_resume): Adjust to the target resume interface
714 * win32-low.c (win32_detach, win32_resume): Ditto.
716 2009-04-01 Pedro Alves <pedro@codesourcery.com>
718 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
720 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
722 (linux_continue_one_thread): Only preserve the stepping flag if
723 there's a pending breakpoint.
725 2009-03-31 Pedro Alves <pedro@codesourcery.com>
727 * server.c (main): After the inferior having exited, call
728 remote_close before exiting gdbserver.
730 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
732 Fix size of FPSCR in Power 7 processors.
733 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
734 (PPC_FEATURE_HAS_DFP): New #define.
735 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
738 2009-03-23 Pedro Alves <pedro@codesourcery.com>
740 * server.c (handle_query) Whitespace and formatting.
742 2009-03-22 Pedro Alves <pedro@codesourcery.com>
744 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
745 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
746 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
747 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
748 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
749 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
750 Makefile.in, configure.ac: Fix whitespace throughout.
751 * configure: Regenerate.
753 2009-03-22 Pedro Alves <pedro@codesourcery.com>
755 * inferiors.c (find_inferior): Make it safe for the callback
756 function to delete the currently iterated inferior.
758 2009-03-22 Pedro Alves <pedro@codesourcery.com>
760 * Makefile.in (linuw_low_h): Move higher.
761 (thread-db.o): Depend on $(linux_low_h).
763 2009-03-17 Pedro Alves <pedro@codesourcery.com>
765 Rename "process" to "lwp" throughout.
767 * linux-low.c (all_processes): Rename to...
768 (all_lwps): ... this.
769 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
770 (add_process): Rename to ...
771 (add_lwp): ... this. Adjust.
772 (linux_create_inferior): Adjust.
773 (linux_attach_lwp): Adjust.
774 (linux_attach): Adjust.
775 (linux_kill_one_process): Rename to ...
776 (linux_kill_one_lwp): ... this. Adjust.
777 (linux_kill): Adjust.
778 (linux_detach_one_process): Rename to ...
779 (linux_detach_one_lwp): ... this. Adjust.
780 (linux_detach): Adjust.
781 (check_removed_breakpoint): Adjust.
782 (status_pending_p): Adjust.
783 (linux_wait_for_process): Rename to ...
784 (linux_wait_for_lwp): ... this. Adjust.
785 (linux_wait_for_event): Adjust.
786 (send_sigstop): Adjust.
787 (wait_for_sigstop): Adjust.
788 (stop_all_processes): Rename to ...
789 (stop_all_lwps): ... this.
790 (linux_resume_one_process): Rename to ...
791 (linux_resume_one_lwp): ... this. Adjust.
792 (linux_set_resume_request, linux_continue_one_thread)
793 (linux_queue_one_thread, resume_status_pending_p)
794 (usr_store_inferior_registers, regsets_store_inferior_registers)
795 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
797 * linux-low.h (get_process): Rename to ...
798 (get_lwp): ... this. Adjust.
799 (get_thread_process): Rename to ...
800 (get_thread_lwp): ... this. Adjust.
801 (get_process_thread): Rename to ...
802 (get_lwp_thread): ... this. Adjust.
803 (struct process_info): Rename to ...
804 (struct lwp_info): ... this.
805 (all_processes): Rename to ...
806 (all_lwps): ... this.
807 * proc-service.c (ps_lgetregs): Adjust.
808 * thread-db.c (thread_db_create_event, find_one_thread)
809 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
811 2009-03-14 Pedro Alves <pedro@codesourcery.com>
813 * server.c (handle_query): Handle "qAttached".
815 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
817 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
818 GPLv3, update license URL.
820 2009-03-01 Doug Evans <dje@google.com>
822 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
823 (server_h): Add gdb_signals.h.
825 * server.h (target_signal_from_host,target_signal_to_host_p)
826 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
828 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
830 * remote-utils.c (getpkt): Also generate remote-debug
831 information if noack_mode is set.
833 2009-02-06 Pedro Alves <pedro@codesourcery.com>
835 * server.c (handle_query): Report qXfer:siginfo:read and
836 qXfer:siginfo:write as supported and handle them.
837 * target.h (struct target_ops) <qxfer_siginfo>: New field.
838 * linux-low.c (linux_xfer_siginfo): New.
839 (linux_target_ops): Set it.
841 2009-01-26 Pedro Alves <pedro@codesourcery.com>
843 * server.c (gdbserver_usage): Mention --remote-debug.
844 (main): Accept '--remote-debug' switch.
846 2009-01-18 Doug Evans <dje@google.com>
848 * regcache.c (new_register_cache): No need to check result of xcalloc.
849 * server.c (handle_search_memory): Back out calls to xmalloc,
850 result is checked and error is returned to user upon failure.
851 (handle_query): Ditto. Add more checks for result of malloc.
852 (handle_v_cont): Check result of malloc, report error back to
854 (handle_v_run): Ditto. Call freeargv.
855 * server.h (freeargv): Declare.
856 * utils.c (freeargv): New fn.
858 2009-01-15 Doug Evans <dje@google.com>
860 * gdbreplay.c (perror_with_name): Make arg const char *.
861 * server.h (target_signal_to_name): Make return type const char *.
862 * thread-db.c (thread_db_err_str): Make return type const char *.
863 * utils.c (perror_with_name): Make arg const char *.
865 2009-01-14 Pedro Alves <pedro@codesourcery.com>
867 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
868 when handling a EXIT_PROCESS_DEBUG_EVENT.
870 2009-01-06 Joel Brobecker <brobecker@adacore.com>
872 * gdbreplay.c (gdbreplay_version): Update copyright year.
873 * server.c (gdbserver_version): Likewise.
875 2009-01-05 Doug Evans <dje@google.com>
877 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
878 (handle_extended_wait): Improve comment.
880 2008-12-13 Doug Evans <dje@google.com>
882 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
883 * server.h (ATTR_MALLOC): New macro.
884 (xmalloc,xcalloc,xstrdup): Declare.
885 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
886 * inferiors.c: Ditto.
887 * linux-low.c: Ditto.
888 * mem-break.c: Ditto.
890 * remote-utils.c: Ditto.
893 * win32-low.c: Ditto.
895 2008-12-12 Doug Evans <dje@google.com>
897 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
900 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
902 2008-12-09 Doug Evans <dje@google.com>
904 * linux-low.h (struct process_info): Delete member tid, unused.
905 * thread-db.c (find_one_thread): Update.
906 (maybe_attach_thread): Update.
908 2008-12-02 Pedro Alves <pedro@codesourcery.com>
910 * target.h (struct target_ops): Add qxfer_osdata member.
911 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
913 (linux_qxfer_osdata): New functions.
914 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
916 * server.c (handle_query): Handle "qXfer:osdata:read:".
917 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
918 (buffer_xml_printf): New functions.
919 * server.h (struct buffer): New.
920 (buffer_grow_str, buffer_grow_str0): New macros.
921 (buffer_grow, buffer_free, buffer_init, buffer_finish)
922 (buffer_xml_printf): Declare.
924 2008-11-24 Doug Evans <dje@google.com>
926 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
928 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
930 * server.c (handle_v_run): Always use the supplied argument list.
932 2008-11-19 Bob Wilson <bob.wilson@acm.org>
934 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
935 (xtensa_regmap_table): Add entry for scompare1.
937 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
939 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
940 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
941 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
942 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
943 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
944 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
945 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
946 XML target descriptions.
947 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
948 when inferior is running on an ISA 2.05 or later processor. Add
949 special case to return offset for full 64-bit slot of FPSCR when
952 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
954 * Makefile.in (SFILES, clean): Added sparc64 files.
955 (reg-sparc64.o, reg-sparc64.c): New.
956 * configure.srv (sparc*-*-linux*): New configuration.
957 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
958 syscall arguments for SPARC.
959 (regsets_store_inferior_registers): Likewise.
960 * linux-sparc-low.c: New file.
962 2008-10-21 Doug Evans <dje@google.com>
964 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
965 (READLINE_DIR,READLINE_DEP): Delete.
966 (INTERNAL_CFLAGS): Update.
969 2008-10-10 Pedro Alves <pedro@codesourcery.com>
971 * server.c (handle_v_run): If GDB didn't specify an argv, use the
972 whole argv from the last run, not just argv[0].
974 2008-09-08 Pedro Alves <pedro@codesourcery.com>
976 * regcache.c (new_register_cache): Return NULL if the register
977 cache size isn't known yet.
978 (free_register_cache): Avoid dereferencing a NULL regcache.
980 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
982 * configure.srv: Merge MIPS and MIPS64.
984 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
986 * Makefile.in (uninstall): Apply $(EXEEXT) too.
988 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
990 * Makefile.in: Add required vsx dependencies.
992 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
993 Declare init_registers_powerpc_vsx32l.
994 Declare init_registers_powerpc_vsx64l.
995 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
996 (ppc_arch_setup): Check for VSX in hwcap.
997 (ppc_fill_vsxregset): New function.
998 (ppc_store_vsxregset): New function.
999 Add new VSX entry in regset_info target_regsets.
1001 * configure.srv: Add new VSX dependencies.
1003 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1005 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1006 (remote_open): Set or clear transport_is_reliable.
1007 (putpkt_binary): Don't expect acks in noack mode.
1008 (getpkt): Don't send ack/nac in noack mode.
1009 * server.c (handle_general_set): Handle QStartNoAckMode.
1010 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1012 (main): Reset noack_mode on every connection.
1013 * server.h (noack_mode): Declare.
1015 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1017 * Makefile.in (GDBREPLAY_OBS): New variable.
1018 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1020 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1021 Daniel Jacobowitz <dan@codesourcery.com>
1023 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1024 (usr_store_inferior_registers): Likewise.
1025 (regsets_store_inferior_registers): Likewise.
1027 2008-07-31 Rolf Jansen <rj@surtec.com>
1028 Pedro Alves <pedro@codesourcery.com>
1030 * configure.ac: Check for memmem declaration.
1031 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1032 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1033 (disable_packet_qfThreadInfo): Unconditionally compile.
1034 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1035 * configure, config.in: Regenerate.
1037 2008-07-28 Doug Kwan <dougkwan@google.com>
1039 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1040 (linux_write_memory): Remove declaration of errno.
1042 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1044 * linux-low.c (handle_extended_wait): Do not use "status"
1045 variable uninitialized.
1047 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1049 * server.c (handle_v_attach): Inhibit reporting dll changes.
1051 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1053 * remote-utils.c (prepare_resume_reply): If requested, don't
1054 output "thread:TID" in the T stop reply.
1056 * server.c (disable_packet_vCont, disable_packet_Tthread)
1057 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1058 (handle_query): If requested, disable support for qC, qfThreadInfo
1060 (handle_v_requests): If requested, disable support for vCont.
1061 (gdbserver_show_disableable): New.
1062 (main): Handle --disable-packet and --disable-packet=LIST.
1064 * server.h (disable_packet_vCont, disable_packet_Tthread)
1065 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1067 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1069 * server.c (gdbserver_usage): Mention --version.
1071 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1073 * Makefile.in (gdbreplay.o): New rule.
1075 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1077 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1078 message, not gdbserver.
1080 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1081 Nathan Sidwell <nathan@codesourcery.com>
1082 Joseph Myers <joseph@codesourcery.com>
1084 * acinclude.m4: Include ../../config/acx.m4.
1085 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1086 * configure, config.in: Regenerate.
1087 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1088 * server.c (gdbserver_version): Print PKGVERSION.
1089 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1090 (main): Adjust gdbserver_usage calls.
1091 * gdbreplay.c (version, host_name): Add declarations.
1092 (gdbreplay_version, gdbreplay_usage): New.
1093 (main): Accept --version and --help options.
1095 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1097 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1098 (arm_breakpoint_at): Handle Thumb.
1099 (the_low_target): Add comment.
1101 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1103 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1105 2008-05-09 Doug Evans <dje@google.com>
1107 * server.h (decode_search_memory_packet): Declare.
1108 * remote-utils.c (decode_search_memory_packet): New fn.
1109 * server.c (handle_search_memory_1): New fn.
1110 (handle_search_memory): New fn.
1111 (handle_query): Process qSearch:memory packets.
1113 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1115 * regcache.c (registers_length): Remove.
1116 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1117 full register packet.
1118 * regcache.h (registers_length): Remove prototype.
1119 * server.h (PBUFSIZ): Define to 16384.
1121 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1123 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1124 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1125 powerpc-64l.o, and powerpc-altivec64l.o.
1126 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1127 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1128 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1129 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1130 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1133 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1134 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1135 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1136 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1137 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1138 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1139 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1140 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1141 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1142 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1145 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1146 (init_registers_powerpc_32l): ... this new prototype.
1147 (init_registers_powerpc_32): Remove, replace by ...
1148 (init_registers_powerpc_altivec32l): ... this new prototype.
1149 (init_registers_powerpc_e500): Remove, replace by ...
1150 (init_registers_powerpc_e500l): ... this new prototype.
1151 (init_registers_ppc64): Remove, replace by ...
1152 (init_registers_powerpc_64l): ... this new prototype.
1153 (init_registers_powerpc_64): Remove, replace by ...
1154 (init_registers_powerpc_altivec64l): ... this new prototype.
1155 (ppc_num_regs): Set to 73.
1156 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1157 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1158 (ppc_cannot_store_register): Handle orig_r3 and trap.
1159 (ppc_arch_setup): Update init_registers_... calls.
1160 (ppc_fill_gregset): Handle orig_r3 and trap.
1162 * inferiors.c (clear_inferiors): Reset current_inferior.
1164 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1166 * acinclude.m4: Add override.m4.
1167 * configure: Regenerate.
1169 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1171 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1172 initial call to init_register_ppc64.
1174 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1176 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1177 powerpc*-*-linux* case.
1178 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1180 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1182 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1183 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1185 * linux-ppc-low.c: Include <elf.h>.
1186 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1187 (ppc_hwcap): New global variable.
1188 (ppc_regmap): Remove __SPE__ #ifdef sections.
1189 (ppc_regmap_e500): New global variable.
1190 (ppc_cannot_store_register): Update __SPE__ special case.
1191 (ppc_get_hwcap): New function.
1192 (ppc_arch_setup): Use it to determine whether inferior supports
1193 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1194 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1195 Do not access registers if target does not support AltiVec.
1196 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1197 Do not access registers if target does not support SPE.
1198 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1200 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1202 * linux-low.c (disabled_regsets, num_regsets): New.
1203 (use_regsets_p): Delete.
1204 (linux_wait_for_process): Clear disabled_regsets.
1205 (regsets_fetch_inferior_registers): Check and set it.
1206 (regsets_store_inferior_registers): Likewise.
1207 (linux_fetch_registers, linux_store_registers): Do not use
1209 (initialize_low): Allocate disabled_regsets.
1211 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1213 * Makefile.in (LIBOBJS): New.
1215 (memmem.o): New rule.
1216 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1217 * configure: Regenerated.
1219 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1221 * server.c (handle_query): Never return "unsupported" for
1222 qXfer:features:read queries.
1224 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1226 * server.c (get_features_xml): Fix inverted condition.
1227 (handle_query): Always support qXfer:feature:read.
1229 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1231 * server.c (wrapper_argv): New.
1232 (start_inferior): Handle wrapper_argv. If set, expect an extra
1234 (gdbserver_usage): Document --wrapper.
1235 (main): Parse --wrapper.
1237 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1239 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1240 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1241 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1242 (ppc_set_pc): Likewise.
1243 (ppc_arch_setup): New function.
1244 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1245 of collect_register.
1246 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1248 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1250 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1251 instead of linux-ppc64-low.o.
1252 * linux-ppc64-low.c: Remove file.
1253 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1254 (linux-ppc64-low.o): Remove rule.
1256 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1257 (init_registers_powerpc_64): Likewise.
1258 (ppc_regmap): Conditionally define depending on __powerpc64__.
1259 (ppc_cannot_store_register): Do not special-case "fpscr" when
1260 compiled on __powerpc64__.
1261 (ppc_collect_ptrace_register): New function.
1262 (ppc_supply_ptrace_register): New function.
1263 (ppc_breakpoint): Change type to "unsigned int".
1264 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1265 (the_low_target): Conditionally provide initializers for the
1266 arch_setup member depending on __powerpc64__. Install
1267 collect_ptrace_register and supply_ptrace_register members.
1269 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1271 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1272 * server.c (gdbserver_xmltarget): Define.
1273 (get_features_xml): Use it to replace "target.xml" and arch_string.
1275 * configure.srv: Remove srv_xmltarget. Add XML files that were
1276 mentioned there to srv_xmlfiles instead. Remove conditional tests
1277 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1278 srv_xmlfiles and srv_regobj to include all possible choices.
1279 * configure.ac (srv_xmltarget): Remove.
1280 (srv_xmlfiles): Do not add "target.xml".
1281 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1282 checks for supplementary target information.
1283 * configure: Regenerate.
1284 * Makefile.in (XML_TARGET): Remove.
1285 (target.xml): Remove rule.
1286 (clean): Do not clean up target.xml.
1287 (.PRECIOUS): Do not mention target.xml.
1289 * target.h (struct target_ops): Remove arch_string member.
1290 * linux-low.c (linux_arch_string): Remove.
1291 (linux_target_ops): Remove arch_string initializer.
1292 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1293 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1294 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1295 * spu-low.c (spu_arch_string): Remove.
1296 (spu_target_ops): Remove arch_string initializer.
1297 * win32-low.c (win32_arch_string): Remove.
1298 (win32_target_ops): Remove arch_string initializer.
1299 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1300 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1301 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1303 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1305 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1306 by collect_ptrace_register and supply_ptrace_register hooks.
1307 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1308 instead of checking for the_low_target.left_pad_xfer.
1309 (usr_store_inferior_registers): Use collect_ptrace_register callback
1310 instead of checking for the_low_target.left_pad_xfer.
1312 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1313 (s390_supply_ptrace_register): Likewise.
1314 (s390_fill_gregset): Call s390_collect_ptrace_register.
1315 (the_low_target): Update.
1317 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1318 (ppc_supply_ptrace_register): Likewise.
1319 (the_low_target): Update.
1321 * linux-i386-low.c (the_low_target): Update.
1322 * linux-x86-64-low.c (the_low_target): Update.
1324 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1326 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1327 reg-s390.o and reg-s390x.o.
1329 * linux-low.c (new_inferior): New global variable.
1330 (linux_create_inferior, linux_attach): Set it.
1331 (linux_wait_for_process): Call the_low_target.arch_setup after the
1332 target has stopped for the first time.
1333 (initialize_low): Do not call the_low_target.arch_setup.
1335 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1336 (s390_set_pc): Likewise.
1337 (s390_arch_setup): New function.
1338 (the_low_target): Use s390_arch_setup as arch_setup routine.
1340 * regcache.c (realloc_register_cache): New function.
1341 (set_register_cache): Call it for each existing regcache.
1343 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1345 * server.h (init_registers): Remove prototype.
1347 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1348 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1349 instead of init_registers ().
1350 * linux-arm-low.c (init_registers_arm): Add prototype.
1351 (init_registers_arm_with_iwmmxt): Likewise.
1352 (the_low_target): Add initializer for arch_setup field.
1353 * linux-cris-low.c (init_registers_cris): Add prototype.
1354 (the_low_target): Add initializer for arch_setup field.
1355 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1356 (the_low_target): Add initializer for arch_setup field.
1357 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1358 (the_low_target): Add initializer for arch_setup field.
1359 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1360 (the_low_target): Add initializer for arch_setup field.
1361 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1362 (the_low_target): Add initializer for arch_setup field.
1363 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1364 (the_low_target): Add initializer for arch_setup field.
1365 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1366 (init_registers_mips64_linux): Likewise.
1367 (the_low_target): Add initializer for arch_setup field.
1368 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1369 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1370 (the_low_target): Add initializer for arch_setup field.
1371 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1372 (init_registers_powerpc_64): Likewise.
1373 (the_low_target): Add initializer for arch_setup field.
1374 * linux-s390-low.c (init_registers_s390): Add prototype.
1375 (init_registers_s390x): Likewise.
1376 (the_low_target): Add initializer for arch_setup field.
1377 * linux-sh-low.c (init_registers_sh): Add prototype.
1378 (the_low_target): Add initializer for arch_setup field.
1379 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1380 (the_low_target): Add initializer for arch_setup field.
1381 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1382 (the_low_target): Add initializer for arch_setup field.
1384 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1385 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1386 instead of init_registers ().
1387 * win32-arm-low.c (init_registers_arm): Add prototype.
1388 (the_low_target): Add initializer for arch_setup field.
1389 * win32-i386-low.c (init_registers_i386): Add prototype.
1390 (the_low_target): Add initializer for arch_setup field.
1392 * spu-low.c (init_registers_spu): Add prototype.
1393 (initialize_low): Call initialie_registers_spu () instead of
1394 initialize_registers ().
1396 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1398 * server.c (handle_v_requests): When handling the vRun and vAttach
1399 packets, if already debugging a process, don't kill it. Return an
1402 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1404 * server.c (handle_query): Correct length check.
1406 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1408 * win32-low.c (do_initial_child_stuff): Add process handle
1409 parameter. Set current_process_handle and current_process_id from the
1410 parameters. Clear globals.
1411 (win32_create_inferior): Don't set current_process_handle and
1412 current_process_id here. Instead pass them on the call to
1413 do_initial_child_stuff.
1414 (win32_attach): Likewise.
1415 (win32_clear_inferiors): New.
1416 (win32_kill): Don't close the current process handle or the
1417 current thread handle here. Instead call win32_clear_inferiors.
1418 (win32_detach): Don't open a new handle to the process. Call
1419 win32_clear_inferiors.
1420 (win32_join): Don't rely on current_process_handle; open a new
1421 handle using the process id.
1422 (win32_wait): Call win32_clear_inferiors when the inferior process
1425 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1427 * server.c (monitor_show_help): Add "exit".
1429 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1431 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1432 (clean): Add reg-xtensa.c.
1433 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1434 * configure.srv (xtensa*-*-linux*) New target.
1435 * linux-xtensa-low.c: New.
1436 * xtensa-xtregs.c: New.
1438 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1440 * hostio.c: Don't include errno.h.
1441 (errno_to_fileio_errno): Move to hostio-errno.
1442 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1443 error number outputting to the target->hostio_last_error callback.
1444 (hostio_packet_error): Use FILEIO_EINVAL directly.
1445 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1446 calls to hostio_error.
1447 * hostio-errno.c: New.
1448 * server.h (hostio_last_error_from_errno): Declare.
1449 * target.h (target_ops): Add hostio_last_error member.
1450 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1451 as hostio_last_error handler.
1452 * spu-low.c (spu_target_ops): Likewise.
1453 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1454 (wince_hostio_last_error): New functions.
1455 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1456 as hostio_last_error handler.
1457 (win32_target_ops) [!_WIN32_WCE]: Register
1458 hostio_last_error_from_errno as hostio_last_error handler.
1459 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1460 (hostio-errno.o): New rule.
1461 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1462 * configure.srv (srv_hostio_err_objs): New variable. Default to
1464 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1465 * configure: Regenerate.
1467 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1469 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1470 (linux_kill, linux_detach): Clean up the process list.
1471 * remote-utils.c (remote_open): Improve port number parsing.
1472 (putpkt_binary, input_interrupt): Only send interrupts if the target
1474 * server.c (extended_protocol): Make static.
1475 (attached): Define earlier.
1476 (exit_requested, response_needed, program_argv): New variables.
1477 (target_running): New.
1478 (start_inferior): Clear attached here.
1479 (attach_inferior): Set attached here.
1480 (require_running): Define.
1481 (handle_query): Use require_running and target_running. Implement
1483 (handle_v_attach, handle_v_run): New.
1484 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1485 (gdbserver_usage): Update.
1486 (main): Redo argument parsing. Handle --debug and --multi. Handle
1487 --attach along with other options or after the port. Save
1488 program_argv. Support no initial program. Resynchronize
1489 communication with GDB after an error. Handle "monitor exit".
1490 Use require_running and target_running. Always allow the extended
1491 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1492 restart in extended mode.
1493 * README: Refer to the GDB manual. Update --attach usage.
1495 2007-12-20 Andreas Schwab <schwab@suse.de>
1497 * linux-low.c (STACK_SIZE): Define.
1498 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1499 (linux_test_for_tracefork): Likewise.
1501 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1503 * linux-low.c (linux_wait_for_event): Update messages. Do not
1504 reinsert auto-delete breakpoints.
1505 * mem-break.c (struct breakpoint): Change return type of handler to
1507 (set_breakpoint_at): Update handler type.
1508 (reinsert_breakpoint_handler): Return 1 instead of calling
1510 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1512 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1513 * mem-break.h (set_breakpoint_at): Update handler type.
1514 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1515 * win32-low.c (auto_delete_breakpoint): New.
1516 (get_child_debug_event): Use it.
1518 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1520 * configure.ac: Check for pread and pwrite.
1521 * hostio.c (handle_pread): Fall back to lseek and read.
1522 (handle_pwrite): Fall back to lseek and write.
1523 * config.in, configure: Regenerated.
1525 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1527 * server.c (myresume): Add own_buf argument.
1528 (main): Update calls.
1530 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1532 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1533 * remote-utils.c (remote_open): Do not call disable_async_io.
1534 (block_async_io): Delete.
1535 (unblock_async_io): Make static.
1536 (initialize_async_io): New.
1537 * server.c (handle_v_cont): Handle async I/O here.
1538 (myresume): Likewise. Move other common resume tasks here...
1539 (main): ... from here. Call initialize_async_io. Disable async
1540 I/O before the main loop.
1541 * server.h (initialize_async_io): Declare.
1542 (block_async_io, unblock_async_io): Delete prototypes.
1543 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1545 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1547 * remote-utils.c (readchar): Allow binary data in received messages.
1549 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1551 * win32-low.c (attaching): New global.
1552 (win32_create_inferior): Clear the `attaching' global.
1553 (win32_attach): Set the `attaching' global.
1554 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1555 attaching. Only set a breakpoint at the entry point if not
1558 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1560 * server.c (main): Don't report dll events on the initial
1561 connection on attaches.
1563 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1565 * server.c (main): Relax numerical bases supported for the pid of
1566 the --attach command line argument.
1568 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1570 * win32-low.c (win32_attach): Call OpenProcess before
1571 DebugActiveProcess, not after. Add last error output to error
1574 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1576 * win32-low.c (win32_get_thread_context)
1577 (win32_set_thread_context): New functions.
1578 (thread_rec): Use win32_get_thread_context.
1579 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1580 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1583 2007-12-03 Leo Zayas
1584 Pedro Alves <pedro_alves@portugalmail.pt>
1586 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1588 (child_add_thread): Minor cleanup.
1589 (child_continue): Resume artificially suspended threads before
1590 calling ContinueDebugEvent.
1591 (suspend_one_thread): New.
1592 (fake_breakpoint_event): New.
1593 (get_child_debug_event): Change return type to int. Check here if
1594 gdb sent an interrupt request. If a soft interrupt was requested,
1595 fake a breakpoint event. Return 0 if there is no event to handle,
1597 (win32_wait): Don't check here if gdb sent an interrupt request.
1598 Ensure there is a valid event to handle.
1599 (win32_request_interrupt): Add soft interruption method as last
1602 2007-12-03 Leo Zayas
1603 Pedro Alves <pedro_alves@portugalmail.pt>
1605 * win32-low.h (win32_thread_info): Add descriptions to the
1606 structure members. Replace `suspend_count' counter by a
1608 * win32-low.c (thread_rec): Update condition of when to get the
1609 context from the inferior. Rely on ContextFlags being set if it
1610 has already been retrieved. Only suspend the inferior thread if
1611 we haven't already. Warn if that fails.
1612 (continue_one_thread): s/suspend_count/suspended/. Only call
1613 ResumeThread once. Warn if that fails.
1615 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1617 * win32-low.c (win32_wait): Don't read from the inferior when it
1620 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1622 * Makefile.in (win32_low_h): New variable.
1623 (win32-low.o): Add dependency on $(win32_low_h).
1624 (win32-arm-low.o, win32-i386-low.o): New rules.
1626 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1628 * hostio.c: Correct copyright year.
1630 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1632 * Makefile.in (OBS): Add hostio.o.
1633 (hostio.o): New rule.
1634 * server.h (handle_vFile): Declare.
1635 * hostio.c: New file.
1636 * server.c (handle_v_requests): Take packet_len and new_packet_len
1637 for binary packets. Call handle_vFile.
1638 (main): Update call to handle_v_requests.
1640 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1642 * linux-low.c: Include <sched.h>.
1644 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1646 * linux-low.c (linux_tracefork_grandchild): New.
1647 (linux_tracefork_child): Use clone.
1648 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1650 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1652 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1654 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1656 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1658 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1660 * inferiors.c (change_inferior_id): Delete.
1661 (add_pid_to_list, pull_pid_from_list): New.
1662 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1663 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1664 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1665 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1666 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1667 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1668 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1669 (using_threads): Always set to 1.
1670 (handle_extended_wait): New.
1671 (add_process): Do not set TID.
1672 (linux_create_inferior): Set must_set_ptrace_flags.
1673 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1674 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1675 (linux_thread_alive): Rename TID argument to LWPID.
1676 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1677 (linux_wait_for_event): Do not use TID or check using_threads. Update
1678 call to dead_thread_notify. Call handle_extended_wait.
1679 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1680 (send_sigstop): Delete sigstop_sent.
1681 (wait_for_sigstop): Avoid TID.
1682 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1683 (linux_test_for_tracefork): New.
1684 (linux_lookup_signals): Use thread_db_active and
1685 linux_supports_tracefork_flag.
1686 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1687 * linux-low.h (get_process_thread): Avoid TID.
1688 (struct process_ifo): Move thread_known and tid to the end. Remove
1690 (linux_attach_lwp, thread_db_init): Update prototypes.
1691 * server.h (change_inferior_id): Delete prototype.
1692 (add_pid_to_list, pull_pid_from_list): New prototypes.
1693 * thread-db.c (thread_db_use_events): New.
1694 (find_first_thread): Rename to...
1695 (find_one_thread): ...this. Update callers and messages. Do not
1696 call fatal. Check thread_db_use_events. Do not call
1697 change_inferior_id or new_thread_notify.
1698 (maybe_attach_thread): Update. Do not call new_thread_notify.
1699 (thread_db_init): Set thread_db_use_events. Check use_events.
1700 * utils.c (fatal, warning): Correct message prefix.
1702 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1704 * Makefile.in (clean): Remove new files.
1705 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1706 (powerpc-64.o, powerpc-64.c): New rules.
1707 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1708 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1710 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1712 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1713 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1714 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1715 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1716 (target_regsets): Add AltiVec and SPE register sets.
1717 * configure.ac: Check for AltiVec and SPE.
1718 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1719 (ppc_fill_vrregset, ppc_store_vrregset): New.
1720 (target_regsets): Add AltiVec register set.
1721 * configure: Regenerated.
1723 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1725 * linux-low.c (O_LARGEFILE): Define.
1726 (linux_read_memory): Use /proc/PID/mem.
1727 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1728 * configure, config.in: Regenerated.
1730 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1732 * linux-low.c (linux_wait_for_event): Do not pass signals while
1735 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1737 * win32-low.c (create_process): New.
1738 (win32_create_inferior): Use create_process instead of
1739 CreateProcess. If create_process failed retry appending an ".exe"
1740 suffix. Store the GetLastError result immediatelly after
1741 create_process calls and use it on the call to error.
1743 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1745 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1747 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1749 * configure.ac: Switch license to GPLv3.
1751 2007-08-01 Michael Snyder <msnyder@access-company.com>
1753 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1755 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1757 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1759 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1760 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1761 CloseToolhelp32Snapshot.
1762 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1763 CloseToolhelp32Snapshot.
1765 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1767 * server.c (main): Check for inferior exit before main loop.
1769 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1771 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1772 instead of on tmp_desc.
1774 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1775 Daniel Jacobowitz <dan@codesourcery.com>
1777 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1778 (add_thread): Minor cleanups.
1779 (clear_inferiors): Move lower in the file. Clear the DLL
1781 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1782 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1783 (xml_escape_text): New.
1784 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1786 (handle_v_cont): Report errors.
1787 (gdbserver_version): Update.
1788 (main): Correct size of own_buf. Do not report initial DLL events.
1789 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1790 (unloaded_dll, xml_escape_text): New.
1791 * win32-low.c (enum target_waitkind): Update comments.
1792 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1793 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1794 (win32_EnumProcessModules, win32_GetModuleInformation)
1795 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1796 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1797 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1798 (win32_Module32First, win32_Module32Next, load_toolhelp)
1799 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1800 (get_child_debug_event): Handle DLL events.
1801 (win32_wait): Likewise.
1803 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1805 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1806 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1808 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1810 * win32-low.c (handle_output_debug_string): Ignore event if not
1813 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1815 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1817 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1819 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1821 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1823 * inferiors.c (change_inferior_id): Add comment.
1824 * linux-low.c (check_removed_breakpoint): Add an early
1825 prototype. Improve debug output.
1826 (linux_attach): Doc update.
1827 (linux_detach_one_process, linux_detach): Clean up before releasing
1829 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1830 * linux-low.h (struct process_info): Doc improvement.
1831 * mem-break.c (delete_all_breakpoints): New.
1832 * mem-break.h (delete_all_breakpoints): New prototype.
1833 * thread-db.c (find_first_thread): New.
1834 (thread_db_create_event): Call it instead of
1835 thread_db_find_new_threads. Clean up unused variables.
1836 (maybe_attach_thread): Remove first thread handling.
1837 (thread_db_find_new_threads): Use find_first_thread.
1838 (thread_db_get_tls_address): Likewise.
1840 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1842 * thread-db.c (thread_db_find_new_threads): Add prototype.
1843 (thread_db_create_event): Check for the main thread before adding
1845 (maybe_attach_thread): Only enable event reporting if TID == 0.
1846 (thread_db_get_tls_address): Check for new threads.
1848 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1850 * linux-low.c (linux_create_inferior): Try execv before execvp.
1851 * spu-low.c (spu_create_inferior): Likewise.
1853 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1855 * linux-low.c (linux_create_inferior): Change execv to execvp.
1856 * spu-low.c (spu_create_inferior): Likewies.
1858 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1860 * Makefile.in (clean): Clean new files instead of deleted ones.
1861 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1862 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1864 * configure.srv: Specify XML files and new regformats for MIPS and
1866 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1867 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1868 an entry for the restart register.
1869 (mips_cannot_fetch_register, mips_cannot_store_register)
1870 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1871 register names to match the XML descriptions.
1872 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1873 restart register instead of $0.
1875 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1876 Markus Deuling <deuling@de.ibm.com>
1878 * remote-utils.c (decode_xfer_write): New function.
1879 * server.h (decode_xfer_write): Add prototype.
1880 * server.c (handle_query): Add PACKET_LEN argument. Support
1881 qXfer:spu:read and qXfer:spu:write packets.
1882 (main): Pass packet_len to handle_query.
1883 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1884 * target.h (target_ops): Add qxfer_spu.
1886 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1888 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1889 accessing non-seekable spufs files.
1891 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1893 * server.c (handle_query): Add reply for qC packet.
1895 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1896 Leo Zayas <lerele@champenstudios@com>
1898 * server.h (check_remote_input_interrupt_request): New function.
1899 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1900 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1901 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1902 (check_remote_input_interrupt_request): New function.
1903 * server.h (check_remote_input_interrupt_request): Declare.
1904 * win32-low.c (winapi_DebugBreakProcess,
1905 winapi_GenerateConsoleCtrlEvent): New typedefs.
1906 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1908 (win32_wait): Check for remote interrupt request
1909 with check_remote_input_interrupt_request.
1910 (win32_request_interrupt): New function.
1911 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1913 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1915 * win32-low.c (debug_registers_changed,
1916 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1917 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1918 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1919 (thread_rec): Get context using the low target.
1920 (child_add_thread): Call thread_added on the low target,
1921 which does the same thing.
1923 (do_initial_child_stuff): Remove debug registers references.
1924 Set context using the low target. Resume threads after
1925 setting the contexts.
1926 (child_continue): Remove dead variable. Remove debug
1927 registers references.
1928 (child_fetch_inferior_registers): Go through the low target.
1929 (do_child_store_inferior_registers): Remove.
1930 (child_store_inferior_registers): Go through the low target.
1931 (win32_resume): Remove debug registers references.
1932 Set context using the low target.
1933 (handle_exception): Change return type to void. Don't record
1934 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1935 first chance exception.
1936 (get_child_debug_event): Change return type to void. Remove
1937 goto loop. Always return after waiting for debug event.
1938 (win32_wait): Convert to switch statement. Handle spurious
1941 * win32-i386-low.c (debug_registers_changed,
1942 debug_registers_used): New.
1943 (initial_stuff): Rename to ...
1944 (i386_initial_stuff): ... this. Clear debug registers
1946 (store_debug_registers): Delete.
1947 (i386_get_thread_context): New.
1948 (load_debug_registers): Delete.
1949 (i386_set_thread_context): New.
1950 (i386_thread_added): New.
1951 (single_step): Rename to ...
1952 (i386_single_step): ... this.
1953 (do_fetch_inferior_registers): Rename to ...
1954 (i386_fetch_inferior_register): ... this.
1955 (i386_store_inferior_register): New.
1956 (the_low_target): Adapt to new interface.
1958 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1959 (arm_get_thread_context): New.
1960 (arm_set_thread_context): New.
1962 (do_fetch_inferior_registers): Rename to ...
1963 (arm_fetch_inferior_register): ... this.
1964 (arm_store_inferior_register): New.
1965 (arm_wince_breakpoint): Reimplement as unsigned long.
1966 (arm_wince_breakpoint_len): Define.
1967 (the_low_target): Adapt to new interface.
1969 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1970 load_debug_registers. Add get_thread_context, set_thread_context,
1971 thread_added and store_inferior_register. Rename
1972 fetch_inferior_registers to fetch_inferior_register.
1973 (regptr): Remove declaration.
1975 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1977 * linux-low.c (linux_detach): Change return type to int. Return 0.
1978 * spu-low.c (spu_detach): Likewise.
1980 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1982 * target.h (target_ops): Change return type of detach to int.
1984 (join_inferior): New.
1985 * server.c (main): Don't skip detach support on mingw32.
1986 If the inferior doesn't support detaching return error.
1987 Call join_inferior instead of using waitpid.
1988 * linux-low.c (linux_join): New.
1989 (linux_target_op): Add linux_join.
1990 * spu-low.c (spu_join): New.
1991 (spu_target_ops): Add spu_join.
1992 * win32-low.c (win32_detach): Adapt to new interface.
1993 Reopen current_process_handle before detaching. Issue a child
1994 resume before detaching.
1996 (win32_target_op): Add win32_join.
1998 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2000 * win32-low.c (win32-attach): Fix return value.
2001 * target.h (target_ops): Describe ATTACH return values.
2003 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2005 * win32-low.c (GETPROCADDRESS): Define.
2006 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2007 (winapi_DebugSetProcessKillOnExit): Likewise.
2008 (win32_create_inferior): Force usage of ansi CreateProcessA.
2009 (win32_attach): Use GETPROCADDRESS.
2010 (win32_detach): Likewise.
2012 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2014 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2016 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2018 * win32-low.c: Commit leftover changes from 2007-03-29.
2020 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2022 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2023 fields short instead of int. Add explicit padding.
2024 (i387_cache_to_fsave): Remove unnecessary casts.
2025 (i387_fsave_to_cache): Doc fix.
2026 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2028 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2030 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2031 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2033 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2035 * configure.srv (arm*-*-mingw32ce*): Move near the other
2038 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2040 * configure.ac: Add errno checking.
2041 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2042 sys/file.h and malloc.h.
2043 (AC_CHECK_DECLS): Add perror.
2044 (srv_mingwce): Handle.
2045 * configure.srv (i[34567]86-*-cygwin*): Add
2046 win32-i386-low.o to srv_tgtobj.
2047 (i[34567]86-*-mingw*): Likewise.
2048 (arm*-*-mingw32ce*): Add case.
2049 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2050 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2051 [__MINGW32CE__] (strerror): New function.
2052 [__MINGW32CE__] (errno): Define to GetLastError.
2053 [__MINGW32CE__] (COUNTOF): New macro.
2054 (remote_open): Remove extra close call.
2055 * mem-break.c (delete_breakpoint_at): New function.
2056 * mem-break.h (delete_breakpoint_at): Declare.
2057 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2058 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2059 [USE_WIN32API] (read, write): Add char* casts.
2060 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2061 * server.h: Include wincecompat.h on Windows CE.
2062 [HAVE_ERRNO_H]: Check.
2063 (perror): Declare if not declared.
2064 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2065 (perror_with_name): Remove errno declaration.
2066 * wincecompat.h: New.
2067 * wincecompat.c: New.
2069 * win32-arm-low.c: New.
2070 * win32-i386-low.c: New.
2071 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2072 (OUTMSG2): Make it safe.
2074 (COUNTOF): New macro.
2075 (NUM_REGS): Get it from the low target.
2076 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2077 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2078 (thread_rec): Let low target handle debug registers.
2079 (child_add_thread): Likewise.
2080 (child_init_thread_list): Likewise.
2081 (continue_one_thread): Likewise.
2083 (do_child_fetch_inferior_registers): Move to ...
2084 * win32-i386-low.c: ... here, and rename to ...
2085 (do_fetch_inferior_registers): ... this.
2086 * win32-low.c (child_fetch_inferior_registers):
2087 Go through the low target.
2088 (do_child_store_inferior_registers): Use regptr.
2089 (strwinerror): New function.
2090 (win32_create_inferior): Handle Windows CE.
2091 Use strwinerror instead of strerror on Windows error
2092 codes. Add program to the error output.
2093 Don't close the main thread handle on Windows CE.
2094 (win32_attach): Use coredll.dll on Windows CE.
2095 (win32_kill): Close current process and current
2097 (win32_detach): Use coredll.dll on Windows CE.
2098 (win32_resume): Let low target handle debug registers, and
2100 (handle_exception): Add/Remove initial breakpoint. Avoid
2101 non-existant WSTOPSIG on Windows CE.
2102 (win32_read_inferior_memory): Cast to remove warning.
2103 (win32_arch_string): Go through the low target.
2104 (initialize_low): Call set_breakpoint_data with the low
2105 target's breakpoint.
2106 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2107 FOP_REGNUM, mappings): Move to ...
2108 * win32-i386-low.c: ... here.
2109 * win32-low.c (win32_thread_info): Move to ...
2110 * win32-low.h: ... here.
2111 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2112 win32-arm-low.c and wincecompat.c.
2113 (all:): Add $EXEEXT.
2114 (install-only:): Likewise.
2115 (gdbserver:): Likewise.
2116 (gdbreplay:): Likewise.
2117 * config.in: Regenerate.
2118 * configure: Regenerate.
2120 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2122 * win32-low.c: Rename typedef thread_info to
2123 win32_thread_info throughout.
2125 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2127 * win32-i386-low.c: Rename to ...
2128 * win32-low.c: ... this.
2129 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2130 * Makefile.in: Likewise.
2132 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2134 * remote-utils.c (monitor_output): Constify msg parameter.
2135 * server.h (monitor_output): Likewise.
2136 * win32-i386-low.c (handle_output_debug_string): New.
2137 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2138 handle_output_debug_string.
2139 (get_child_debug_event): Likewise.
2141 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2143 * server.c (main): Correct strtoul check.
2145 2007-03-27 Jon Ringle <jon@ringle.org>
2147 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2149 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2151 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2153 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2155 * terminal.h: Check HAVE_SGTTY_H.
2157 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2159 * remote-utils.c (remote_open): Print out the assigned port number.
2161 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2163 * remote-utils.c (monitor_output): New function.
2164 * server.c (debug_threads): Define here.
2165 (monitor_show_help): New function.
2166 (handle_query): Handle qRcmd.
2167 (main): Do not handle 'd' packet.
2168 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2169 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2172 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2174 * Makefile.in (EXEEXT): New.
2175 (clean): Use $(EXEEXT).
2177 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2179 * target.h (target_ops): Rename send_signal to request_interrupt,
2180 and remove enum target_signal parameter.
2181 * linux-low.c (linux_request_interrupt): Rename from
2182 linux_send_signal, and always send SIGINT.
2183 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2184 and always send SIGINT.
2185 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2187 (input_interrupt): Likewise.
2189 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2191 * server.c (get_features_xml): Check if target implemented
2193 * win32-i386-low.c (win32_arch_string): New.
2194 (win32_target_ops): Add win32_arch_string as arch_string member.
2196 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2198 * spu-low.c (spu_arch_string): New.
2199 (spu_target_ops): Add spu_arch_string.
2201 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2203 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2204 * configure.ac: Do not check for terminal.h.
2205 * configure, config.in: Regenerated.
2207 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2209 * Makefile.in (OBS): Add $(XML_BUILTIN).
2210 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2212 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2213 (arm-with-iwmmxt.c): New.
2214 * config.in, configure: Regenerate.
2215 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2216 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2217 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2218 (arm*-*-linux*): Add iWMMXt and regset support.
2219 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2220 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2221 (arm_store_wmmxregset, target_regsets): New.
2222 * server.c (get_features_xml): Take annex argument. Check builtin
2224 (handle_query): Handle multiple annexes.
2226 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2228 * remote-utils.c [USE_WIN32API] (read, write): Define.
2229 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2232 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2234 * linux-i386-low.c (the_low_target): Set arch_string.
2235 * linux-x86-64-low.c (the_low_target): Likewise.
2236 * linux-low.c (linux_arch_string): New.
2237 (linux_target_ops): Add it.
2238 * linux-low.h (struct linux_target_ops): Add arch_string.
2239 * server.c (write_qxfer_response): Use const void * for DATA.
2240 (get_features_xml): New.
2241 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2242 * target.h (struct target_ops): Add arch_string method.
2244 2007-01-03 Denis Pilat <denis.pilat@st.com>
2245 Daniel Jacobowitz <dan@codesourcery.com>
2247 * linux-low.c (linux_kill): Handle being called with no threads.
2248 * win32-i386-low.c (win32_kill): Likewise.
2249 (get_child_debug_event): Clear current_process_handle.
2251 2006-12-30 Denis PILAT <denis.pilat@st.com>
2252 Daniel Jacobowitz <dan@codesourcery.com>
2254 * remote-utils.c (remote_open): Check the type of specified
2255 serial port devices before opening them.
2256 * server.c (main): Kill the inferior if an error occurs during
2257 the first remote_open.
2259 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2261 * README: Update supported targets.
2263 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2265 * Makefile.in (clean): Remove reg-mips64.c.
2266 (reg-mips64.c, reg-mips64.o): New rules.
2267 * configure.srv: Handle mips64. Include regset support for mips.
2268 * linux-mips-low.c (union mips_register): New.
2269 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2270 (mips_breakpoint, mips_breakpoint_at): Use int.
2271 (mips_collect_register, mips_supply_register)
2272 (mips_collect_register_32bit, mips_supply_register_32bit)
2273 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2274 (mips_store_fpregset, target_regsets): New.
2275 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2277 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2279 * configure.srv: Add target "spu*-*-*".
2280 * Makefile.in (clean): Remove reg-spu.c.
2281 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2282 * spu-low.c: New file.
2284 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2286 * configure.ac: Correct td_thr_tls_get_addr test.
2287 * configure: Regenerated.
2289 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2291 * linux-low.c (linux_wait_for_event): Reformat. Use the
2293 * remote-utils.c (decode_address_to_semicolon): New.
2294 * server.c (pass_signals, handle_general_set): New.
2295 (handle_query): Mention QPassSignals for qSupported.
2296 (main): Call handle_general_set.
2297 * server.h (pass_signals, decode_address_to_semicolon): New.
2299 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2301 * server.c (handle_query): Correct error handling for read_auxv.
2303 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2305 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2306 and srv_linux_thread_db to yes.
2307 * linux-s390-low.c (s390_fill_gregset): New function.
2308 (target_regsets): Define data structure.
2310 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2312 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2313 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2314 * config.in, configure: Regenerated.
2315 * inferiors.c (gdb_id_to_thread): New function.
2316 (gdb_id_to_thread_id): Use it.
2317 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2318 * linux-low.h (struct process_info): Add th member.
2319 (thread_db_get_tls_address): New prototype.
2320 * remote-utils.c (decode_address): Make non-static.
2321 * server.c (handle_query): Handle qGetTLSAddr.
2322 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2323 * target.h (struct target_ops): Add get_tls_address.
2324 * thread-db.c (maybe_attach_thread): Save the thread handle.
2325 (thread_db_get_tls_address): New.
2327 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2329 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2330 (linux_resume_one_process): Take a siginfo_t *. Update all
2331 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2332 (struct pending_signals): Add a siginfo_t.
2333 (linux_wait_for_process): Always set last_status.
2334 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2335 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2336 * linux-low.h (struct process_info): Add last_status.
2338 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2340 * remote-utils.c (try_rle): New function.
2341 (putpkt_binary): Use it.
2343 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2345 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2346 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2347 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2348 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2349 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2352 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2354 * server.c (terminal_fd): New variable.
2355 (old_foreground_pgrp): Likewise.
2356 (restore_old_foreground_pgrp): New function.
2357 (start_inferior): Record the terminal file descriptor in terminal_fd
2358 and its original foreground group in old_foreground_pgrp. Register
2359 restore_old_foreground_pgrp with atexit().
2361 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2363 * server.c (handle_query): Correct qPart to qXfer.
2365 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2367 * configure.ac: Check for more headers which are missing on
2368 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2369 * configure.srv: Add Cygwin and mingw32.
2370 * remote-utils.c: Don't include headers unconditionally which
2371 are missing on mingw32. Include <winsock.h> for mingw32.
2372 (remote_open): Adjust for mingw32 support. Flush
2373 standard error after writing to it.
2374 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2375 (unblock_async_io, enable_async_io, disable_async_io)
2376 (readchar, getpkt): Update for Winsock support.
2377 (prepare_resume_reply): Expect a protocol signal number.
2378 * server.c: Disable <sys/wait.h> on mingw32.
2379 (start_inferior): Adjust for mingw32 support. Flush
2380 standard error after writing to it.
2381 (attach_inferior): Likewise. Use protocol signal
2383 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2385 * win32-i386-low.c: New file.
2386 * Makefile.in (XM_CLIBS): Set.
2387 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2388 (win32-i386-low.o): New dependency rule.
2389 * linux-low.c (linux_wait): Use target signal numbers.
2390 * target.h (struct target_ops): Doc fix.
2391 * server.h (target_signal_to_name): New prototype.
2392 * gdbreplay.c: Don't include headers unconditionally which
2393 are missing on mingw32. Include <winsock.h> for mingw32.
2394 (remote_close, remote_open): Adjust for Winsock support.
2395 * configure, config.in: Regenerated.
2397 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2399 * server.c (decode_xfer_read, write_qxfer_response): New.
2400 (handle_query): Take a packet length argument. Handle
2401 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2402 the qSupported response.
2403 (main): Update call to handle_query.
2405 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2407 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2408 (putpkt_binary): Renamed from putpkt and adjusted for binary
2410 (putpkt): New wrapper for putpkt_binary.
2411 (readchar): Don't mask off the high bit.
2412 (decode_X_packet): New function.
2413 * server.c (main): Call putpkt_binary if a handler sets the packet
2414 length. Save the length of the incoming packet. Handle 'X'.
2415 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2417 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2419 * server.c (handle_query): Handle qSupported.
2421 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2423 * remote-utils.c (all_symbols_looked_up): New variable.
2424 (look_up_one_symbol): Check it.
2425 * server.h (look_up_one_symbol): New declaration.
2426 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2428 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2430 * Makefile.in (linux-arm-low.o): Update dependencies.
2431 * linux-arm-low.c: Include "gdb_proc_service.h".
2432 (PTRACE_GET_THREAD_AREA): Define.
2433 (ps_get_thread_area): New function.
2435 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2437 * configure.srv (m68k*-*-uclinux*): New target.
2438 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2439 (linux_resume_one_process): Remove extraneous cast.
2440 (linux_read_offsets): New.
2441 (linux_target_op): Add linux_read_offsets on mmuless systems.
2442 * server.c (handle_query): Add qOffsets logic.
2443 * target.h (struct target_ops): Add read_offsets.
2445 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2447 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2448 (PTRACE_GET_THREAD_AREA): Define.
2449 (ps_get_thread_area): New function.
2450 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2451 (linux-x86-64-low.o): Update.
2453 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2455 * configure.ac: Remove checks for prfpregset_t.
2456 * gdb_proc_service.h: New file.
2457 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2458 new "gdb_proc_service.h".
2459 * proc-service.c: Likewise.
2460 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2461 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2462 * Makefile.in (gdb_proc_service_h): Updated.
2463 * configure, config.in: Regenerated.
2465 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2467 * remote-utils.c (prepare_resume_reply): Move declaration
2468 of gdb_id_from_wait to the top of the block.
2470 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2472 * linux-low.c (regsets_store_inferior_registers): Read the regset
2473 from the target before filling it.
2475 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2477 * server.c (attach_inferior): Return SIGTRAP for a successful
2480 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2482 * Makefile.in (OBS): Add version.o.
2483 (STAGESTUFF): Delete.
2484 (version.o): Add dependencies.
2485 (version.c): Replace rule.
2486 (clean): Remove version.c.
2487 * server.c (gdbserver_version): New.
2488 (gdbserver_usage): Use printf.
2489 (main): Handle --version and --help.
2490 * server.h (version, host_name): Add declarations.
2492 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2504 * linux-x86-64-low.c:
2507 * linux-ppc64-low.c:
2516 * linux-crisv32-low.c:
2528 * gdbserver.1: Add (C) after Copyright. Update the FSF
2531 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2533 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2534 (arm_breakpoint_at): Recognize both breakpoints.
2535 (the_low_target): Use the correct breakpoint instruction.
2537 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2539 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2540 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2541 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2542 (the_low_target): Update.
2544 2005-10-25 Andreas Schwab <schwab@suse.de>
2546 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2548 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2549 (ia64_num_regs): Reduce to 462.
2551 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2553 * acinclude.m4: Correct quoting.
2554 * aclocal.m4: Regenerated.
2556 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2557 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2558 (thread_db_init): Call thread_db_err_str.
2559 * configure.ac: Check for TD_VERSION.
2560 * config.in, configure: Regenerated.
2562 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2564 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2566 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2568 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2569 is not available. Define HAVE_PTRACE_GETREGS if it is.
2570 * config.in, configure: Regenerated.
2571 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2572 * linux-i386-low.c, linux-m68k-low.c: Update to use
2573 HAVE_PTRACE_GETREGS.
2574 * linux-low.c (regsets_fetch_inferior_registers)
2575 (regsets_store_inferior_registers): Only return 0 if we processed
2577 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2578 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2580 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2582 * inferiors.c (struct thread_info): Add gdb_id.
2583 (add_thread): Add gdb_id argument.
2584 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2585 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2586 calls to add_thread.
2587 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2588 * server.c (handle_query): Use thread_to_gdb_id.
2589 (handle_v_cont, main): Use gdb_id_to_thread_id.
2590 * server.h (add_thread): Update prototype.
2591 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2594 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2596 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2597 left-padded registers.
2598 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2599 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2601 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2603 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2604 * configure: Regenerate.
2605 * config.in: Regenerate.
2606 * server.h (NEED_DECLARATION_STRERROR):
2607 Replace with !HAVE_DECL_STRERROR.
2609 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2611 * linux-low.c (linux_wait, linux_send_signal): Don't test
2612 an unsigned long variable for > 0 if it could be MAX_ULONG.
2613 * server.c (myresume): Likewise.
2614 * target.c (set_desired_inferior): Likewise.
2616 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2618 * configure.ac: Simplify and improve check for socklen_t.
2619 * configure, config.in: Regenerate.
2621 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2623 * acconfig.h: Remove.
2624 * configure.ac: Add a test for socklen_t. Use three-argument
2625 AC_DEFINE throughout.
2626 * config.in: Regenerated using autoheader 2.59.
2627 * configure: Regenerated.
2629 * gdbreplay.c (socklen_t): Provide a default.
2630 (remote_open): Use socklen_t.
2631 * remote-utils.c (socklen_t): Provide a default.
2632 (remote_open): Use socklen_t.
2633 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2636 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2638 * linux-low.c (linux_read_memory, linux_write_memory)
2639 (linux_read_auxv): Likewise.
2640 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2641 (check_mem_write): Likewise.
2642 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2644 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2645 (registers_from_string, register_data): Likewise.
2646 * server.c (handle_query, main): Likewise.
2647 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2648 (decode_M_packet): Likewise.
2649 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2650 * target.h (struct target_ops): Update read_memory, write_memory,
2652 (read_inferior_memory, write_inferior_memory): Update.
2653 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2655 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2656 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2657 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2658 linux-s390-low.c, linux-sh-low.c: Update for changes in
2659 read_inferior_memory and the_low_target->breakpoint.
2661 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2663 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2664 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2665 * configure.srv: Add powerpc64-*-linux*.
2666 * linux-ppc64-low.c: New file.
2668 2005-05-23 Orjan Friberg <orjanf@axis.com>
2670 * linux-cris-low.c: New file with support for CRIS.
2671 * linux-crisv32-low.c: Ditto for CRISv32.
2672 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2673 (clean): Add reg-cris.c and reg-crisv32.c.
2674 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2675 reg-crisv32.o, and reg-crisv32.c to make rules.
2676 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2679 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2681 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2682 of sizeof (PTRACE_XFER_TYPE).
2683 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2685 2005-05-12 Orjan Friberg <orjanf@axis.com>
2687 * target.h (struct target_ops): Add insert_watchpoint,
2688 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2689 pointers for hardware watchpoint support.
2690 * linux-low.h (struct linux_target_ops): Ditto.
2691 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2692 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2693 to linux_target_ops.
2694 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2696 * server.c (main): Recognize 'Z' and 'z' packets.
2698 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2700 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2701 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2702 (the_low_target): Add new members.
2704 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2706 * proc-service.c (ps_lgetregs): Search all_processes instead of
2709 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2711 * server.c (start_inferior): Change return type to int.
2712 (attach_inferior): Change sigptr to int *.
2713 (handle_v_cont, handle_v_requests): Change signal to int *.
2714 (main): Change signal to int.
2716 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2718 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2719 * configure.srv: Add m32r*-*-linux*.
2720 * linux-m32r-low.c: New file.
2722 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2724 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2726 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2728 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2729 Take unsigned long arguments for PIDs.
2730 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2731 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2732 (wait_for_sigstop, linux_resume_one_process)
2733 (regsets_fetch_inferior_registers, linux_send_signal)
2734 (linux_read_auxv): Likewise. Update the types of variables holding
2735 PIDs. Update format string specifiers.
2736 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2737 * remote-utils.c (prepare_resume_reply): Likewise.
2738 * server.c (cont_thread, general_thread, step_thread)
2739 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2741 (handle_query): Update format specifiers.
2742 (handle_v_cont, main): Use strtoul for thread IDs.
2743 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2744 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2745 (general_thread, step_thread, thread_from_wait)
2746 (old_thread_from_wait): Update.
2747 * target.h (struct thread_resume): Use unsigned long for THREAD.
2748 (struct target_ops): Use unsigned long for arguments to attach and
2751 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2753 * acinclude.m4: Include bfd/bfd.m4 directly.
2754 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2755 <agriffis@toolchain.org>.
2756 * aclocal.m4, configure: Regenerated.
2758 2005-01-07 Andrew Cagney <cagney@gnu.org>
2760 * configure.ac: Rename configure.in, require autoconf 2.59.
2761 * configure: Re-generate.
2763 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2765 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2767 * aclocal.m4: Regenerated.
2768 * configure: Regenerated.
2770 2004-11-21 Andreas Schwab <schwab@suse.de>
2772 * linux-m68k-low.c (m68k_num_gregs): Define.
2773 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2774 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2775 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2776 (m68k_breakpoint_at): New. Add to the_low_target.
2778 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2779 srv_linux_thread_db to yes.
2781 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2783 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2784 (ARCH_SET_FS): Likewise.
2785 (ARCH_GET_FS): Likewise.
2786 (ARCH_GET_GS): Likewise.
2788 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2790 * linux-i386-low.c (ps_get_thread_area): New.
2791 * linux-x86-64-low.c (ps_get_thread_area): New.
2792 * linux-low.c: Include <sys/syscall.h>.
2793 (linux_kill_one_process): Don't kill the first thread here.
2794 (linux_kill): Kill the first thread here.
2795 (kill_lwp): New function.
2796 (send_sigstop, linux_send_signal): Use it.
2797 * proc-service.c: Clean up #ifdefs.
2798 (fpregset_info): Delete.
2799 (ps_lgetregs): Update and enable implementation.
2800 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2802 * remote-utils.c (struct sym_cache, symbol_cache): New.
2803 (input_interrupt): Print a clearer message.
2804 (async_io_enabled): New variable.
2805 (enable_async_io, disable_async_io): Use it. Update comments.
2806 (look_up_one_symbol): Use the symbol cache.
2807 * thread-db.c (thread_db_look_up_symbols): New function.
2808 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2810 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2812 * configure.in: Test for -rdynamic.
2813 * configure: Regenerated.
2814 * Makefile (INTERNAL_LDFLAGS): New.
2815 (gdbserver, gdbreplay): Use it.
2817 2004-09-02 Andrew Cagney <cagney@gnu.org>
2819 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2821 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2823 * linux-low.c (linux_wait): Clear all_processes list also.
2825 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2827 * linux-low.c: Include <errno.h>. Remove extern declaration of
2830 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2832 * gdbreplay.c, server.h, utils.c: Update copyright years.
2834 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2836 * server.c (main): Print child status or termination signal from
2837 variable 'signal', not 'sig'.
2839 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2841 * linux-low.c (linux_read_memory): Change return type to
2842 int. Check for and return error from ptrace().
2843 * target.c (read_inferior_memory): Change return type to int. Pass
2844 back return status from the_target->read_memory().
2845 * target.h (struct target_ops): Adapt *read_memory() prototype.
2847 (read_inferior_memory): Adapt prototype.
2848 * server.c (main): Return an error packet if
2849 read_inferior_memory() returns an error.
2851 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2853 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2854 Unify with other clean targets.
2856 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2858 * server.c (handle_v_cont): Call set_desired_inferior.
2860 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2862 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2864 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2866 * linux-low.c (linux_wait): Unblock async I/O.
2867 (linux_resume): Block and enable async I/O.
2868 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2869 * server.h (block_async_io, unblock_async_io): Add prototypes.
2871 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2873 * remote-utils.c (remote_open): Print a status notice after
2875 * server.c (attach_inferior): Print a status notice after
2878 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2880 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2882 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2884 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2886 * server.c, target.h: Update copyright years.
2888 2004-02-25 Roland McGrath <roland@redhat.com>
2890 * target.h (struct target_ops): New member `read_auxv'.
2891 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2892 * linux-low.c (linux_read_auxv): New function.
2893 (linux_target_ops): Initialize `read_auxv' member to that.
2895 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2897 Committed by Jim Blandy <jimb@redhat.com>.
2899 * linux-s390-low.c (s390_num_regs): Update.
2900 (s390_regmap): Remove control registers. Use __s390x__ predefine
2901 instead of GPR_SIZE to distiguish s390 and s390x targets.
2903 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2905 * linux-low.c: Update copyright year.
2906 (check_removed_breakpoint): Clear pending_is_breakpoint.
2907 (linux_set_resume_request, linux_queue_one_thread)
2908 (resume_status_pending_p): New functions.
2909 (linux_continue_one_thread): Use process->resume.
2910 (linux_resume): Only resume threads if there are no pending events.
2911 * linux-low.h (struct process_info): Add resume request
2914 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2916 * regcache.c (new_register_cache): Clear the allocated register
2917 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2919 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2921 * linux-low.c (linux_resume): Take a struct thread_resume *
2923 (linux_wait): Update call.
2924 (resume_ptr): New static variable.
2925 (linux_continue_one_thread): Renamed from
2926 linux_continue_one_process. Use resume_ptr.
2927 (linux_resume): Use linux_continue_one_thread.
2928 * server.c (handle_v_cont, handle_v_requests): New functions.
2929 (myresume): New function.
2930 (main): Handle 'v' case.
2931 * target.h (struct thread_resume): New type.
2932 (struct target_ops): Change argument of "resume" to struct
2934 (myresume): Delete macro.
2936 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2938 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2939 (uninstall): Support DESTDIR.
2941 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2943 * configure.srv: Add xscale*linux copy of arm*linux entry.
2945 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2947 * linux-arm-low.c (arm_reinsert_addr): New function.
2948 (the_low_target): Add arm_reinsert_addr.
2950 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2952 * mem-break.c: Remove whitespace at end of file.
2954 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2956 * configure.in: Check whether we need to prototype strerror.
2957 * server.h: Optionally prototype strerror.
2958 * gdbreplay.c (perror_with_name): Use strerror.
2959 * linux-low.c (linux_attach_lwp): Use strerror.
2960 * utils.c (perror_with_name): Use strerror.
2961 * config.in, configure: Regenerated.
2963 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2965 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2966 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2968 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2970 * Makefile.in (SFILES): Update.
2971 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2972 low-sun3.c: Remove files.
2974 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2976 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2977 (linux_detach_one_process, linux_detach): New functions.
2978 (linux_target_ops): Add linux_detach.
2979 * server.c (main): Handle 'D' packet.
2980 * target.h (struct target_ops): Add "detach" member.
2981 (detach_inferior): Define.
2983 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2985 From Kelley Cook <kelleycook@wideopenwest.com>:
2986 * configure.srv: Accept i[34567]86 variants.
2988 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2990 * linux-low.c (linux_wait_for_event): Correct comment typos.
2991 (linux_resume_one_process): Call check_removed_breakpoint.
2992 (linux_send_signal): New function.
2993 (linux_target_ops): Add linux_send_signal.
2994 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2996 * target.h (struct target_ops): Add send_signal.
2998 2003-05-29 Jim Blandy <jimb@redhat.com>
3000 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3001 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3002 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3003 away part of the register's value.
3005 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3007 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3008 (linux_wait_for_event, linux_init_signals): Likewise.
3010 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
3012 * configure.in: Check for stdlib.h.
3013 * configure: Regenerated.
3014 * config.in: Regenerated.
3016 2003-01-04 Andreas Schwab <schwab@suse.de>
3018 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3020 2003-01-02 Andrew Cagney <ac131313@redhat.com>
3022 * Makefile.in: Remove obsolete code.
3024 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3026 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3027 defined(PT_FPR0_HI).
3029 2002-11-17 Stuart Hughes <seh@zee2.com>
3031 * linux-arm-low.c (arm_num_regs): Increase.
3032 (arm_regmap): Include status register.
3034 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3036 * linux-low.c (register_addr): Remove incorrect -1 check.
3038 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3040 * linux-low.c (linux_create_inferior): Call setpgid. Return
3042 (unstopped_p, linux_signal_pid): Remove.
3043 (linux_target_ops): Remove linux_signal_pid.
3044 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3045 global instead of target method.
3046 * target.h (struct target_ops): Remove signal_pid. Update comment
3047 for create_inferior.
3048 * server.c (signal_pid): New variable.
3049 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3050 gdbserver. Set the child to be the foreground process group.
3051 (attach_inferior): Set signal_pid.
3053 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3055 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3057 2002-08-20 Jim Blandy <jimb@redhat.com>
3059 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3062 2002-08-01 Andrew Cagney <cagney@redhat.com>
3064 * Makefile.in: Make chill references obsolete.
3066 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3068 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3069 * configure: Regenerate.
3070 * config.in: Regenerate.
3072 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3074 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3075 (perror_with_name, remote_close, remote_open, expect, play): Static.
3077 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3079 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3080 byte offsets instead of an array of indexes.
3081 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3083 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3085 * regcache.c: Add comment.
3087 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3089 * thread-db.c: New file.
3090 * proc-service.c: New file.
3091 * acinclude.m4: New file.
3092 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3093 proc-service.o, and thread-db.o.
3094 (linux-low.o): Add USE_THREAD_DB.
3095 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3096 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3097 * aclocal.m4: Regenerated.
3098 * config.in: Regenerated.
3099 * configure: Regenerated.
3100 * configure.in: Check for proc_service.h, sys/procfs.h,
3101 thread_db.h, and linux/elf.h headrs.
3102 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3103 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3104 Check for -lthread_db and thread support.
3105 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3106 PowerPC, and SuperH.
3107 * i387-fp.c: Constify arguments.
3108 * i387-fp.h: Likewise.
3109 * inferiors.c: (struct thread_info): Renamed from
3110 `struct inferior_info'. Remove PID member. Use generic inferior
3111 list header. All uses updated.
3112 (inferiors, signal_pid): Removed.
3113 (all_threads): New variable.
3114 (get_thread): Define.
3115 (add_inferior_to_list): New function.
3116 (for_each_inferior): New function.
3117 (change_inferior_id): New function.
3118 (add_inferior): Removed.
3119 (remove_inferior): New function.
3120 (add_thread): New function.
3121 (free_one_thread): New function.
3122 (remove_thread): New function.
3123 (clear_inferiors): Use for_each_inferior and free_one_thread.
3124 (find_inferior): New function.
3125 (find_inferior_id): New function.
3126 (inferior_target_data): Update argument type.
3127 (set_inferior_target_data): Likewise.
3128 (inferior_regcache_data): Likewise.
3129 (set_inferior_regcache_data): Likewise.
3130 * linux-low.c (linux_bp_reinsert): Remove.
3131 (all_processes, stopping_threads, using_thrads)
3132 (struct pending_signals, debug_threads, pid_of): New.
3133 (inferior_pid): Replace with macro.
3134 (struct inferior_linux_data): Remove.
3135 (get_stop_pc, add_process): New functions.
3136 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3137 Use add_process and add_thread.
3138 (linux_attach_lwp): New function, based on old linux_attach. Use
3139 add_process and add_thread. Set stop_expected for new threads.
3140 (linux_attach): New function.
3141 (linux_kill_one_process): New function.
3142 (linux_kill): Kill all LWPs.
3143 (linux_thread_alive): Use find_inferior_id.
3144 (check_removed_breakpoints, status_pending_p): New functions.
3145 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3146 Update. Use WNOHANG. Wait for cloned processes also. Update process
3147 struct for the found process.
3148 (linux_wait_for_event): New function.
3149 (linux_wait): Use it. Support LWPs.
3150 (send_sigstop, wait_for_sigstop, stop_all_processes)
3151 (linux_resume_one_process, linux_continue_one_process): New functions.
3152 (linux_resume): Support LWPs.
3153 (REGISTER_RAW_SIZE): Remove.
3154 (fetch_register): Use register_size instead. Call supply_register.
3155 (usr_store_inferior_registers): Likewise. Call collect_register.
3157 (regsets_fetch_inferior_registers): Improve error message.
3158 (regsets_store_inferior_registers): Add debugging.
3159 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3160 (unstopped_p, linux_signal_pid): New functions.
3161 (linux_target_ops): Add linux_signal_pid.
3162 (linux_init_signals): New function.
3163 (initialize_low): Call it. Initialize using_threads.
3164 * regcache.c (inferior_regcache_data): Add valid
3166 (get_regcache): Fetch registers lazily. Add fetch argument
3167 and update all callers.
3168 (regcache_invalidate_one, regcache_invalidate): New
3170 (new_register_cache): Renamed from create_register_cache.
3171 Return the new regcache.
3172 (free_register_cache): Change argument to a void *.
3173 (registers_to_string, registers_from_string): Call get_regcache
3174 with fetch flag set.
3175 (register_data): Make static. Pass fetch flag to get_regcache.
3176 (supply_register): Call get_regcache with fetch flag clear.
3177 (collect_register): Call get_regcache with fetch flag set.
3178 (collect_register_as_string): New function.
3179 * regcache.h: Update.
3180 * remote-utils.c (putpkt): Flush after debug output and use
3182 Handle input interrupts while waiting for an ACK.
3183 (input_interrupt): Use signal_pid method.
3184 (getpkt): Flush after debug output and use stderr.
3185 (outreg): Use collect_register_as_string.
3186 (new_thread_notify, dead_thread_notify): New functions.
3187 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3189 (look_up_one_symbol): Flush after debug output.
3190 * server.c (step_thread, server_waiting): New variables.
3191 (start_inferior): Don't use signal_pid. Update call to mywait.
3192 (attach_inferior): Update call to mywait.
3193 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3194 (main): Don't fetch/store registers explicitly. Use
3195 set_desired_inferior. Support proposed ``Hs'' packet. Update
3198 (struct inferior_list, struct_inferior_list_entry): New.
3199 * target.c (set_desired_inferior): New.
3200 (write_inferior_memory): Constify.
3201 (mywait): New function.
3203 (struct target_ops): New signal_pid method.
3204 (mywait): Removed macro, added prototype.
3206 * linux-low.h (regset_func): Removed.
3207 (regset_fill_func, regset_store_func): New.
3208 (enum regset_type): New.
3209 (struct regset_info): Add type field. Use new operation types.
3210 (struct linux_target_ops): stop_pc renamed to get_pc.
3211 Add decr_pc_after_break and breakpoint_at.
3212 (get_process, get_thread_proess, get_process_thread)
3213 (strut process_info, all_processes, linux_attach_lwp)
3214 (thread_db_init): New.
3216 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3217 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3218 (the_low_target): Add new members.
3219 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3220 (i386_store_fpxregset): Constify.
3221 (target_regsets): Add new kind identifier.
3222 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3223 (i386_set_pc): Add debugging.
3224 (i386_breakpoint_at): New function.
3225 (the_low_target): Add new members.
3226 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3227 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3228 (mips_breakpoint_at): New.
3229 (the_low_target): Add new members.
3230 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3231 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3232 (the_low_target): Add new members.
3233 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3234 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3235 (the_low_target): Add new members.
3236 * linux-x86-64-low.c (target_regsets): Add new kind
3239 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3241 From Martin Pool <mbp@samba.org>:
3242 * server.c (gdbserver_usage): New function.
3245 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3247 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3250 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3252 * Makefile.in: Remove obsolete code.
3254 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3256 * linux-low.c (regsets_fetch_inferior_registers),
3257 (regsets_store_inferior_registers): Removed cast to int from
3259 * regcache.h: Added declaration of struct inferior_info.
3261 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3263 * inferiors.c (struct inferior_info): Add regcache_data.
3264 (add_inferior): Call create_register_cache.
3265 (clear_inferiors): Call free_register_cache.
3266 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3267 * regcache.c (struct inferior_regcache_data): New.
3268 (registers): Remove.
3269 (get_regcache): New function.
3270 (create_register_cache, free_register_cache): New functions.
3271 (set_register_cache): Don't initialize the register cache here.
3272 (registers_to_string, registers_from_string, register_data): Call
3274 * regcache.h: Add prototypes.
3275 * server.h: Likewise.
3277 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3279 * mem-break.c: New file.
3280 * mem-break.h: New file.
3281 * Makefile.in: Add mem-break.o rule; update server.h
3283 * inferiors.c (struct inferior_info): Add target_data
3285 (clear_inferiors): Free target_data member if set.
3286 (inferior_target_data, set_inferior_target_data): New functions.
3287 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3288 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3289 * linux-low.c (linux_bp_reinsert): New variable.
3290 (struct inferior_linux_data): New.
3291 (linux_create_inferior): Use set_inferior_target_data.
3292 (linux_attach): Likewise. Call add_inferior.
3293 (linux_wait_for_one_inferior): New function.
3294 (linux_wait): Call it.
3295 (linux_write_memory): Add const.
3296 (initialize_low): Call set_breakpoint_data.
3297 * linux-low.h (struct linux_target_ops): Add breakpoint
3299 * server.c (attach_inferior): Remove extra add_inferior
3301 * server.h: Include mem-break.h. Update inferior.c
3303 * target.c (read_inferior_memory)
3304 (write_inferior_memory): New functions.
3305 * target.h (read_inferior_memory)
3306 (write_inferior_memory): Change macros to prototypes.
3307 (struct target_ops): Update comments. Add const to write_memory
3310 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3312 * linux-low.c (usr_store_inferior_registers): Support
3313 registers which are allowed to fail to store.
3314 * linux-low.h (linux_target_ops): Likewise.
3315 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3316 (ppc_cannot_store_register): FPSCR may not be storable.
3318 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3320 * server.h: Include <string.h> if HAVE_STRING_H.
3321 * ChangeLog: Correct paths in last ChangeLog entry.
3323 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3325 * linux-low.h: Remove obsolete prototypes.
3326 (struct linux_target_ops): New.
3327 (extern the_low_target): New.
3328 * linux-low.c (num_regs, regmap): Remove declarations.
3329 (register_addr): Use the_low_target explicitly.
3330 (fetch_register): Likewise.
3331 (usr_fetch_inferior_registers): Likewise.
3332 (usr_store_inferior_registers): Likewise.
3333 * linux-arm-low.c (num_regs): Remove.
3334 (arm_num_regs): Define.
3335 (arm_regmap): Renamed from regmap, made static.
3336 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3338 (arm_cannot_store_register): Renamed from cannot_store_register,
3340 (the_low_target): New.
3341 * linux-i386-low.c (num_regs): Remove.
3342 (i386_num_regs): Define.
3343 (i386_regmap): Renamed from regmap, made static.
3344 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3346 (i386_cannot_store_register): Renamed from cannot_store_register,
3348 (the_low_target): New.
3349 * linux-ia64-low.c (num_regs): Remove.
3350 (ia64_num_regs): Define.
3351 (ia64_regmap): Renamed from regmap, made static.
3352 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3354 (ia64_cannot_store_register): Renamed from cannot_store_register,
3356 (the_low_target): New.
3357 * linux-m68k-low.c (num_regs): Remove.
3358 (m68k_num_regs): Define.
3359 (m68k_regmap): Renamed from regmap, made static.
3360 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3362 (m68k_cannot_store_register): Renamed from cannot_store_register,
3364 (the_low_target): New.
3365 * linux-mips-low.c (num_regs): Remove.
3366 (mips_num_regs): Define.
3367 (mips_regmap): Renamed from regmap, made static.
3368 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3370 (mips_cannot_store_register): Renamed from cannot_store_register,
3372 (the_low_target): New.
3373 * linux-ppc-low.c (num_regs): Remove.
3374 (ppc_num_regs): Define.
3375 (ppc_regmap): Renamed from regmap, made static.
3376 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3378 (ppc_cannot_store_register): Renamed from cannot_store_register,
3380 (the_low_target): New.
3381 * linux-s390-low.c (num_regs): Remove.
3382 (s390_num_regs): Define.
3383 (s390_regmap): Renamed from regmap, made static.
3384 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3386 (s390_cannot_store_register): Renamed from cannot_store_register,
3388 (the_low_target): New.
3389 * linux-sh-low.c (num_regs): Remove.
3390 (sh_num_regs): Define.
3391 (sh_regmap): Renamed from regmap, made static.
3392 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3394 (sh_cannot_store_register): Renamed from cannot_store_register,
3396 (the_low_target): New.
3397 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3398 (the_low_target): New.
3400 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3402 * Makefile.in: Add stamp-h target.
3403 * configure.in: Create stamp-h.
3404 * configure: Regenerated.
3406 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3408 * inferiors.c: New file.
3409 * target.c: New file.
3410 * target.h: New file.
3411 * Makefile.in: Add target.o and inferiors.o. Update
3413 * linux-low.c (inferior_pid): New static variable,
3414 moved from server.c.
3415 (linux_create_inferior): Renamed from create_inferior.
3416 Call add_inferior. Return 0 on success instead of a PID.
3417 (linux_attach): Renamed from myattach.
3418 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3419 (linux_thread_alive): Renamed from mythread_alive.
3420 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3422 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3423 (regsets_store_inferior_registers): Correct error message.
3424 Add missing ``return 0''.
3425 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3426 (linux_store_registers): Renamed from store_inferior_registers.
3427 (linux_read_memory): Renamed from read_inferior_memory.
3428 (linux_write_memory): Renamed from write_inferior_memory.
3429 (linux_target_ops): New structure.
3430 (initialize_low): Call set_target_ops ().
3431 * remote-utils.c (unhexify): New function.
3432 (hexify): New function.
3433 (input_interrupt): Send signals to ``signal_pid''.
3434 * server.c (inferior_pid): Remove.
3435 (start_inferior): Update create_inferior call.
3436 (attach_inferior): Call add_inferior.
3437 (handle_query): New function.
3438 (main): Call handle_query for `q' packets.
3439 * server.h: Include "target.h". Remove obsolete prototypes.
3440 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3442 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3444 * Makefile.in: Add WARN_CFLAGS. Update configury
3446 * configure.in: Check for <string.h>
3447 * configure: Regenerate.
3448 * config.in: Regenerate.
3449 * gdbreplay.c: Include needed system headers.
3450 (remote_open): Remove strchr prototype.
3451 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3452 * regcache.c (supply_register): Change buf argument to const void *.
3453 (supply_register_by_name): Likewise.
3454 (collect_register): Change buf argument to void *.
3455 (collect_register_by_name): Likewise.
3456 * regcache.h: Add missing prototypes.
3457 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3458 * server.c (handle_query): New function.
3459 (attached): New static variable, moved out of main.
3460 (main): Quiet longjmp clobber warnings.
3461 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3462 * utils.c (error): Remove NORETURN.