1 2009-12-16 Doug Evans <dje@google.com>
3 * linux-low.c (linux_read_memory): Fix argument to read.
5 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8 events, don't leave current_inferior pointing at null.
10 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12 * win32-low.c (LOG): Delete.
13 (OUTMSG): Output to stderr.
14 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15 on compile time LOG macro.
16 (win32_wait): Fix debug output.
18 2009-11-26 Pedro Alves <pedro@codesourcery.com>
20 * win32-low.c (win32_add_one_solib): If the dll name is
21 "ntdll.dll", prepend the system directory to the dll path.
23 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
25 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
27 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
28 Vladimir Prus <vladimir@codesourcery.com>
30 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
31 * configure.ac: Check for __mcoldfire__ and set
32 gdb_cv_m68k_is_coldfire.
33 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
34 reg-cf.o and reg-m68k.o.
35 * configure: Regenerated.
37 2009-11-16 Pedro Alves <pedro@codesourcery.com>
39 * linux-low.c (linux_remove_process): Add `detaching' parameter.
40 Pass it to thread_db_free.
41 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
42 proper `detaching' argument to linux_remove_process.
43 * linux-low.h (thread_db_free): Add `detaching' parameter.
44 * thread-db.c (thread_db_init): Pass false as `detaching' argument
46 (thread_db_free): Add `detaching' parameter. Only
47 call td_ta_clear_event if detaching from process.
49 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
51 * thread-db.c (thread_db_free): Fix typo.
53 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
56 * thread-db.c (thread_db_free): Call td_ta_clear_event.
58 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
60 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
61 with an i686 compiler.
62 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
66 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
70 * server.c (handle_search_memory_1): Correct read_addr initialization
71 in loop for searching subsequent chunks.
73 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
75 * configure.ac: New --with-libthread-db option.
76 * thread-db.c: Allow direct dependence on libthread_db.
77 (thread_db_free): Adjust.
78 * config.in: Regenerate.
79 * configure: Likewise.
81 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
84 * thread-db.c (attach_thread): New function.
85 (maybe_attach_thread): Return success/failure.
86 (find_new_threads_callback): Adjust.
87 (thread_db_find_new_threads): Loop until no new threads.
89 2009-10-13 Pedro Alves <pedro@codesourcery.com>
91 * proc-service.c (ps_lgetregs): Formatting.
93 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
95 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
96 * configure.ac: Adjust.
97 * linux-low.h (struct process_info_private): Move members to struct
99 (thread_db_free, thread_db_handle_monitor_command): New prototype.
100 * linux-low.c (linux_remove_process): Adjust.
101 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
102 * server.c (handle_query): Move code ...
103 (handle_monitor_command): ... here. New function.
104 * target.h (struct target_ops): New member.
105 * thread-db.c (struct thread_db): New.
106 (libthread_db_search_path): New variable.
107 (thread_db_create_event, thread_db_enable_reporting)
108 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
109 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
110 (try_thread_db_load_1, dladdr_to_soname): New functions.
111 (try_thread_db_load, thread_db_load_search): New functions.
112 (thread_db_init): Search for libthread_db.
113 (thread_db_free): New function.
114 (thread_db_handle_monitor_command): Likewise.
115 * config.in: Regenerate.
116 * configure: Regenerate.
118 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
120 * spu-low.c (spu_kill): Wait for inferior to terminate.
121 Call clear_inferiors.
122 (spu_detach): Call clear_inferiors.
124 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
126 * aclocal.m4: Regenerate.
127 * config.in: Likewise.
128 * configure: Likewise.
130 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
132 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
133 (parse_spufs_run): New function.
134 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
135 (ppc_breakpoint_at): Handle SPU breakpoints.
137 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
139 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
140 (SPUFS_MAGIC): Define.
141 (spu_enumerate_spu_ids): New function.
142 (linux_qxfer_spu): New function.
143 (linux_target_ops): Install linux_qxfer_spu.
145 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
147 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
148 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
149 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
150 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
151 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
152 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
153 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
154 (init_registers_powerpc_cell32l): Add prototype.
155 (init_registers_powerpc_cell64l): Likewise.
156 (ppc_arch_setup): Detect Cell/B.E. architecture.
158 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
160 * Makefile.in (datarootdir): New variable.
162 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
164 * linux-low.c (linux_write_memory): Update debugging output.
165 * Makefile.in (clean): Add new descriptions.
166 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
167 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
168 * configure.srv: Add new files for arm*-*-linux*.
169 * linux-arm-low.c: Add new declarations.
170 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
171 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
172 (HWCAP_VFPv3D16): New.
173 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
174 instead of __IWMMXT__.
175 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
176 (arm_arch_setup): New.
177 (target_regsets): Remove #ifdef. Add VFP regset.
178 (the_low_target): Use arm_arch_setup.
180 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
182 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
183 the main thread again.
185 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
187 Adding Neutrino gdbserver.
188 * configure: Regenerated.
189 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
190 * configure.srv (i[34567]86-*-nto*): New target.
191 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
192 * remote-utils.c [__QNX__]: Include sys/iomgr.h
193 (nto_comctrl) [__QNX__]: New function.
194 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
196 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
198 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
201 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
202 Pedro Alves <pedro@codesourcery.com>
204 * win32-i386-low.c (i386_get_thread_context): Handle systems that
205 don't support CONTEXT_EXTENDED_REGISTERS.
206 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
207 (the_low_target): Install them.
208 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
209 failing with ERROR_PIPE_NOT_CONNECTED.
211 2009-06-30 Doug Evans <dje@google.com>
212 Pierre Muller <muller@ics.u-strasbg.fr>
214 Add h/w watchpoint support to x86-linux, win32-i386.
215 * Makefile.in (SFILES): Add i386-low.c
216 (i386_low_h): Define.
217 (i386-low.o): Add dependencies.
218 (linux-x86-low.o): Add i386-low.h dependency.
219 (win32-i386-low.o): Ditto.
220 * i386-low.c: New file.
221 * i386-low.h: New file.
222 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
223 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
224 * linux-low.c (linux_add_process): Initialize arch_private.
225 (linux_remove_process): Free arch_private.
226 (add_lwp): Initialize arch_private.
227 (delete_lwp): Free arch_private.
228 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
230 * linux-low.h (process_info_private): New member arch_private.
231 (lwp_info): New member arch_private.
232 (linux_target_ops): New members new_process, new_thread,
234 (ptid_of): New macro.
235 * linux-x86-low.c: Include stddef.h, i386-low.h.
236 (arch_process_info): New struct.
237 (arch_lwp_info): New struct.
238 (x86_linux_dr_get, x86_linux_dr_set): New functions.
239 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
240 (i386_dr_low_get_status): New function.
241 (x86_insert_point, x86_remove_point): New functions.
242 (x86_stopped_by_watchpoint): New function.
243 (x86_stopped_data_address): New function.
244 (x86_linux_new_process, x86_linux_new_thread): New functions.
245 (x86_linux_prepare_to_resume): New function.
246 (the_low_target): Add entries for insert_point, remove_point,
247 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
249 * server.c (debug_hw_points): New global.
250 (monitor_show_help): Document set debug-hw-points.
251 (handle_query): Process "set debug-hw-points".
252 * server.h (debug_hw_points): Declare.
254 * utils.c (NUMCELLS, CELLSIZE): New macros.
255 (get_sell, xsnprintf, paddress): New functions.
256 * win32-arm-low.c (the_low_target): Add entries for insert_point,
257 remove_point, stopped_by_watchpoint, stopped_data_address.
258 * win32-i386-low.c: Include i386-low.h.
259 (debug_reg_state): Replaces dr.
260 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
261 (i386_dr_low_get_status): New function.
262 (i386_insert_point, i386_remove_point): New functions.
263 (i386_stopped_by_watchpoint): New function.
264 (i386_stopped_data_address): New function.
265 (i386_initial_stuff): Update.
266 (get_thread_context,set_thread_context,i386_thread_added): Update.
267 (the_low_target): Add entries for insert_point,
268 remove_point, stopped_by_watchpoint, stopped_data_address.
269 * win32-low.c (win32_insert_watchpoint): New function.
270 (win32_remove_watchpoint): New function.
271 (win32_stopped_by_watchpoint): New function.
272 (win32_stopped_data_address): New function.
273 (win32_target_ops): Add entries for insert_watchpoint,
274 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
275 * win32-low.h (win32_target_ops): New members insert_point,
276 remove_point, stopped_by_watchpoint, stopped_data_address.
278 2009-06-25 Pedro Alves <pedro@codesourcery.com>
280 * server.c (process_serial_event): Re-return unsupported, not
281 error, if the type isn't recognized. Re-allow supporting only
282 insert or remove packets. Also call require_running for
283 breakpoints. Add missing break statement to default case. Tidy.
284 * target.h (struct target_ops): Rename insert_watchpoint to
285 insert_point, and remove_watchpoint to remove_point.
287 * linux-low.h (struct linux_target_ops): Likewise.
288 * linux-low.c (linux_insert_watchpoint): Rename to ...
289 (linux_insert_point): ... this. Adjust.
290 (linux_remove_watchpoint): Rename to ...
291 (linux_remove_point): ... this. Adjust.
292 (linux_target_ops): Adjust.
293 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
294 (cris_insert_point): ... this.
295 (cris_remove_watchpoint): Rename to ...
296 (cris_remove_point): ... this.
297 (the_low_target): Adjust.
299 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
301 * server.c (handle_v_kill): Pass signal_pid to
302 kill_inferior if multi_process is zero.
304 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
306 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
307 * target.h (target_ops): Comment for *_watchpoint to make it clear
308 the functions can get types '0' and '1'.
310 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
312 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
313 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
314 * regcache.c (get_regcache): Likewise.
315 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
316 * win32-low.c (child_fetch_inferior_registers): Remove check for
319 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
320 Pedro Alves <pedro@codesourcery.com>
322 * target.h (struct target_ops) <supports_multi_process>: New
324 (target_supports_multi_process): New.
325 * server.c (handle_query): Even if GDB reports support, only
326 enable multi-process if the target also supports it. Report
327 multi-process support only if the target backend supports it.
328 * linux-low.c (linux_supports_multi_process): New function.
329 (linux_target_ops): Install it as target_supports_multi_process
332 2009-05-24 Doug Evans <dje@google.com>
334 Global renaming of find_thread_pid to find_thread_ptid.
335 * server.h (find_thread_ptid): Renamed from find_thread_pid.
336 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
339 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
340 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
343 * linux-low.c (get_stop_pc): Print pc if debug_threads.
344 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
345 (linux_resume_one_lwp): Ditto.
347 2009-05-23 Doug Evans <dje@google.com>
349 * linux-low.c (linux_resume_one_lwp): Change type of first arg
350 from struct inferior_list_entry * to struct lwp_info *.
353 2009-05-13 Doug Evans <dje@google.com>
355 * linux-x86-low.c: Don't include assert.h.
356 (x86_siginfo_fixup): Use fatal, not assert.
357 (x86_arch_setup): Fix comment.
359 2009-05-12 Doug Evans <dje@google.com>
361 Biarch support for i386/amd64 gdbserver.
362 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
364 (linux-i386-low.o, linux-x86-64-low.o): Delete.
365 (linux-x86-low.o): Add.
366 * linux-x86-64-low.c: Delete.
367 * linux-i386-low.c: Delete.
368 * linux-x86-low.c: New file.
369 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
371 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
373 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
374 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
375 (linux_child_pid_to_exec_file): New function.
376 (elf_64_header_p, elf_64_file_p): New functions.
377 (siginfo_fixup): New function.
378 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
379 give target a chance to convert layout.
380 * linux-low.h (linux_target_ops): New member siginfo_fixup.
381 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
383 2009-05-07 Doug Evans <dje@google.com>
385 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
386 (regsets_store_inferior_registers): Ditto.
388 2009-05-06 Pedro Alves <pedro@codesourcery.com>
392 * linux-low.c (must_set_ptrace_flags): Delete.
393 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
395 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
396 `lwp->must_set_ptrace_flags' instead.
397 (linux_wait_for_event_1): Set ptrace options here.
398 (linux_wait_1): ... not here.
400 2009-04-30 Doug Evans <dje@google.com>
402 * inferiors.c (started_inferior_callback): New function.
403 (attached_inferior_callback): New function.
404 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
405 * server.c (print_started_pid, print_attached_pid): New functions.
406 (detach_or_kill_for_exit): New function.
407 (main): Call it instead of for_each_inferior (kill_inferior_callback).
408 * server.h (have_started_inferiors_p): Declare.
409 (have_attached_inferiors_p): Declare.
411 * inferiors.c (remove_process): Fix memory leak, free process.
412 * linux-low.c (linux_remove_process): New function.
413 (linux_kill): Call it instead of remove_process.
414 (linux_detach, linux_wait_1): Ditto.
416 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
418 * configure.srv: Add x86 Windows CE target.
420 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
422 * inferiors.c (get_thread_process): Make global.
423 * server.h (get_thread_process): Add prototype.
424 * thread-db.c (find_one_thread): Use get_thread_process
425 instead of current_process.
426 (thread_db_get_tls_address): Do not crash if called when
427 thread layer is not yet initialized.
429 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
431 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
432 * spu-low.c (current_tid): Rename to ...
433 (current_ptid): ... this.
434 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
435 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
436 ptid_get_lwp (current_ptid) instead of current_tid.
437 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
438 instead of current_tid. Use find_process_pid to verify pid
439 argument is valid. Pass proper argument to remove_process.
440 (spu_thread_alive): Compare current_ptid instead of current_tid.
441 (spu_resume): Likewise.
443 2009-04-02 Pedro Alves <pedro@codesourcery.com>
445 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
448 2009-04-01 Pedro Alves <pedro@codesourcery.com>
450 Implement the multiprocess extensions, and add linux multiprocess
453 * server.h (ULONGEST): Declare.
454 (struct ptid, ptid_t): New.
455 (minus_one_ptid, null_ptid): Declare.
456 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
457 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
458 (struct inferior_list_entry): Change `id' type from unsigned from
460 (struct sym_cache, struct breakpoint, struct
461 process_info_private): Forward declare.
462 (struct process_info): Declare.
463 (current_process): Declare.
464 (all_processes): Declare.
465 (initialize_inferiors): Declare.
466 (add_thread): Adjust to use ptid_t.
467 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
468 (add_process, remove_process, find_thread_pid): Declare.
469 (find_inferior_id): Adjust to use ptid_t.
470 (cont_thread, general_thread, step_thread): Change type to ptid_t.
471 (multi_process): Declare.
472 (push_event): Adjust to use ptid_t.
473 (read_ptid, write_ptid): Declare.
474 (prepare_resume_reply): Adjust to use ptid_t.
475 (clear_symbol_cache): Declare.
476 * inferiors.c (all_processes): New.
477 (null_ptid, minus_one_ptid): New.
478 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
479 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
480 (add_thread): Change unsigned long to ptid. Remove gdb_id
482 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
483 (gdb_id_to_thread): Rename to ...
484 (find_thread_pid): ... this. Change unsigned long to ptid.
485 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
486 (loaded_dll, pull_pid_from_list): Adjust.
487 (add_process, remove_process, find_process_pid)
488 (get_thread_process, current_process, initialize_inferiors): New.
489 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
490 (struct target_waitstatus) <related_pid>: Ditto.
491 (struct target_ops) <kill, detach>: Add `pid' argument. Change
493 (struct target_ops) <join>: Add `pid' argument.
494 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
495 (struct target_ops) <wait>: Add `ptid' field. Change return type
497 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
498 (mywait): Add `ptid' argument. Change return type to ptid_t.
499 (target_pid_to_str): Declare.
500 * target.c (set_desired_inferior): Adjust to use ptids.
501 (mywait): Add new `ptid' argument. Adjust.
502 (target_pid_to_str): New.
503 * mem-break.h (free_all_breakpoints): Declare.
504 * mem-break.c (breakpoints): Delelete.
505 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
506 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
507 to use per-process breakpoint list.
508 (free_all_breakpoints): New.
509 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
510 (symbol_cache, all_symbols_looked_up): Delete.
512 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
514 (prepare_resume_reply): Change ptid argument's type from unsigned
515 long to ptid_t. Adjust. Implement W;process and X;process.
516 (free_sym_cache, clear_symbol_cache): New.
517 (look_up_one_symbol): Adjust to per-process symbol cache. *
518 * server.c (cont_thread, general_thread, step_thread): Change type
521 (multi_process): New.
522 (last_ptid): Change type to ptid_t.
523 (struct vstop_notif) <ptid>: Change type to ptid_t.
524 (queue_stop_reply, push_event): Change `ptid' argument's type to
526 (discard_queued_stop_replies): Add `pid' argument.
527 (start_inferior): Adjust to use ptids. Adjust to mywait interface
528 changes. Don't reference the `attached' global.
529 (attach_inferior): Adjust to mywait interface changes.
530 (handle_query): Adjust to use ptids. Parse GDB's qSupported
531 features. Handle and report "multiprocess+". Handle
533 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
535 (handle_v_kill): New.
536 (handle_v_stopped): Adjust to use target_pid_to_str.
537 (handle_v_requests): Allow multiple attaches and runs when
538 multiprocess extensions are in effect. Handle "vKill".
539 (myresume): Adjust to use ptids.
540 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
541 (handle_status): Adjust to discard_queued_stop_replies interface
543 (first_thread_of, kill_inferior_callback)
544 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
545 (main): Call initialize_inferiors. Adjust to use ptids, killing
546 and detaching from all inferiors. Handle multiprocess packet
548 * linux-low.h: Include gdb_proc_service.h.
549 (struct process_info_private): New.
550 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
551 <lwpid_of>: Use ptid_get_lwp.
552 (get_lwp_thread): Adjust.
553 (struct lwp_info): Add `dead' member.
554 (find_lwp_pid): Declare.
555 * linux-low.c (thread_db_active): Delete.
556 (new_inferior): Adjust comment.
557 (inferior_pid): Delete.
558 (linux_add_process): New.
559 (handle_extended_wait): Adjust.
560 (add_lwp): Change unsigned long to ptid.
561 (linux_create_inferior): Add process to processes table. Adjust
562 to use ptids. Don't set new_inferior here.
563 (linux_attach_lwp): Rename to ...
564 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
565 it. Adjust to use ptids.
566 (linux_attach_lwp): New.
567 (linux_attach): Add process to processes table. Don't set
569 (struct counter): New.
570 (second_thread_of_pid_p, last_thread_of_process_p): New.
571 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
573 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
574 processes. Remove process from process table.
575 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
576 to multiple processes.
577 (any_thread_of): New.
578 (linux_detach): Add `pid' argument, and handle it. Remove process
579 from processes table.
580 (linux_join): Add `pid' argument. Handle it.
581 (linux_thread_alive): Change unsighed long argument to ptid_t.
582 Consider dead lwps as not being alive.
583 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
584 threads we're not interested in.
585 (same_lwp, find_lwp_pid): New.
586 (linux_wait_for_lwp): Change `pid' argument's type from int to
588 (linux_wait_for_event): Rename to ...
589 (linux_wait_for_event_1): ... this. Change `pid' argument's type
590 from int to ptid_t. Adjust.
591 (linux_wait_for_event): New.
592 (linux_wait_1): Add `ptid' argument. Change return type to
593 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
594 that exit from the process table.
595 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
597 (mark_lwp_dead): New.
598 (wait_for_sigstop): Adjust to use ptids. If a process exits while
599 stopping all threads, mark its main lwp as dead.
600 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
602 (fetch_register, usr_store_inferior_registers)
603 (regsets_fetch_inferior_registers)
604 (regsets_store_inferior_registers, linux_read_memory)
605 (linux_write_memory): Inline `inferior_pid'.
606 (linux_look_up_symbols): Adjust to use per-process
608 (linux_request_interrupt): Adjust to use ptids.
609 (linux_read_auxv): Inline `inferior_pid'.
610 (initialize_low): Don't reference thread_db_active.
611 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
612 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
613 (ps_getpid): Return the pid of the current inferior.
614 * thread-db.c (proc_handle, thread_agent): Delete.
615 (thread_db_create_event, thread_db_enable_reporting): Adjust to
617 (find_one_thread): Change argument type to ptid_t. Adjust to
619 (maybe_attach_thread): Adjust to per-process data and ptids.
620 (thread_db_find_new_threads): Ditto.
621 (thread_db_init): Ditto.
622 * spu-low.c (spu_create_inferior, spu_attach): Add process to
623 processes table. Adjust to use ptids.
624 (spu_kill, spu_detach): Adjust interface. Remove process from
626 (spu_join, spu_thread_alive): Adjust interface.
627 (spu_wait): Adjust interface. Remove process from processes
628 table. Adjust to use ptids.
629 * win32-low.c (current_inferior_tid): Delete.
630 (current_inferior_ptid): New.
631 (debug_event_ptid): New.
632 (thread_rec): Take a ptid. Adjust.
633 (child_add_thread): Add `pid' argument. Adjust to use ptids.
634 (child_delete_thread): Ditto.
635 (do_initial_child_stuff): Add `attached' argument. Add process to
637 (child_fetch_inferior_registers, child_store_inferior_registers):
639 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
640 (win32_attach): Pass 1 to do_initial_child_stuff.
641 (win32_kill): Adjust interface. Remove process from processes
643 (win32_detach): Ditto.
644 (win32_join): Adjust interface.
645 (win32_thread_alive): Take a ptid.
646 (win32_resume): Adjust to use ptids.
647 (get_child_debug_event): Ditto.
648 (win32_wait): Adjust interface. Remove exiting process from
651 2009-04-01 Pedro Alves <pedro@codesourcery.com>
653 Non-stop mode support.
655 * server.h (non_stop): Declare.
656 (gdb_client_data, handler_func): Declare.
657 (delete_file_handler, add_file_handler, start_event_loop):
659 (handle_serial_event, handle_target_event, push_event)
660 (putpkt_notif): Declare.
661 * target.h (enum resume_kind): New.
662 (struct thread_resume): Replace `step' field by `kind' field.
663 (TARGET_WNOHANG): Define.
664 (struct target_ops) <wait>: Add `options' argument.
665 <supports_non_stop, async, start_non_stop>: New fields.
666 (target_supports_non_stop, target_async): New.
667 (start_non_stop): Declare.
668 (mywait): Add `options' argument.
669 * target.c (mywait): Add `options' argument. Print child exit
671 (start_non_stop): New.
672 * server.c (non_stop, own_buf, mem_buf): New globals.
673 (struct vstop_notif): New.
674 (notif_queue): New global.
675 (queue_stop_reply, push_event, discard_queued_stop_replies)
676 (send_next_stop_reply): New.
677 (start_inferior): Adjust to use resume_kind. Adjust to mywait
679 (attach_inferior): In non-stop mode, don't wait for the target
681 (handle_general_set): Handle QNonStop.
682 (handle_query): When handling qC, return the current general
683 thread, instead of the first thread of the list.
684 (handle_query): If the backend supports non-stop mode, include
685 QNonStop+ in the qSupported query response.
686 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
688 (handle_v_attach, handle_v_run): Handle non-stop mode.
689 (handle_v_stopped): New.
690 (handle_v_requests): Report support for vCont;t. Handle vStopped.
691 (myresume): Adjust to use resume_kind. Handle non-stop.
692 (queue_stop_reply_callback): New.
693 (handle_status): Handle non-stop mode.
694 (main): Clear non_stop flag on reconnection. Use the event-loop.
695 Refactor serial protocol handling from here ...
696 (process_serial_event): ... to this new function. When GDB
697 selects any thread, select one here. In non-stop mode, wait until
698 GDB acks all pending events before exiting.
699 (handle_serial_event, handle_target_event): New.
700 * remote-utils.c (remote_open): Install remote_desc in the event
702 (remote_close): Remove remote_desc from the event loop.
703 (putpkt_binary): Rename to...
704 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
705 (putpkt_binary): New as wrapper around putpkt_binary_1.
707 (prepare_resume_reply): In non-stop mode, don't change the
710 * Makefile.in (OBJ): Add event-loop.o.
711 (event-loop.o): New rule.
713 * linux-low.h (pid_of): Moved here.
715 (get_lwp_thread): Use lwpid_of.
716 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
717 * linux-low.c (pid_of): Delete.
718 (inferior_pid): Use lwpid_of.
719 (linux_event_pipe): New.
720 (target_is_async_p): New.
722 (handle_extended_wait): Use lwpid_of.
723 (add_lwp): Don't set lwpid field.
724 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
725 (linux_kill_one_lwp): If killing a running lwp, stop it first.
726 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
727 (linux_detach_one_lwp): If detaching from a running lwp, stop it
728 first. Adjust to linux_wait_for_event interface changes. Use
730 (linux_detach): Don't delete the main lwp here.
731 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
732 (status_pending_p): Don't consider explicitly suspended lwps.
733 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
734 pointer. Add OPTIONS argument. Change return type to int. Use
735 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
736 (linux_wait_for_event): Take an integer pid instead of a lwp_info
737 pointer. Add status pointer argument. Return a pid instead of a
738 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
739 changes. In non-stop mode, don't switch to a random thread.
740 (linux_wait): Rename to...
741 (linux_wait_1): ... this. Add target_options argument, and handle
742 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
743 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
744 clean exit and signal exit code. Don't stop all threads in
745 non-stop mode. In all-stop mode, only stop all threads when
746 reporting a stop to GDB. Handle explicit thread stop requests.
747 (async_file_flush, async_file_mark): New.
749 (send_sigstop): Use lwpid_of.
750 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
751 interface changes. In non-stop mode, don't switch to a random
753 (linux_resume_one_lwp): Use lwpid_of.
754 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
755 (linux_resume_one_thread): ... this. Handle resume_stop. In
756 non-stop mode, don't look for pending flag in all threads.
757 (resume_status_pending_p): Don't consider explicitly suspended
759 (my_waitpid): Reimplement. Emulate __WALL.
760 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
762 (sigchld_handler, linux_supports_non_stop, linux_async)
763 (linux_start_non_stop): New.
764 (linux_target_ops): Register linux_supports_non_stop, linux_async
765 and linux_start_non_stop.
766 (initialize_low): Install SIGCHLD handler.
767 * thread-db.c (thread_db_create_event, find_one_thread)
768 (thread_db_get_tls_address): Use lwpid_of.
769 * win32-low.c (win32_detach): Adjust to use resume_kind.
770 (win32_wait): Add `options' argument.
771 * spu-low.c (spu_resume): Adjust to use resume_kind.
772 (spu_wait): Add `options' argument.
774 2009-04-01 Pedro Alves <pedro@codesourcery.com>
776 Decouple target code from remote protocol.
778 * target.h (enum target_waitkind): New.
779 (struct target_waitstatus): New.
780 (struct target_ops) <wait>: Return an unsigned long. Take a
781 target_waitstatus pointer instead of a char pointer.
783 * target.c (mywait): Change prototype to return an unsigned long.
784 Take a target_waitstatus pointer instead of a char pointer. Adjust.
785 * server.h (thread_from_wait, old_thread_from_wait): Delete
787 (prepare_resume_reply): Change prototype to take a
789 * server.c (thread_from_wait, old_thread_from_wait): Delete.
790 (last_status, last_ptid): New.
791 (start_inferior): Remove "statusptr" argument. Adjust. Return a
792 pid instead of a signal.
793 (attach_inferior): Remove "status" and "signal" parameters.
795 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
797 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
798 (handle_v_requests, myresume): Remove "status" and "signal"
800 (handle_status): New.
801 (main): Delete local `status'. Adjust.
802 * remote-utils.c: Include target.h.
803 (prepare_resume_reply): Change prototype to take a
804 target_waitstatus. Adjust.
806 * linux-low.c (linux_wait): Adjust to new target_ops->wait
808 * spu-low.c (spu_wait): Adjust.
809 * win32-low.c (enum target_waitkind, struct target_waitstatus):
811 (win32_wait): Adjust.
813 2009-04-01 Pedro Alves <pedro@codesourcery.com>
815 * target.h (struct thread_resume): Delete leave_stopped member.
816 (struct target_ops): Add a `n' argument to the `resume' callback.
817 * server.c (start_inferior): Adjust.
818 (handle_v_cont, myresume): Adjust.
819 * linux-low.c (check_removed_breakpoint): Adjust to resume
820 interface change, and to removed leave_stopped field.
821 (resume_ptr): Delete.
822 (struct thread_resume_array): New.
823 (linux_set_resume_request): Add new `arg' parameter. Adjust to
824 resume interface change.
825 (linux_continue_one_thread, linux_queue_one_thread)
826 (resume_status_pending_p): Check if the resume field is NULL
827 instead of checking the leave_stopped member.
828 (linux_resume): Adjust to the target resume interface change.
829 * spu-low.c (spu_resume): Adjust to the target resume interface
831 * win32-low.c (win32_detach, win32_resume): Ditto.
833 2009-04-01 Pedro Alves <pedro@codesourcery.com>
835 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
837 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
839 (linux_continue_one_thread): Only preserve the stepping flag if
840 there's a pending breakpoint.
842 2009-03-31 Pedro Alves <pedro@codesourcery.com>
844 * server.c (main): After the inferior having exited, call
845 remote_close before exiting gdbserver.
847 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
849 Fix size of FPSCR in Power 7 processors.
850 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
851 (PPC_FEATURE_HAS_DFP): New #define.
852 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
855 2009-03-23 Pedro Alves <pedro@codesourcery.com>
857 * server.c (handle_query) Whitespace and formatting.
859 2009-03-22 Pedro Alves <pedro@codesourcery.com>
861 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
862 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
863 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
864 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
865 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
866 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
867 Makefile.in, configure.ac: Fix whitespace throughout.
868 * configure: Regenerate.
870 2009-03-22 Pedro Alves <pedro@codesourcery.com>
872 * inferiors.c (find_inferior): Make it safe for the callback
873 function to delete the currently iterated inferior.
875 2009-03-22 Pedro Alves <pedro@codesourcery.com>
877 * Makefile.in (linuw_low_h): Move higher.
878 (thread-db.o): Depend on $(linux_low_h).
880 2009-03-17 Pedro Alves <pedro@codesourcery.com>
882 Rename "process" to "lwp" throughout.
884 * linux-low.c (all_processes): Rename to...
885 (all_lwps): ... this.
886 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
887 (add_process): Rename to ...
888 (add_lwp): ... this. Adjust.
889 (linux_create_inferior): Adjust.
890 (linux_attach_lwp): Adjust.
891 (linux_attach): Adjust.
892 (linux_kill_one_process): Rename to ...
893 (linux_kill_one_lwp): ... this. Adjust.
894 (linux_kill): Adjust.
895 (linux_detach_one_process): Rename to ...
896 (linux_detach_one_lwp): ... this. Adjust.
897 (linux_detach): Adjust.
898 (check_removed_breakpoint): Adjust.
899 (status_pending_p): Adjust.
900 (linux_wait_for_process): Rename to ...
901 (linux_wait_for_lwp): ... this. Adjust.
902 (linux_wait_for_event): Adjust.
903 (send_sigstop): Adjust.
904 (wait_for_sigstop): Adjust.
905 (stop_all_processes): Rename to ...
906 (stop_all_lwps): ... this.
907 (linux_resume_one_process): Rename to ...
908 (linux_resume_one_lwp): ... this. Adjust.
909 (linux_set_resume_request, linux_continue_one_thread)
910 (linux_queue_one_thread, resume_status_pending_p)
911 (usr_store_inferior_registers, regsets_store_inferior_registers)
912 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
914 * linux-low.h (get_process): Rename to ...
915 (get_lwp): ... this. Adjust.
916 (get_thread_process): Rename to ...
917 (get_thread_lwp): ... this. Adjust.
918 (get_process_thread): Rename to ...
919 (get_lwp_thread): ... this. Adjust.
920 (struct process_info): Rename to ...
921 (struct lwp_info): ... this.
922 (all_processes): Rename to ...
923 (all_lwps): ... this.
924 * proc-service.c (ps_lgetregs): Adjust.
925 * thread-db.c (thread_db_create_event, find_one_thread)
926 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
928 2009-03-14 Pedro Alves <pedro@codesourcery.com>
930 * server.c (handle_query): Handle "qAttached".
932 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
934 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
935 GPLv3, update license URL.
937 2009-03-01 Doug Evans <dje@google.com>
939 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
940 (server_h): Add gdb_signals.h.
942 * server.h (target_signal_from_host,target_signal_to_host_p)
943 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
945 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
947 * remote-utils.c (getpkt): Also generate remote-debug
948 information if noack_mode is set.
950 2009-02-06 Pedro Alves <pedro@codesourcery.com>
952 * server.c (handle_query): Report qXfer:siginfo:read and
953 qXfer:siginfo:write as supported and handle them.
954 * target.h (struct target_ops) <qxfer_siginfo>: New field.
955 * linux-low.c (linux_xfer_siginfo): New.
956 (linux_target_ops): Set it.
958 2009-01-26 Pedro Alves <pedro@codesourcery.com>
960 * server.c (gdbserver_usage): Mention --remote-debug.
961 (main): Accept '--remote-debug' switch.
963 2009-01-18 Doug Evans <dje@google.com>
965 * regcache.c (new_register_cache): No need to check result of xcalloc.
966 * server.c (handle_search_memory): Back out calls to xmalloc,
967 result is checked and error is returned to user upon failure.
968 (handle_query): Ditto. Add more checks for result of malloc.
969 (handle_v_cont): Check result of malloc, report error back to
971 (handle_v_run): Ditto. Call freeargv.
972 * server.h (freeargv): Declare.
973 * utils.c (freeargv): New fn.
975 2009-01-15 Doug Evans <dje@google.com>
977 * gdbreplay.c (perror_with_name): Make arg const char *.
978 * server.h (target_signal_to_name): Make return type const char *.
979 * thread-db.c (thread_db_err_str): Make return type const char *.
980 * utils.c (perror_with_name): Make arg const char *.
982 2009-01-14 Pedro Alves <pedro@codesourcery.com>
984 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
985 when handling a EXIT_PROCESS_DEBUG_EVENT.
987 2009-01-06 Joel Brobecker <brobecker@adacore.com>
989 * gdbreplay.c (gdbreplay_version): Update copyright year.
990 * server.c (gdbserver_version): Likewise.
992 2009-01-05 Doug Evans <dje@google.com>
994 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
995 (handle_extended_wait): Improve comment.
997 2008-12-13 Doug Evans <dje@google.com>
999 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1000 * server.h (ATTR_MALLOC): New macro.
1001 (xmalloc,xcalloc,xstrdup): Declare.
1002 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1003 * inferiors.c: Ditto.
1004 * linux-low.c: Ditto.
1005 * mem-break.c: Ditto.
1006 * regcache.c: Ditto.
1007 * remote-utils.c: Ditto.
1010 * win32-low.c: Ditto.
1012 2008-12-12 Doug Evans <dje@google.com>
1014 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1015 in debugging printf.
1017 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1019 2008-12-09 Doug Evans <dje@google.com>
1021 * linux-low.h (struct process_info): Delete member tid, unused.
1022 * thread-db.c (find_one_thread): Update.
1023 (maybe_attach_thread): Update.
1025 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1027 * target.h (struct target_ops): Add qxfer_osdata member.
1028 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1030 (linux_qxfer_osdata): New functions.
1031 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1033 * server.c (handle_query): Handle "qXfer:osdata:read:".
1034 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1035 (buffer_xml_printf): New functions.
1036 * server.h (struct buffer): New.
1037 (buffer_grow_str, buffer_grow_str0): New macros.
1038 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1039 (buffer_xml_printf): Declare.
1041 2008-11-24 Doug Evans <dje@google.com>
1043 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1045 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1047 * server.c (handle_v_run): Always use the supplied argument list.
1049 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1051 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1052 (xtensa_regmap_table): Add entry for scompare1.
1054 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1056 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1057 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1058 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1059 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1060 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1061 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1062 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1063 XML target descriptions.
1064 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1065 when inferior is running on an ISA 2.05 or later processor. Add
1066 special case to return offset for full 64-bit slot of FPSCR when
1069 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1071 * Makefile.in (SFILES, clean): Added sparc64 files.
1072 (reg-sparc64.o, reg-sparc64.c): New.
1073 * configure.srv (sparc*-*-linux*): New configuration.
1074 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1075 syscall arguments for SPARC.
1076 (regsets_store_inferior_registers): Likewise.
1077 * linux-sparc-low.c: New file.
1079 2008-10-21 Doug Evans <dje@google.com>
1081 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1082 (READLINE_DIR,READLINE_DEP): Delete.
1083 (INTERNAL_CFLAGS): Update.
1084 (LINTFLAGS): Update.
1086 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1088 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1089 whole argv from the last run, not just argv[0].
1091 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1093 * regcache.c (new_register_cache): Return NULL if the register
1094 cache size isn't known yet.
1095 (free_register_cache): Avoid dereferencing a NULL regcache.
1097 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1099 * configure.srv: Merge MIPS and MIPS64.
1101 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1103 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1105 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1107 * Makefile.in: Add required vsx dependencies.
1109 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1110 Declare init_registers_powerpc_vsx32l.
1111 Declare init_registers_powerpc_vsx64l.
1112 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1113 (ppc_arch_setup): Check for VSX in hwcap.
1114 (ppc_fill_vsxregset): New function.
1115 (ppc_store_vsxregset): New function.
1116 Add new VSX entry in regset_info target_regsets.
1118 * configure.srv: Add new VSX dependencies.
1120 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1122 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1123 (remote_open): Set or clear transport_is_reliable.
1124 (putpkt_binary): Don't expect acks in noack mode.
1125 (getpkt): Don't send ack/nac in noack mode.
1126 * server.c (handle_general_set): Handle QStartNoAckMode.
1127 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1129 (main): Reset noack_mode on every connection.
1130 * server.h (noack_mode): Declare.
1132 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1134 * Makefile.in (GDBREPLAY_OBS): New variable.
1135 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1137 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1138 Daniel Jacobowitz <dan@codesourcery.com>
1140 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1141 (usr_store_inferior_registers): Likewise.
1142 (regsets_store_inferior_registers): Likewise.
1144 2008-07-31 Rolf Jansen <rj@surtec.com>
1145 Pedro Alves <pedro@codesourcery.com>
1147 * configure.ac: Check for memmem declaration.
1148 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1149 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1150 (disable_packet_qfThreadInfo): Unconditionally compile.
1151 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1152 * configure, config.in: Regenerate.
1154 2008-07-28 Doug Kwan <dougkwan@google.com>
1156 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1157 (linux_write_memory): Remove declaration of errno.
1159 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1161 * linux-low.c (handle_extended_wait): Do not use "status"
1162 variable uninitialized.
1164 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1166 * server.c (handle_v_attach): Inhibit reporting dll changes.
1168 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1170 * remote-utils.c (prepare_resume_reply): If requested, don't
1171 output "thread:TID" in the T stop reply.
1173 * server.c (disable_packet_vCont, disable_packet_Tthread)
1174 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1175 (handle_query): If requested, disable support for qC, qfThreadInfo
1177 (handle_v_requests): If requested, disable support for vCont.
1178 (gdbserver_show_disableable): New.
1179 (main): Handle --disable-packet and --disable-packet=LIST.
1181 * server.h (disable_packet_vCont, disable_packet_Tthread)
1182 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1184 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1186 * server.c (gdbserver_usage): Mention --version.
1188 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1190 * Makefile.in (gdbreplay.o): New rule.
1192 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1194 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1195 message, not gdbserver.
1197 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1198 Nathan Sidwell <nathan@codesourcery.com>
1199 Joseph Myers <joseph@codesourcery.com>
1201 * acinclude.m4: Include ../../config/acx.m4.
1202 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1203 * configure, config.in: Regenerate.
1204 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1205 * server.c (gdbserver_version): Print PKGVERSION.
1206 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1207 (main): Adjust gdbserver_usage calls.
1208 * gdbreplay.c (version, host_name): Add declarations.
1209 (gdbreplay_version, gdbreplay_usage): New.
1210 (main): Accept --version and --help options.
1212 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1214 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1215 (arm_breakpoint_at): Handle Thumb.
1216 (the_low_target): Add comment.
1218 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1220 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1222 2008-05-09 Doug Evans <dje@google.com>
1224 * server.h (decode_search_memory_packet): Declare.
1225 * remote-utils.c (decode_search_memory_packet): New fn.
1226 * server.c (handle_search_memory_1): New fn.
1227 (handle_search_memory): New fn.
1228 (handle_query): Process qSearch:memory packets.
1230 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1232 * regcache.c (registers_length): Remove.
1233 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1234 full register packet.
1235 * regcache.h (registers_length): Remove prototype.
1236 * server.h (PBUFSIZ): Define to 16384.
1238 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1240 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1241 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1242 powerpc-64l.o, and powerpc-altivec64l.o.
1243 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1244 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1245 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1246 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1247 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1250 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1251 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1252 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1253 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1254 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1255 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1256 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1257 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1258 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1259 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1262 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1263 (init_registers_powerpc_32l): ... this new prototype.
1264 (init_registers_powerpc_32): Remove, replace by ...
1265 (init_registers_powerpc_altivec32l): ... this new prototype.
1266 (init_registers_powerpc_e500): Remove, replace by ...
1267 (init_registers_powerpc_e500l): ... this new prototype.
1268 (init_registers_ppc64): Remove, replace by ...
1269 (init_registers_powerpc_64l): ... this new prototype.
1270 (init_registers_powerpc_64): Remove, replace by ...
1271 (init_registers_powerpc_altivec64l): ... this new prototype.
1272 (ppc_num_regs): Set to 73.
1273 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1274 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1275 (ppc_cannot_store_register): Handle orig_r3 and trap.
1276 (ppc_arch_setup): Update init_registers_... calls.
1277 (ppc_fill_gregset): Handle orig_r3 and trap.
1279 * inferiors.c (clear_inferiors): Reset current_inferior.
1281 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1283 * acinclude.m4: Add override.m4.
1284 * configure: Regenerate.
1286 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1288 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1289 initial call to init_register_ppc64.
1291 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1293 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1294 powerpc*-*-linux* case.
1295 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1297 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1299 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1300 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1302 * linux-ppc-low.c: Include <elf.h>.
1303 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1304 (ppc_hwcap): New global variable.
1305 (ppc_regmap): Remove __SPE__ #ifdef sections.
1306 (ppc_regmap_e500): New global variable.
1307 (ppc_cannot_store_register): Update __SPE__ special case.
1308 (ppc_get_hwcap): New function.
1309 (ppc_arch_setup): Use it to determine whether inferior supports
1310 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1311 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1312 Do not access registers if target does not support AltiVec.
1313 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1314 Do not access registers if target does not support SPE.
1315 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1317 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1319 * linux-low.c (disabled_regsets, num_regsets): New.
1320 (use_regsets_p): Delete.
1321 (linux_wait_for_process): Clear disabled_regsets.
1322 (regsets_fetch_inferior_registers): Check and set it.
1323 (regsets_store_inferior_registers): Likewise.
1324 (linux_fetch_registers, linux_store_registers): Do not use
1326 (initialize_low): Allocate disabled_regsets.
1328 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1330 * Makefile.in (LIBOBJS): New.
1332 (memmem.o): New rule.
1333 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1334 * configure: Regenerated.
1336 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1338 * server.c (handle_query): Never return "unsupported" for
1339 qXfer:features:read queries.
1341 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1343 * server.c (get_features_xml): Fix inverted condition.
1344 (handle_query): Always support qXfer:feature:read.
1346 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1348 * server.c (wrapper_argv): New.
1349 (start_inferior): Handle wrapper_argv. If set, expect an extra
1351 (gdbserver_usage): Document --wrapper.
1352 (main): Parse --wrapper.
1354 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1356 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1357 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1358 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1359 (ppc_set_pc): Likewise.
1360 (ppc_arch_setup): New function.
1361 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1362 of collect_register.
1363 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1365 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1367 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1368 instead of linux-ppc64-low.o.
1369 * linux-ppc64-low.c: Remove file.
1370 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1371 (linux-ppc64-low.o): Remove rule.
1373 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1374 (init_registers_powerpc_64): Likewise.
1375 (ppc_regmap): Conditionally define depending on __powerpc64__.
1376 (ppc_cannot_store_register): Do not special-case "fpscr" when
1377 compiled on __powerpc64__.
1378 (ppc_collect_ptrace_register): New function.
1379 (ppc_supply_ptrace_register): New function.
1380 (ppc_breakpoint): Change type to "unsigned int".
1381 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1382 (the_low_target): Conditionally provide initializers for the
1383 arch_setup member depending on __powerpc64__. Install
1384 collect_ptrace_register and supply_ptrace_register members.
1386 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1388 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1389 * server.c (gdbserver_xmltarget): Define.
1390 (get_features_xml): Use it to replace "target.xml" and arch_string.
1392 * configure.srv: Remove srv_xmltarget. Add XML files that were
1393 mentioned there to srv_xmlfiles instead. Remove conditional tests
1394 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1395 srv_xmlfiles and srv_regobj to include all possible choices.
1396 * configure.ac (srv_xmltarget): Remove.
1397 (srv_xmlfiles): Do not add "target.xml".
1398 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1399 checks for supplementary target information.
1400 * configure: Regenerate.
1401 * Makefile.in (XML_TARGET): Remove.
1402 (target.xml): Remove rule.
1403 (clean): Do not clean up target.xml.
1404 (.PRECIOUS): Do not mention target.xml.
1406 * target.h (struct target_ops): Remove arch_string member.
1407 * linux-low.c (linux_arch_string): Remove.
1408 (linux_target_ops): Remove arch_string initializer.
1409 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1410 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1411 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1412 * spu-low.c (spu_arch_string): Remove.
1413 (spu_target_ops): Remove arch_string initializer.
1414 * win32-low.c (win32_arch_string): Remove.
1415 (win32_target_ops): Remove arch_string initializer.
1416 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1417 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1418 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1420 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1422 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1423 by collect_ptrace_register and supply_ptrace_register hooks.
1424 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1425 instead of checking for the_low_target.left_pad_xfer.
1426 (usr_store_inferior_registers): Use collect_ptrace_register callback
1427 instead of checking for the_low_target.left_pad_xfer.
1429 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1430 (s390_supply_ptrace_register): Likewise.
1431 (s390_fill_gregset): Call s390_collect_ptrace_register.
1432 (the_low_target): Update.
1434 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1435 (ppc_supply_ptrace_register): Likewise.
1436 (the_low_target): Update.
1438 * linux-i386-low.c (the_low_target): Update.
1439 * linux-x86-64-low.c (the_low_target): Update.
1441 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1443 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1444 reg-s390.o and reg-s390x.o.
1446 * linux-low.c (new_inferior): New global variable.
1447 (linux_create_inferior, linux_attach): Set it.
1448 (linux_wait_for_process): Call the_low_target.arch_setup after the
1449 target has stopped for the first time.
1450 (initialize_low): Do not call the_low_target.arch_setup.
1452 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1453 (s390_set_pc): Likewise.
1454 (s390_arch_setup): New function.
1455 (the_low_target): Use s390_arch_setup as arch_setup routine.
1457 * regcache.c (realloc_register_cache): New function.
1458 (set_register_cache): Call it for each existing regcache.
1460 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1462 * server.h (init_registers): Remove prototype.
1464 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1465 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1466 instead of init_registers ().
1467 * linux-arm-low.c (init_registers_arm): Add prototype.
1468 (init_registers_arm_with_iwmmxt): Likewise.
1469 (the_low_target): Add initializer for arch_setup field.
1470 * linux-cris-low.c (init_registers_cris): Add prototype.
1471 (the_low_target): Add initializer for arch_setup field.
1472 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1473 (the_low_target): Add initializer for arch_setup field.
1474 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1475 (the_low_target): Add initializer for arch_setup field.
1476 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1477 (the_low_target): Add initializer for arch_setup field.
1478 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1479 (the_low_target): Add initializer for arch_setup field.
1480 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1481 (the_low_target): Add initializer for arch_setup field.
1482 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1483 (init_registers_mips64_linux): Likewise.
1484 (the_low_target): Add initializer for arch_setup field.
1485 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1486 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1487 (the_low_target): Add initializer for arch_setup field.
1488 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1489 (init_registers_powerpc_64): Likewise.
1490 (the_low_target): Add initializer for arch_setup field.
1491 * linux-s390-low.c (init_registers_s390): Add prototype.
1492 (init_registers_s390x): Likewise.
1493 (the_low_target): Add initializer for arch_setup field.
1494 * linux-sh-low.c (init_registers_sh): Add prototype.
1495 (the_low_target): Add initializer for arch_setup field.
1496 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1497 (the_low_target): Add initializer for arch_setup field.
1498 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1499 (the_low_target): Add initializer for arch_setup field.
1501 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1502 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1503 instead of init_registers ().
1504 * win32-arm-low.c (init_registers_arm): Add prototype.
1505 (the_low_target): Add initializer for arch_setup field.
1506 * win32-i386-low.c (init_registers_i386): Add prototype.
1507 (the_low_target): Add initializer for arch_setup field.
1509 * spu-low.c (init_registers_spu): Add prototype.
1510 (initialize_low): Call initialie_registers_spu () instead of
1511 initialize_registers ().
1513 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1515 * server.c (handle_v_requests): When handling the vRun and vAttach
1516 packets, if already debugging a process, don't kill it. Return an
1519 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1521 * server.c (handle_query): Correct length check.
1523 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1525 * win32-low.c (do_initial_child_stuff): Add process handle
1526 parameter. Set current_process_handle and current_process_id from the
1527 parameters. Clear globals.
1528 (win32_create_inferior): Don't set current_process_handle and
1529 current_process_id here. Instead pass them on the call to
1530 do_initial_child_stuff.
1531 (win32_attach): Likewise.
1532 (win32_clear_inferiors): New.
1533 (win32_kill): Don't close the current process handle or the
1534 current thread handle here. Instead call win32_clear_inferiors.
1535 (win32_detach): Don't open a new handle to the process. Call
1536 win32_clear_inferiors.
1537 (win32_join): Don't rely on current_process_handle; open a new
1538 handle using the process id.
1539 (win32_wait): Call win32_clear_inferiors when the inferior process
1542 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1544 * server.c (monitor_show_help): Add "exit".
1546 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1548 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1549 (clean): Add reg-xtensa.c.
1550 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1551 * configure.srv (xtensa*-*-linux*) New target.
1552 * linux-xtensa-low.c: New.
1553 * xtensa-xtregs.c: New.
1555 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1557 * hostio.c: Don't include errno.h.
1558 (errno_to_fileio_errno): Move to hostio-errno.
1559 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1560 error number outputting to the target->hostio_last_error callback.
1561 (hostio_packet_error): Use FILEIO_EINVAL directly.
1562 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1563 calls to hostio_error.
1564 * hostio-errno.c: New.
1565 * server.h (hostio_last_error_from_errno): Declare.
1566 * target.h (target_ops): Add hostio_last_error member.
1567 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1568 as hostio_last_error handler.
1569 * spu-low.c (spu_target_ops): Likewise.
1570 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1571 (wince_hostio_last_error): New functions.
1572 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1573 as hostio_last_error handler.
1574 (win32_target_ops) [!_WIN32_WCE]: Register
1575 hostio_last_error_from_errno as hostio_last_error handler.
1576 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1577 (hostio-errno.o): New rule.
1578 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1579 * configure.srv (srv_hostio_err_objs): New variable. Default to
1581 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1582 * configure: Regenerate.
1584 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1586 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1587 (linux_kill, linux_detach): Clean up the process list.
1588 * remote-utils.c (remote_open): Improve port number parsing.
1589 (putpkt_binary, input_interrupt): Only send interrupts if the target
1591 * server.c (extended_protocol): Make static.
1592 (attached): Define earlier.
1593 (exit_requested, response_needed, program_argv): New variables.
1594 (target_running): New.
1595 (start_inferior): Clear attached here.
1596 (attach_inferior): Set attached here.
1597 (require_running): Define.
1598 (handle_query): Use require_running and target_running. Implement
1600 (handle_v_attach, handle_v_run): New.
1601 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1602 (gdbserver_usage): Update.
1603 (main): Redo argument parsing. Handle --debug and --multi. Handle
1604 --attach along with other options or after the port. Save
1605 program_argv. Support no initial program. Resynchronize
1606 communication with GDB after an error. Handle "monitor exit".
1607 Use require_running and target_running. Always allow the extended
1608 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1609 restart in extended mode.
1610 * README: Refer to the GDB manual. Update --attach usage.
1612 2007-12-20 Andreas Schwab <schwab@suse.de>
1614 * linux-low.c (STACK_SIZE): Define.
1615 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1616 (linux_test_for_tracefork): Likewise.
1618 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1620 * linux-low.c (linux_wait_for_event): Update messages. Do not
1621 reinsert auto-delete breakpoints.
1622 * mem-break.c (struct breakpoint): Change return type of handler to
1624 (set_breakpoint_at): Update handler type.
1625 (reinsert_breakpoint_handler): Return 1 instead of calling
1627 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1629 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1630 * mem-break.h (set_breakpoint_at): Update handler type.
1631 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1632 * win32-low.c (auto_delete_breakpoint): New.
1633 (get_child_debug_event): Use it.
1635 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1637 * configure.ac: Check for pread and pwrite.
1638 * hostio.c (handle_pread): Fall back to lseek and read.
1639 (handle_pwrite): Fall back to lseek and write.
1640 * config.in, configure: Regenerated.
1642 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1644 * server.c (myresume): Add own_buf argument.
1645 (main): Update calls.
1647 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1649 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1650 * remote-utils.c (remote_open): Do not call disable_async_io.
1651 (block_async_io): Delete.
1652 (unblock_async_io): Make static.
1653 (initialize_async_io): New.
1654 * server.c (handle_v_cont): Handle async I/O here.
1655 (myresume): Likewise. Move other common resume tasks here...
1656 (main): ... from here. Call initialize_async_io. Disable async
1657 I/O before the main loop.
1658 * server.h (initialize_async_io): Declare.
1659 (block_async_io, unblock_async_io): Delete prototypes.
1660 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1662 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1664 * remote-utils.c (readchar): Allow binary data in received messages.
1666 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1668 * win32-low.c (attaching): New global.
1669 (win32_create_inferior): Clear the `attaching' global.
1670 (win32_attach): Set the `attaching' global.
1671 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1672 attaching. Only set a breakpoint at the entry point if not
1675 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1677 * server.c (main): Don't report dll events on the initial
1678 connection on attaches.
1680 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1682 * server.c (main): Relax numerical bases supported for the pid of
1683 the --attach command line argument.
1685 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1687 * win32-low.c (win32_attach): Call OpenProcess before
1688 DebugActiveProcess, not after. Add last error output to error
1691 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1693 * win32-low.c (win32_get_thread_context)
1694 (win32_set_thread_context): New functions.
1695 (thread_rec): Use win32_get_thread_context.
1696 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1697 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1700 2007-12-03 Leo Zayas
1701 Pedro Alves <pedro_alves@portugalmail.pt>
1703 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1705 (child_add_thread): Minor cleanup.
1706 (child_continue): Resume artificially suspended threads before
1707 calling ContinueDebugEvent.
1708 (suspend_one_thread): New.
1709 (fake_breakpoint_event): New.
1710 (get_child_debug_event): Change return type to int. Check here if
1711 gdb sent an interrupt request. If a soft interrupt was requested,
1712 fake a breakpoint event. Return 0 if there is no event to handle,
1714 (win32_wait): Don't check here if gdb sent an interrupt request.
1715 Ensure there is a valid event to handle.
1716 (win32_request_interrupt): Add soft interruption method as last
1719 2007-12-03 Leo Zayas
1720 Pedro Alves <pedro_alves@portugalmail.pt>
1722 * win32-low.h (win32_thread_info): Add descriptions to the
1723 structure members. Replace `suspend_count' counter by a
1725 * win32-low.c (thread_rec): Update condition of when to get the
1726 context from the inferior. Rely on ContextFlags being set if it
1727 has already been retrieved. Only suspend the inferior thread if
1728 we haven't already. Warn if that fails.
1729 (continue_one_thread): s/suspend_count/suspended/. Only call
1730 ResumeThread once. Warn if that fails.
1732 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1734 * win32-low.c (win32_wait): Don't read from the inferior when it
1737 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1739 * Makefile.in (win32_low_h): New variable.
1740 (win32-low.o): Add dependency on $(win32_low_h).
1741 (win32-arm-low.o, win32-i386-low.o): New rules.
1743 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1745 * hostio.c: Correct copyright year.
1747 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1749 * Makefile.in (OBS): Add hostio.o.
1750 (hostio.o): New rule.
1751 * server.h (handle_vFile): Declare.
1752 * hostio.c: New file.
1753 * server.c (handle_v_requests): Take packet_len and new_packet_len
1754 for binary packets. Call handle_vFile.
1755 (main): Update call to handle_v_requests.
1757 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1759 * linux-low.c: Include <sched.h>.
1761 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1763 * linux-low.c (linux_tracefork_grandchild): New.
1764 (linux_tracefork_child): Use clone.
1765 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1767 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1769 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1771 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1773 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1775 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1777 * inferiors.c (change_inferior_id): Delete.
1778 (add_pid_to_list, pull_pid_from_list): New.
1779 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1780 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1781 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1782 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1783 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1784 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1785 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1786 (using_threads): Always set to 1.
1787 (handle_extended_wait): New.
1788 (add_process): Do not set TID.
1789 (linux_create_inferior): Set must_set_ptrace_flags.
1790 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1791 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1792 (linux_thread_alive): Rename TID argument to LWPID.
1793 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1794 (linux_wait_for_event): Do not use TID or check using_threads. Update
1795 call to dead_thread_notify. Call handle_extended_wait.
1796 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1797 (send_sigstop): Delete sigstop_sent.
1798 (wait_for_sigstop): Avoid TID.
1799 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1800 (linux_test_for_tracefork): New.
1801 (linux_lookup_signals): Use thread_db_active and
1802 linux_supports_tracefork_flag.
1803 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1804 * linux-low.h (get_process_thread): Avoid TID.
1805 (struct process_ifo): Move thread_known and tid to the end. Remove
1807 (linux_attach_lwp, thread_db_init): Update prototypes.
1808 * server.h (change_inferior_id): Delete prototype.
1809 (add_pid_to_list, pull_pid_from_list): New prototypes.
1810 * thread-db.c (thread_db_use_events): New.
1811 (find_first_thread): Rename to...
1812 (find_one_thread): ...this. Update callers and messages. Do not
1813 call fatal. Check thread_db_use_events. Do not call
1814 change_inferior_id or new_thread_notify.
1815 (maybe_attach_thread): Update. Do not call new_thread_notify.
1816 (thread_db_init): Set thread_db_use_events. Check use_events.
1817 * utils.c (fatal, warning): Correct message prefix.
1819 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1821 * Makefile.in (clean): Remove new files.
1822 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1823 (powerpc-64.o, powerpc-64.c): New rules.
1824 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1825 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1827 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1829 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1830 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1831 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1832 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1833 (target_regsets): Add AltiVec and SPE register sets.
1834 * configure.ac: Check for AltiVec and SPE.
1835 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1836 (ppc_fill_vrregset, ppc_store_vrregset): New.
1837 (target_regsets): Add AltiVec register set.
1838 * configure: Regenerated.
1840 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1842 * linux-low.c (O_LARGEFILE): Define.
1843 (linux_read_memory): Use /proc/PID/mem.
1844 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1845 * configure, config.in: Regenerated.
1847 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1849 * linux-low.c (linux_wait_for_event): Do not pass signals while
1852 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1854 * win32-low.c (create_process): New.
1855 (win32_create_inferior): Use create_process instead of
1856 CreateProcess. If create_process failed retry appending an ".exe"
1857 suffix. Store the GetLastError result immediatelly after
1858 create_process calls and use it on the call to error.
1860 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1862 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1864 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1866 * configure.ac: Switch license to GPLv3.
1868 2007-08-01 Michael Snyder <msnyder@access-company.com>
1870 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1872 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1874 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1876 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1877 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1878 CloseToolhelp32Snapshot.
1879 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1880 CloseToolhelp32Snapshot.
1882 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1884 * server.c (main): Check for inferior exit before main loop.
1886 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1888 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1889 instead of on tmp_desc.
1891 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1892 Daniel Jacobowitz <dan@codesourcery.com>
1894 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1895 (add_thread): Minor cleanups.
1896 (clear_inferiors): Move lower in the file. Clear the DLL
1898 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1899 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1900 (xml_escape_text): New.
1901 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1903 (handle_v_cont): Report errors.
1904 (gdbserver_version): Update.
1905 (main): Correct size of own_buf. Do not report initial DLL events.
1906 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1907 (unloaded_dll, xml_escape_text): New.
1908 * win32-low.c (enum target_waitkind): Update comments.
1909 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1910 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1911 (win32_EnumProcessModules, win32_GetModuleInformation)
1912 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1913 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1914 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1915 (win32_Module32First, win32_Module32Next, load_toolhelp)
1916 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1917 (get_child_debug_event): Handle DLL events.
1918 (win32_wait): Likewise.
1920 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1922 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1923 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1925 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1927 * win32-low.c (handle_output_debug_string): Ignore event if not
1930 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1932 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1934 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1936 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1938 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1940 * inferiors.c (change_inferior_id): Add comment.
1941 * linux-low.c (check_removed_breakpoint): Add an early
1942 prototype. Improve debug output.
1943 (linux_attach): Doc update.
1944 (linux_detach_one_process, linux_detach): Clean up before releasing
1946 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1947 * linux-low.h (struct process_info): Doc improvement.
1948 * mem-break.c (delete_all_breakpoints): New.
1949 * mem-break.h (delete_all_breakpoints): New prototype.
1950 * thread-db.c (find_first_thread): New.
1951 (thread_db_create_event): Call it instead of
1952 thread_db_find_new_threads. Clean up unused variables.
1953 (maybe_attach_thread): Remove first thread handling.
1954 (thread_db_find_new_threads): Use find_first_thread.
1955 (thread_db_get_tls_address): Likewise.
1957 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1959 * thread-db.c (thread_db_find_new_threads): Add prototype.
1960 (thread_db_create_event): Check for the main thread before adding
1962 (maybe_attach_thread): Only enable event reporting if TID == 0.
1963 (thread_db_get_tls_address): Check for new threads.
1965 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1967 * linux-low.c (linux_create_inferior): Try execv before execvp.
1968 * spu-low.c (spu_create_inferior): Likewise.
1970 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1972 * linux-low.c (linux_create_inferior): Change execv to execvp.
1973 * spu-low.c (spu_create_inferior): Likewies.
1975 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1977 * Makefile.in (clean): Clean new files instead of deleted ones.
1978 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1979 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1981 * configure.srv: Specify XML files and new regformats for MIPS and
1983 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1984 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1985 an entry for the restart register.
1986 (mips_cannot_fetch_register, mips_cannot_store_register)
1987 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1988 register names to match the XML descriptions.
1989 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1990 restart register instead of $0.
1992 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1993 Markus Deuling <deuling@de.ibm.com>
1995 * remote-utils.c (decode_xfer_write): New function.
1996 * server.h (decode_xfer_write): Add prototype.
1997 * server.c (handle_query): Add PACKET_LEN argument. Support
1998 qXfer:spu:read and qXfer:spu:write packets.
1999 (main): Pass packet_len to handle_query.
2000 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2001 * target.h (target_ops): Add qxfer_spu.
2003 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2005 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2006 accessing non-seekable spufs files.
2008 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2010 * server.c (handle_query): Add reply for qC packet.
2012 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2013 Leo Zayas <lerele@champenstudios@com>
2015 * server.h (check_remote_input_interrupt_request): New function.
2016 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2017 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2018 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2019 (check_remote_input_interrupt_request): New function.
2020 * server.h (check_remote_input_interrupt_request): Declare.
2021 * win32-low.c (winapi_DebugBreakProcess,
2022 winapi_GenerateConsoleCtrlEvent): New typedefs.
2023 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2025 (win32_wait): Check for remote interrupt request
2026 with check_remote_input_interrupt_request.
2027 (win32_request_interrupt): New function.
2028 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2030 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2032 * win32-low.c (debug_registers_changed,
2033 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2034 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2035 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2036 (thread_rec): Get context using the low target.
2037 (child_add_thread): Call thread_added on the low target,
2038 which does the same thing.
2040 (do_initial_child_stuff): Remove debug registers references.
2041 Set context using the low target. Resume threads after
2042 setting the contexts.
2043 (child_continue): Remove dead variable. Remove debug
2044 registers references.
2045 (child_fetch_inferior_registers): Go through the low target.
2046 (do_child_store_inferior_registers): Remove.
2047 (child_store_inferior_registers): Go through the low target.
2048 (win32_resume): Remove debug registers references.
2049 Set context using the low target.
2050 (handle_exception): Change return type to void. Don't record
2051 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2052 first chance exception.
2053 (get_child_debug_event): Change return type to void. Remove
2054 goto loop. Always return after waiting for debug event.
2055 (win32_wait): Convert to switch statement. Handle spurious
2058 * win32-i386-low.c (debug_registers_changed,
2059 debug_registers_used): New.
2060 (initial_stuff): Rename to ...
2061 (i386_initial_stuff): ... this. Clear debug registers
2063 (store_debug_registers): Delete.
2064 (i386_get_thread_context): New.
2065 (load_debug_registers): Delete.
2066 (i386_set_thread_context): New.
2067 (i386_thread_added): New.
2068 (single_step): Rename to ...
2069 (i386_single_step): ... this.
2070 (do_fetch_inferior_registers): Rename to ...
2071 (i386_fetch_inferior_register): ... this.
2072 (i386_store_inferior_register): New.
2073 (the_low_target): Adapt to new interface.
2075 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2076 (arm_get_thread_context): New.
2077 (arm_set_thread_context): New.
2079 (do_fetch_inferior_registers): Rename to ...
2080 (arm_fetch_inferior_register): ... this.
2081 (arm_store_inferior_register): New.
2082 (arm_wince_breakpoint): Reimplement as unsigned long.
2083 (arm_wince_breakpoint_len): Define.
2084 (the_low_target): Adapt to new interface.
2086 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2087 load_debug_registers. Add get_thread_context, set_thread_context,
2088 thread_added and store_inferior_register. Rename
2089 fetch_inferior_registers to fetch_inferior_register.
2090 (regptr): Remove declaration.
2092 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2094 * linux-low.c (linux_detach): Change return type to int. Return 0.
2095 * spu-low.c (spu_detach): Likewise.
2097 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2099 * target.h (target_ops): Change return type of detach to int.
2101 (join_inferior): New.
2102 * server.c (main): Don't skip detach support on mingw32.
2103 If the inferior doesn't support detaching return error.
2104 Call join_inferior instead of using waitpid.
2105 * linux-low.c (linux_join): New.
2106 (linux_target_op): Add linux_join.
2107 * spu-low.c (spu_join): New.
2108 (spu_target_ops): Add spu_join.
2109 * win32-low.c (win32_detach): Adapt to new interface.
2110 Reopen current_process_handle before detaching. Issue a child
2111 resume before detaching.
2113 (win32_target_op): Add win32_join.
2115 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2117 * win32-low.c (win32-attach): Fix return value.
2118 * target.h (target_ops): Describe ATTACH return values.
2120 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2122 * win32-low.c (GETPROCADDRESS): Define.
2123 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2124 (winapi_DebugSetProcessKillOnExit): Likewise.
2125 (win32_create_inferior): Force usage of ansi CreateProcessA.
2126 (win32_attach): Use GETPROCADDRESS.
2127 (win32_detach): Likewise.
2129 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2131 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2133 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2135 * win32-low.c: Commit leftover changes from 2007-03-29.
2137 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2139 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2140 fields short instead of int. Add explicit padding.
2141 (i387_cache_to_fsave): Remove unnecessary casts.
2142 (i387_fsave_to_cache): Doc fix.
2143 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2145 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2147 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2148 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2150 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2152 * configure.srv (arm*-*-mingw32ce*): Move near the other
2155 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2157 * configure.ac: Add errno checking.
2158 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2159 sys/file.h and malloc.h.
2160 (AC_CHECK_DECLS): Add perror.
2161 (srv_mingwce): Handle.
2162 * configure.srv (i[34567]86-*-cygwin*): Add
2163 win32-i386-low.o to srv_tgtobj.
2164 (i[34567]86-*-mingw*): Likewise.
2165 (arm*-*-mingw32ce*): Add case.
2166 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2167 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2168 [__MINGW32CE__] (strerror): New function.
2169 [__MINGW32CE__] (errno): Define to GetLastError.
2170 [__MINGW32CE__] (COUNTOF): New macro.
2171 (remote_open): Remove extra close call.
2172 * mem-break.c (delete_breakpoint_at): New function.
2173 * mem-break.h (delete_breakpoint_at): Declare.
2174 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2175 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2176 [USE_WIN32API] (read, write): Add char* casts.
2177 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2178 * server.h: Include wincecompat.h on Windows CE.
2179 [HAVE_ERRNO_H]: Check.
2180 (perror): Declare if not declared.
2181 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2182 (perror_with_name): Remove errno declaration.
2183 * wincecompat.h: New.
2184 * wincecompat.c: New.
2186 * win32-arm-low.c: New.
2187 * win32-i386-low.c: New.
2188 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2189 (OUTMSG2): Make it safe.
2191 (COUNTOF): New macro.
2192 (NUM_REGS): Get it from the low target.
2193 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2194 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2195 (thread_rec): Let low target handle debug registers.
2196 (child_add_thread): Likewise.
2197 (child_init_thread_list): Likewise.
2198 (continue_one_thread): Likewise.
2200 (do_child_fetch_inferior_registers): Move to ...
2201 * win32-i386-low.c: ... here, and rename to ...
2202 (do_fetch_inferior_registers): ... this.
2203 * win32-low.c (child_fetch_inferior_registers):
2204 Go through the low target.
2205 (do_child_store_inferior_registers): Use regptr.
2206 (strwinerror): New function.
2207 (win32_create_inferior): Handle Windows CE.
2208 Use strwinerror instead of strerror on Windows error
2209 codes. Add program to the error output.
2210 Don't close the main thread handle on Windows CE.
2211 (win32_attach): Use coredll.dll on Windows CE.
2212 (win32_kill): Close current process and current
2214 (win32_detach): Use coredll.dll on Windows CE.
2215 (win32_resume): Let low target handle debug registers, and
2217 (handle_exception): Add/Remove initial breakpoint. Avoid
2218 non-existant WSTOPSIG on Windows CE.
2219 (win32_read_inferior_memory): Cast to remove warning.
2220 (win32_arch_string): Go through the low target.
2221 (initialize_low): Call set_breakpoint_data with the low
2222 target's breakpoint.
2223 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2224 FOP_REGNUM, mappings): Move to ...
2225 * win32-i386-low.c: ... here.
2226 * win32-low.c (win32_thread_info): Move to ...
2227 * win32-low.h: ... here.
2228 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2229 win32-arm-low.c and wincecompat.c.
2230 (all:): Add $EXEEXT.
2231 (install-only:): Likewise.
2232 (gdbserver:): Likewise.
2233 (gdbreplay:): Likewise.
2234 * config.in: Regenerate.
2235 * configure: Regenerate.
2237 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2239 * win32-low.c: Rename typedef thread_info to
2240 win32_thread_info throughout.
2242 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2244 * win32-i386-low.c: Rename to ...
2245 * win32-low.c: ... this.
2246 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2247 * Makefile.in: Likewise.
2249 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2251 * remote-utils.c (monitor_output): Constify msg parameter.
2252 * server.h (monitor_output): Likewise.
2253 * win32-i386-low.c (handle_output_debug_string): New.
2254 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2255 handle_output_debug_string.
2256 (get_child_debug_event): Likewise.
2258 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2260 * server.c (main): Correct strtoul check.
2262 2007-03-27 Jon Ringle <jon@ringle.org>
2264 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2266 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2268 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2270 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2272 * terminal.h: Check HAVE_SGTTY_H.
2274 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2276 * remote-utils.c (remote_open): Print out the assigned port number.
2278 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2280 * remote-utils.c (monitor_output): New function.
2281 * server.c (debug_threads): Define here.
2282 (monitor_show_help): New function.
2283 (handle_query): Handle qRcmd.
2284 (main): Do not handle 'd' packet.
2285 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2286 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2289 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2291 * Makefile.in (EXEEXT): New.
2292 (clean): Use $(EXEEXT).
2294 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2296 * target.h (target_ops): Rename send_signal to request_interrupt,
2297 and remove enum target_signal parameter.
2298 * linux-low.c (linux_request_interrupt): Rename from
2299 linux_send_signal, and always send SIGINT.
2300 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2301 and always send SIGINT.
2302 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2304 (input_interrupt): Likewise.
2306 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2308 * server.c (get_features_xml): Check if target implemented
2310 * win32-i386-low.c (win32_arch_string): New.
2311 (win32_target_ops): Add win32_arch_string as arch_string member.
2313 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2315 * spu-low.c (spu_arch_string): New.
2316 (spu_target_ops): Add spu_arch_string.
2318 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2320 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2321 * configure.ac: Do not check for terminal.h.
2322 * configure, config.in: Regenerated.
2324 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2326 * Makefile.in (OBS): Add $(XML_BUILTIN).
2327 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2329 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2330 (arm-with-iwmmxt.c): New.
2331 * config.in, configure: Regenerate.
2332 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2333 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2334 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2335 (arm*-*-linux*): Add iWMMXt and regset support.
2336 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2337 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2338 (arm_store_wmmxregset, target_regsets): New.
2339 * server.c (get_features_xml): Take annex argument. Check builtin
2341 (handle_query): Handle multiple annexes.
2343 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2345 * remote-utils.c [USE_WIN32API] (read, write): Define.
2346 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2349 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2351 * linux-i386-low.c (the_low_target): Set arch_string.
2352 * linux-x86-64-low.c (the_low_target): Likewise.
2353 * linux-low.c (linux_arch_string): New.
2354 (linux_target_ops): Add it.
2355 * linux-low.h (struct linux_target_ops): Add arch_string.
2356 * server.c (write_qxfer_response): Use const void * for DATA.
2357 (get_features_xml): New.
2358 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2359 * target.h (struct target_ops): Add arch_string method.
2361 2007-01-03 Denis Pilat <denis.pilat@st.com>
2362 Daniel Jacobowitz <dan@codesourcery.com>
2364 * linux-low.c (linux_kill): Handle being called with no threads.
2365 * win32-i386-low.c (win32_kill): Likewise.
2366 (get_child_debug_event): Clear current_process_handle.
2368 2006-12-30 Denis PILAT <denis.pilat@st.com>
2369 Daniel Jacobowitz <dan@codesourcery.com>
2371 * remote-utils.c (remote_open): Check the type of specified
2372 serial port devices before opening them.
2373 * server.c (main): Kill the inferior if an error occurs during
2374 the first remote_open.
2376 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2378 * README: Update supported targets.
2380 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2382 * Makefile.in (clean): Remove reg-mips64.c.
2383 (reg-mips64.c, reg-mips64.o): New rules.
2384 * configure.srv: Handle mips64. Include regset support for mips.
2385 * linux-mips-low.c (union mips_register): New.
2386 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2387 (mips_breakpoint, mips_breakpoint_at): Use int.
2388 (mips_collect_register, mips_supply_register)
2389 (mips_collect_register_32bit, mips_supply_register_32bit)
2390 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2391 (mips_store_fpregset, target_regsets): New.
2392 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2394 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2396 * configure.srv: Add target "spu*-*-*".
2397 * Makefile.in (clean): Remove reg-spu.c.
2398 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2399 * spu-low.c: New file.
2401 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2403 * configure.ac: Correct td_thr_tls_get_addr test.
2404 * configure: Regenerated.
2406 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2408 * linux-low.c (linux_wait_for_event): Reformat. Use the
2410 * remote-utils.c (decode_address_to_semicolon): New.
2411 * server.c (pass_signals, handle_general_set): New.
2412 (handle_query): Mention QPassSignals for qSupported.
2413 (main): Call handle_general_set.
2414 * server.h (pass_signals, decode_address_to_semicolon): New.
2416 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2418 * server.c (handle_query): Correct error handling for read_auxv.
2420 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2422 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2423 and srv_linux_thread_db to yes.
2424 * linux-s390-low.c (s390_fill_gregset): New function.
2425 (target_regsets): Define data structure.
2427 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2429 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2430 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2431 * config.in, configure: Regenerated.
2432 * inferiors.c (gdb_id_to_thread): New function.
2433 (gdb_id_to_thread_id): Use it.
2434 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2435 * linux-low.h (struct process_info): Add th member.
2436 (thread_db_get_tls_address): New prototype.
2437 * remote-utils.c (decode_address): Make non-static.
2438 * server.c (handle_query): Handle qGetTLSAddr.
2439 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2440 * target.h (struct target_ops): Add get_tls_address.
2441 * thread-db.c (maybe_attach_thread): Save the thread handle.
2442 (thread_db_get_tls_address): New.
2444 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2446 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2447 (linux_resume_one_process): Take a siginfo_t *. Update all
2448 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2449 (struct pending_signals): Add a siginfo_t.
2450 (linux_wait_for_process): Always set last_status.
2451 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2452 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2453 * linux-low.h (struct process_info): Add last_status.
2455 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2457 * remote-utils.c (try_rle): New function.
2458 (putpkt_binary): Use it.
2460 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2462 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2463 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2464 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2465 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2466 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2469 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2471 * server.c (terminal_fd): New variable.
2472 (old_foreground_pgrp): Likewise.
2473 (restore_old_foreground_pgrp): New function.
2474 (start_inferior): Record the terminal file descriptor in terminal_fd
2475 and its original foreground group in old_foreground_pgrp. Register
2476 restore_old_foreground_pgrp with atexit().
2478 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2480 * server.c (handle_query): Correct qPart to qXfer.
2482 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2484 * configure.ac: Check for more headers which are missing on
2485 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2486 * configure.srv: Add Cygwin and mingw32.
2487 * remote-utils.c: Don't include headers unconditionally which
2488 are missing on mingw32. Include <winsock.h> for mingw32.
2489 (remote_open): Adjust for mingw32 support. Flush
2490 standard error after writing to it.
2491 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2492 (unblock_async_io, enable_async_io, disable_async_io)
2493 (readchar, getpkt): Update for Winsock support.
2494 (prepare_resume_reply): Expect a protocol signal number.
2495 * server.c: Disable <sys/wait.h> on mingw32.
2496 (start_inferior): Adjust for mingw32 support. Flush
2497 standard error after writing to it.
2498 (attach_inferior): Likewise. Use protocol signal
2500 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2502 * win32-i386-low.c: New file.
2503 * Makefile.in (XM_CLIBS): Set.
2504 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2505 (win32-i386-low.o): New dependency rule.
2506 * linux-low.c (linux_wait): Use target signal numbers.
2507 * target.h (struct target_ops): Doc fix.
2508 * server.h (target_signal_to_name): New prototype.
2509 * gdbreplay.c: Don't include headers unconditionally which
2510 are missing on mingw32. Include <winsock.h> for mingw32.
2511 (remote_close, remote_open): Adjust for Winsock support.
2512 * configure, config.in: Regenerated.
2514 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2516 * server.c (decode_xfer_read, write_qxfer_response): New.
2517 (handle_query): Take a packet length argument. Handle
2518 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2519 the qSupported response.
2520 (main): Update call to handle_query.
2522 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2524 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2525 (putpkt_binary): Renamed from putpkt and adjusted for binary
2527 (putpkt): New wrapper for putpkt_binary.
2528 (readchar): Don't mask off the high bit.
2529 (decode_X_packet): New function.
2530 * server.c (main): Call putpkt_binary if a handler sets the packet
2531 length. Save the length of the incoming packet. Handle 'X'.
2532 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2534 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2536 * server.c (handle_query): Handle qSupported.
2538 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2540 * remote-utils.c (all_symbols_looked_up): New variable.
2541 (look_up_one_symbol): Check it.
2542 * server.h (look_up_one_symbol): New declaration.
2543 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2545 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2547 * Makefile.in (linux-arm-low.o): Update dependencies.
2548 * linux-arm-low.c: Include "gdb_proc_service.h".
2549 (PTRACE_GET_THREAD_AREA): Define.
2550 (ps_get_thread_area): New function.
2552 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2554 * configure.srv (m68k*-*-uclinux*): New target.
2555 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2556 (linux_resume_one_process): Remove extraneous cast.
2557 (linux_read_offsets): New.
2558 (linux_target_op): Add linux_read_offsets on mmuless systems.
2559 * server.c (handle_query): Add qOffsets logic.
2560 * target.h (struct target_ops): Add read_offsets.
2562 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2564 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2565 (PTRACE_GET_THREAD_AREA): Define.
2566 (ps_get_thread_area): New function.
2567 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2568 (linux-x86-64-low.o): Update.
2570 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2572 * configure.ac: Remove checks for prfpregset_t.
2573 * gdb_proc_service.h: New file.
2574 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2575 new "gdb_proc_service.h".
2576 * proc-service.c: Likewise.
2577 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2578 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2579 * Makefile.in (gdb_proc_service_h): Updated.
2580 * configure, config.in: Regenerated.
2582 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2584 * remote-utils.c (prepare_resume_reply): Move declaration
2585 of gdb_id_from_wait to the top of the block.
2587 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2589 * linux-low.c (regsets_store_inferior_registers): Read the regset
2590 from the target before filling it.
2592 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2594 * server.c (attach_inferior): Return SIGTRAP for a successful
2597 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2599 * Makefile.in (OBS): Add version.o.
2600 (STAGESTUFF): Delete.
2601 (version.o): Add dependencies.
2602 (version.c): Replace rule.
2603 (clean): Remove version.c.
2604 * server.c (gdbserver_version): New.
2605 (gdbserver_usage): Use printf.
2606 (main): Handle --version and --help.
2607 * server.h (version, host_name): Add declarations.
2609 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2621 * linux-x86-64-low.c:
2624 * linux-ppc64-low.c:
2633 * linux-crisv32-low.c:
2645 * gdbserver.1: Add (C) after Copyright. Update the FSF
2648 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2650 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2651 (arm_breakpoint_at): Recognize both breakpoints.
2652 (the_low_target): Use the correct breakpoint instruction.
2654 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2656 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2657 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2658 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2659 (the_low_target): Update.
2661 2005-10-25 Andreas Schwab <schwab@suse.de>
2663 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2665 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2666 (ia64_num_regs): Reduce to 462.
2668 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2670 * acinclude.m4: Correct quoting.
2671 * aclocal.m4: Regenerated.
2673 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2674 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2675 (thread_db_init): Call thread_db_err_str.
2676 * configure.ac: Check for TD_VERSION.
2677 * config.in, configure: Regenerated.
2679 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2681 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2683 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2685 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2686 is not available. Define HAVE_PTRACE_GETREGS if it is.
2687 * config.in, configure: Regenerated.
2688 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2689 * linux-i386-low.c, linux-m68k-low.c: Update to use
2690 HAVE_PTRACE_GETREGS.
2691 * linux-low.c (regsets_fetch_inferior_registers)
2692 (regsets_store_inferior_registers): Only return 0 if we processed
2694 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2695 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2697 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2699 * inferiors.c (struct thread_info): Add gdb_id.
2700 (add_thread): Add gdb_id argument.
2701 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2702 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2703 calls to add_thread.
2704 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2705 * server.c (handle_query): Use thread_to_gdb_id.
2706 (handle_v_cont, main): Use gdb_id_to_thread_id.
2707 * server.h (add_thread): Update prototype.
2708 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2711 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2713 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2714 left-padded registers.
2715 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2716 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2718 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2720 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2721 * configure: Regenerate.
2722 * config.in: Regenerate.
2723 * server.h (NEED_DECLARATION_STRERROR):
2724 Replace with !HAVE_DECL_STRERROR.
2726 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2728 * linux-low.c (linux_wait, linux_send_signal): Don't test
2729 an unsigned long variable for > 0 if it could be MAX_ULONG.
2730 * server.c (myresume): Likewise.
2731 * target.c (set_desired_inferior): Likewise.
2733 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2735 * configure.ac: Simplify and improve check for socklen_t.
2736 * configure, config.in: Regenerate.
2738 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2740 * acconfig.h: Remove.
2741 * configure.ac: Add a test for socklen_t. Use three-argument
2742 AC_DEFINE throughout.
2743 * config.in: Regenerated using autoheader 2.59.
2744 * configure: Regenerated.
2746 * gdbreplay.c (socklen_t): Provide a default.
2747 (remote_open): Use socklen_t.
2748 * remote-utils.c (socklen_t): Provide a default.
2749 (remote_open): Use socklen_t.
2750 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2753 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2755 * linux-low.c (linux_read_memory, linux_write_memory)
2756 (linux_read_auxv): Likewise.
2757 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2758 (check_mem_write): Likewise.
2759 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2761 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2762 (registers_from_string, register_data): Likewise.
2763 * server.c (handle_query, main): Likewise.
2764 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2765 (decode_M_packet): Likewise.
2766 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2767 * target.h (struct target_ops): Update read_memory, write_memory,
2769 (read_inferior_memory, write_inferior_memory): Update.
2770 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2772 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2773 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2774 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2775 linux-s390-low.c, linux-sh-low.c: Update for changes in
2776 read_inferior_memory and the_low_target->breakpoint.
2778 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2780 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2781 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2782 * configure.srv: Add powerpc64-*-linux*.
2783 * linux-ppc64-low.c: New file.
2785 2005-05-23 Orjan Friberg <orjanf@axis.com>
2787 * linux-cris-low.c: New file with support for CRIS.
2788 * linux-crisv32-low.c: Ditto for CRISv32.
2789 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2790 (clean): Add reg-cris.c and reg-crisv32.c.
2791 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2792 reg-crisv32.o, and reg-crisv32.c to make rules.
2793 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2796 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2798 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2799 of sizeof (PTRACE_XFER_TYPE).
2800 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2802 2005-05-12 Orjan Friberg <orjanf@axis.com>
2804 * target.h (struct target_ops): Add insert_watchpoint,
2805 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2806 pointers for hardware watchpoint support.
2807 * linux-low.h (struct linux_target_ops): Ditto.
2808 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2809 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2810 to linux_target_ops.
2811 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2813 * server.c (main): Recognize 'Z' and 'z' packets.
2815 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2817 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2818 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2819 (the_low_target): Add new members.
2821 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2823 * proc-service.c (ps_lgetregs): Search all_processes instead of
2826 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2828 * server.c (start_inferior): Change return type to int.
2829 (attach_inferior): Change sigptr to int *.
2830 (handle_v_cont, handle_v_requests): Change signal to int *.
2831 (main): Change signal to int.
2833 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2835 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2836 * configure.srv: Add m32r*-*-linux*.
2837 * linux-m32r-low.c: New file.
2839 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2841 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2843 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2845 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2846 Take unsigned long arguments for PIDs.
2847 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2848 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2849 (wait_for_sigstop, linux_resume_one_process)
2850 (regsets_fetch_inferior_registers, linux_send_signal)
2851 (linux_read_auxv): Likewise. Update the types of variables holding
2852 PIDs. Update format string specifiers.
2853 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2854 * remote-utils.c (prepare_resume_reply): Likewise.
2855 * server.c (cont_thread, general_thread, step_thread)
2856 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2858 (handle_query): Update format specifiers.
2859 (handle_v_cont, main): Use strtoul for thread IDs.
2860 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2861 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2862 (general_thread, step_thread, thread_from_wait)
2863 (old_thread_from_wait): Update.
2864 * target.h (struct thread_resume): Use unsigned long for THREAD.
2865 (struct target_ops): Use unsigned long for arguments to attach and
2868 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2870 * acinclude.m4: Include bfd/bfd.m4 directly.
2871 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2872 <agriffis@toolchain.org>.
2873 * aclocal.m4, configure: Regenerated.
2875 2005-01-07 Andrew Cagney <cagney@gnu.org>
2877 * configure.ac: Rename configure.in, require autoconf 2.59.
2878 * configure: Re-generate.
2880 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2882 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2884 * aclocal.m4: Regenerated.
2885 * configure: Regenerated.
2887 2004-11-21 Andreas Schwab <schwab@suse.de>
2889 * linux-m68k-low.c (m68k_num_gregs): Define.
2890 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2891 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2892 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2893 (m68k_breakpoint_at): New. Add to the_low_target.
2895 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2896 srv_linux_thread_db to yes.
2898 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2900 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2901 (ARCH_SET_FS): Likewise.
2902 (ARCH_GET_FS): Likewise.
2903 (ARCH_GET_GS): Likewise.
2905 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2907 * linux-i386-low.c (ps_get_thread_area): New.
2908 * linux-x86-64-low.c (ps_get_thread_area): New.
2909 * linux-low.c: Include <sys/syscall.h>.
2910 (linux_kill_one_process): Don't kill the first thread here.
2911 (linux_kill): Kill the first thread here.
2912 (kill_lwp): New function.
2913 (send_sigstop, linux_send_signal): Use it.
2914 * proc-service.c: Clean up #ifdefs.
2915 (fpregset_info): Delete.
2916 (ps_lgetregs): Update and enable implementation.
2917 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2919 * remote-utils.c (struct sym_cache, symbol_cache): New.
2920 (input_interrupt): Print a clearer message.
2921 (async_io_enabled): New variable.
2922 (enable_async_io, disable_async_io): Use it. Update comments.
2923 (look_up_one_symbol): Use the symbol cache.
2924 * thread-db.c (thread_db_look_up_symbols): New function.
2925 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2927 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2929 * configure.in: Test for -rdynamic.
2930 * configure: Regenerated.
2931 * Makefile (INTERNAL_LDFLAGS): New.
2932 (gdbserver, gdbreplay): Use it.
2934 2004-09-02 Andrew Cagney <cagney@gnu.org>
2936 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2938 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2940 * linux-low.c (linux_wait): Clear all_processes list also.
2942 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2944 * linux-low.c: Include <errno.h>. Remove extern declaration of
2947 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2949 * gdbreplay.c, server.h, utils.c: Update copyright years.
2951 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2953 * server.c (main): Print child status or termination signal from
2954 variable 'signal', not 'sig'.
2956 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2958 * linux-low.c (linux_read_memory): Change return type to
2959 int. Check for and return error from ptrace().
2960 * target.c (read_inferior_memory): Change return type to int. Pass
2961 back return status from the_target->read_memory().
2962 * target.h (struct target_ops): Adapt *read_memory() prototype.
2964 (read_inferior_memory): Adapt prototype.
2965 * server.c (main): Return an error packet if
2966 read_inferior_memory() returns an error.
2968 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2970 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2971 Unify with other clean targets.
2973 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2975 * server.c (handle_v_cont): Call set_desired_inferior.
2977 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2979 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2981 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2983 * linux-low.c (linux_wait): Unblock async I/O.
2984 (linux_resume): Block and enable async I/O.
2985 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2986 * server.h (block_async_io, unblock_async_io): Add prototypes.
2988 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2990 * remote-utils.c (remote_open): Print a status notice after
2992 * server.c (attach_inferior): Print a status notice after
2995 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2997 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2999 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3001 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3003 * server.c, target.h: Update copyright years.
3005 2004-02-25 Roland McGrath <roland@redhat.com>
3007 * target.h (struct target_ops): New member `read_auxv'.
3008 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3009 * linux-low.c (linux_read_auxv): New function.
3010 (linux_target_ops): Initialize `read_auxv' member to that.
3012 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3014 Committed by Jim Blandy <jimb@redhat.com>.
3016 * linux-s390-low.c (s390_num_regs): Update.
3017 (s390_regmap): Remove control registers. Use __s390x__ predefine
3018 instead of GPR_SIZE to distiguish s390 and s390x targets.
3020 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3022 * linux-low.c: Update copyright year.
3023 (check_removed_breakpoint): Clear pending_is_breakpoint.
3024 (linux_set_resume_request, linux_queue_one_thread)
3025 (resume_status_pending_p): New functions.
3026 (linux_continue_one_thread): Use process->resume.
3027 (linux_resume): Only resume threads if there are no pending events.
3028 * linux-low.h (struct process_info): Add resume request
3031 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3033 * regcache.c (new_register_cache): Clear the allocated register
3034 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3036 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3038 * linux-low.c (linux_resume): Take a struct thread_resume *
3040 (linux_wait): Update call.
3041 (resume_ptr): New static variable.
3042 (linux_continue_one_thread): Renamed from
3043 linux_continue_one_process. Use resume_ptr.
3044 (linux_resume): Use linux_continue_one_thread.
3045 * server.c (handle_v_cont, handle_v_requests): New functions.
3046 (myresume): New function.
3047 (main): Handle 'v' case.
3048 * target.h (struct thread_resume): New type.
3049 (struct target_ops): Change argument of "resume" to struct
3051 (myresume): Delete macro.
3053 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3055 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3056 (uninstall): Support DESTDIR.
3058 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3060 * configure.srv: Add xscale*linux copy of arm*linux entry.
3062 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3064 * linux-arm-low.c (arm_reinsert_addr): New function.
3065 (the_low_target): Add arm_reinsert_addr.
3067 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3069 * mem-break.c: Remove whitespace at end of file.
3071 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3073 * configure.in: Check whether we need to prototype strerror.
3074 * server.h: Optionally prototype strerror.
3075 * gdbreplay.c (perror_with_name): Use strerror.
3076 * linux-low.c (linux_attach_lwp): Use strerror.
3077 * utils.c (perror_with_name): Use strerror.
3078 * config.in, configure: Regenerated.
3080 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3082 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3083 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3085 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3087 * Makefile.in (SFILES): Update.
3088 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3089 low-sun3.c: Remove files.
3091 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3093 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3094 (linux_detach_one_process, linux_detach): New functions.
3095 (linux_target_ops): Add linux_detach.
3096 * server.c (main): Handle 'D' packet.
3097 * target.h (struct target_ops): Add "detach" member.
3098 (detach_inferior): Define.
3100 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3102 From Kelley Cook <kelleycook@wideopenwest.com>:
3103 * configure.srv: Accept i[34567]86 variants.
3105 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3107 * linux-low.c (linux_wait_for_event): Correct comment typos.
3108 (linux_resume_one_process): Call check_removed_breakpoint.
3109 (linux_send_signal): New function.
3110 (linux_target_ops): Add linux_send_signal.
3111 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3113 * target.h (struct target_ops): Add send_signal.
3115 2003-05-29 Jim Blandy <jimb@redhat.com>
3117 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3118 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3119 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3120 away part of the register's value.
3122 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3124 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3125 (linux_wait_for_event, linux_init_signals): Likewise.
3127 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
3129 * configure.in: Check for stdlib.h.
3130 * configure: Regenerated.
3131 * config.in: Regenerated.
3133 2003-01-04 Andreas Schwab <schwab@suse.de>
3135 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3137 2003-01-02 Andrew Cagney <ac131313@redhat.com>
3139 * Makefile.in: Remove obsolete code.
3141 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3143 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3144 defined(PT_FPR0_HI).
3146 2002-11-17 Stuart Hughes <seh@zee2.com>
3148 * linux-arm-low.c (arm_num_regs): Increase.
3149 (arm_regmap): Include status register.
3151 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3153 * linux-low.c (register_addr): Remove incorrect -1 check.
3155 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3157 * linux-low.c (linux_create_inferior): Call setpgid. Return
3159 (unstopped_p, linux_signal_pid): Remove.
3160 (linux_target_ops): Remove linux_signal_pid.
3161 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3162 global instead of target method.
3163 * target.h (struct target_ops): Remove signal_pid. Update comment
3164 for create_inferior.
3165 * server.c (signal_pid): New variable.
3166 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3167 gdbserver. Set the child to be the foreground process group.
3168 (attach_inferior): Set signal_pid.
3170 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3172 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3174 2002-08-20 Jim Blandy <jimb@redhat.com>
3176 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3179 2002-08-01 Andrew Cagney <cagney@redhat.com>
3181 * Makefile.in: Make chill references obsolete.
3183 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3185 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3186 * configure: Regenerate.
3187 * config.in: Regenerate.
3189 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3191 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3192 (perror_with_name, remote_close, remote_open, expect, play): Static.
3194 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3196 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3197 byte offsets instead of an array of indexes.
3198 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3200 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3202 * regcache.c: Add comment.
3204 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3206 * thread-db.c: New file.
3207 * proc-service.c: New file.
3208 * acinclude.m4: New file.
3209 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3210 proc-service.o, and thread-db.o.
3211 (linux-low.o): Add USE_THREAD_DB.
3212 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3213 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3214 * aclocal.m4: Regenerated.
3215 * config.in: Regenerated.
3216 * configure: Regenerated.
3217 * configure.in: Check for proc_service.h, sys/procfs.h,
3218 thread_db.h, and linux/elf.h headrs.
3219 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3220 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3221 Check for -lthread_db and thread support.
3222 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3223 PowerPC, and SuperH.
3224 * i387-fp.c: Constify arguments.
3225 * i387-fp.h: Likewise.
3226 * inferiors.c: (struct thread_info): Renamed from
3227 `struct inferior_info'. Remove PID member. Use generic inferior
3228 list header. All uses updated.
3229 (inferiors, signal_pid): Removed.
3230 (all_threads): New variable.
3231 (get_thread): Define.
3232 (add_inferior_to_list): New function.
3233 (for_each_inferior): New function.
3234 (change_inferior_id): New function.
3235 (add_inferior): Removed.
3236 (remove_inferior): New function.
3237 (add_thread): New function.
3238 (free_one_thread): New function.
3239 (remove_thread): New function.
3240 (clear_inferiors): Use for_each_inferior and free_one_thread.
3241 (find_inferior): New function.
3242 (find_inferior_id): New function.
3243 (inferior_target_data): Update argument type.
3244 (set_inferior_target_data): Likewise.
3245 (inferior_regcache_data): Likewise.
3246 (set_inferior_regcache_data): Likewise.
3247 * linux-low.c (linux_bp_reinsert): Remove.
3248 (all_processes, stopping_threads, using_thrads)
3249 (struct pending_signals, debug_threads, pid_of): New.
3250 (inferior_pid): Replace with macro.
3251 (struct inferior_linux_data): Remove.
3252 (get_stop_pc, add_process): New functions.
3253 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3254 Use add_process and add_thread.
3255 (linux_attach_lwp): New function, based on old linux_attach. Use
3256 add_process and add_thread. Set stop_expected for new threads.
3257 (linux_attach): New function.
3258 (linux_kill_one_process): New function.
3259 (linux_kill): Kill all LWPs.
3260 (linux_thread_alive): Use find_inferior_id.
3261 (check_removed_breakpoints, status_pending_p): New functions.
3262 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3263 Update. Use WNOHANG. Wait for cloned processes also. Update process
3264 struct for the found process.
3265 (linux_wait_for_event): New function.
3266 (linux_wait): Use it. Support LWPs.
3267 (send_sigstop, wait_for_sigstop, stop_all_processes)
3268 (linux_resume_one_process, linux_continue_one_process): New functions.
3269 (linux_resume): Support LWPs.
3270 (REGISTER_RAW_SIZE): Remove.
3271 (fetch_register): Use register_size instead. Call supply_register.
3272 (usr_store_inferior_registers): Likewise. Call collect_register.
3274 (regsets_fetch_inferior_registers): Improve error message.
3275 (regsets_store_inferior_registers): Add debugging.
3276 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3277 (unstopped_p, linux_signal_pid): New functions.
3278 (linux_target_ops): Add linux_signal_pid.
3279 (linux_init_signals): New function.
3280 (initialize_low): Call it. Initialize using_threads.
3281 * regcache.c (inferior_regcache_data): Add valid
3283 (get_regcache): Fetch registers lazily. Add fetch argument
3284 and update all callers.
3285 (regcache_invalidate_one, regcache_invalidate): New
3287 (new_register_cache): Renamed from create_register_cache.
3288 Return the new regcache.
3289 (free_register_cache): Change argument to a void *.
3290 (registers_to_string, registers_from_string): Call get_regcache
3291 with fetch flag set.
3292 (register_data): Make static. Pass fetch flag to get_regcache.
3293 (supply_register): Call get_regcache with fetch flag clear.
3294 (collect_register): Call get_regcache with fetch flag set.
3295 (collect_register_as_string): New function.
3296 * regcache.h: Update.
3297 * remote-utils.c (putpkt): Flush after debug output and use
3299 Handle input interrupts while waiting for an ACK.
3300 (input_interrupt): Use signal_pid method.
3301 (getpkt): Flush after debug output and use stderr.
3302 (outreg): Use collect_register_as_string.
3303 (new_thread_notify, dead_thread_notify): New functions.
3304 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3306 (look_up_one_symbol): Flush after debug output.
3307 * server.c (step_thread, server_waiting): New variables.
3308 (start_inferior): Don't use signal_pid. Update call to mywait.
3309 (attach_inferior): Update call to mywait.
3310 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3311 (main): Don't fetch/store registers explicitly. Use
3312 set_desired_inferior. Support proposed ``Hs'' packet. Update
3315 (struct inferior_list, struct_inferior_list_entry): New.
3316 * target.c (set_desired_inferior): New.
3317 (write_inferior_memory): Constify.
3318 (mywait): New function.
3320 (struct target_ops): New signal_pid method.
3321 (mywait): Removed macro, added prototype.
3323 * linux-low.h (regset_func): Removed.
3324 (regset_fill_func, regset_store_func): New.
3325 (enum regset_type): New.
3326 (struct regset_info): Add type field. Use new operation types.
3327 (struct linux_target_ops): stop_pc renamed to get_pc.
3328 Add decr_pc_after_break and breakpoint_at.
3329 (get_process, get_thread_proess, get_process_thread)
3330 (strut process_info, all_processes, linux_attach_lwp)
3331 (thread_db_init): New.
3333 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3334 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3335 (the_low_target): Add new members.
3336 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3337 (i386_store_fpxregset): Constify.
3338 (target_regsets): Add new kind identifier.
3339 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3340 (i386_set_pc): Add debugging.
3341 (i386_breakpoint_at): New function.
3342 (the_low_target): Add new members.
3343 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3344 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3345 (mips_breakpoint_at): New.
3346 (the_low_target): Add new members.
3347 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3348 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3349 (the_low_target): Add new members.
3350 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3351 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3352 (the_low_target): Add new members.
3353 * linux-x86-64-low.c (target_regsets): Add new kind
3356 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3358 From Martin Pool <mbp@samba.org>:
3359 * server.c (gdbserver_usage): New function.
3362 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3364 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3367 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3369 * Makefile.in: Remove obsolete code.
3371 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3373 * linux-low.c (regsets_fetch_inferior_registers),
3374 (regsets_store_inferior_registers): Removed cast to int from
3376 * regcache.h: Added declaration of struct inferior_info.
3378 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3380 * inferiors.c (struct inferior_info): Add regcache_data.
3381 (add_inferior): Call create_register_cache.
3382 (clear_inferiors): Call free_register_cache.
3383 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3384 * regcache.c (struct inferior_regcache_data): New.
3385 (registers): Remove.
3386 (get_regcache): New function.
3387 (create_register_cache, free_register_cache): New functions.
3388 (set_register_cache): Don't initialize the register cache here.
3389 (registers_to_string, registers_from_string, register_data): Call
3391 * regcache.h: Add prototypes.
3392 * server.h: Likewise.
3394 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3396 * mem-break.c: New file.
3397 * mem-break.h: New file.
3398 * Makefile.in: Add mem-break.o rule; update server.h
3400 * inferiors.c (struct inferior_info): Add target_data
3402 (clear_inferiors): Free target_data member if set.
3403 (inferior_target_data, set_inferior_target_data): New functions.
3404 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3405 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3406 * linux-low.c (linux_bp_reinsert): New variable.
3407 (struct inferior_linux_data): New.
3408 (linux_create_inferior): Use set_inferior_target_data.
3409 (linux_attach): Likewise. Call add_inferior.
3410 (linux_wait_for_one_inferior): New function.
3411 (linux_wait): Call it.
3412 (linux_write_memory): Add const.
3413 (initialize_low): Call set_breakpoint_data.
3414 * linux-low.h (struct linux_target_ops): Add breakpoint
3416 * server.c (attach_inferior): Remove extra add_inferior
3418 * server.h: Include mem-break.h. Update inferior.c
3420 * target.c (read_inferior_memory)
3421 (write_inferior_memory): New functions.
3422 * target.h (read_inferior_memory)
3423 (write_inferior_memory): Change macros to prototypes.
3424 (struct target_ops): Update comments. Add const to write_memory
3427 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3429 * linux-low.c (usr_store_inferior_registers): Support
3430 registers which are allowed to fail to store.
3431 * linux-low.h (linux_target_ops): Likewise.
3432 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3433 (ppc_cannot_store_register): FPSCR may not be storable.
3435 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3437 * server.h: Include <string.h> if HAVE_STRING_H.
3438 * ChangeLog: Correct paths in last ChangeLog entry.
3440 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3442 * linux-low.h: Remove obsolete prototypes.
3443 (struct linux_target_ops): New.
3444 (extern the_low_target): New.
3445 * linux-low.c (num_regs, regmap): Remove declarations.
3446 (register_addr): Use the_low_target explicitly.
3447 (fetch_register): Likewise.
3448 (usr_fetch_inferior_registers): Likewise.
3449 (usr_store_inferior_registers): Likewise.
3450 * linux-arm-low.c (num_regs): Remove.
3451 (arm_num_regs): Define.
3452 (arm_regmap): Renamed from regmap, made static.
3453 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3455 (arm_cannot_store_register): Renamed from cannot_store_register,
3457 (the_low_target): New.
3458 * linux-i386-low.c (num_regs): Remove.
3459 (i386_num_regs): Define.
3460 (i386_regmap): Renamed from regmap, made static.
3461 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3463 (i386_cannot_store_register): Renamed from cannot_store_register,
3465 (the_low_target): New.
3466 * linux-ia64-low.c (num_regs): Remove.
3467 (ia64_num_regs): Define.
3468 (ia64_regmap): Renamed from regmap, made static.
3469 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3471 (ia64_cannot_store_register): Renamed from cannot_store_register,
3473 (the_low_target): New.
3474 * linux-m68k-low.c (num_regs): Remove.
3475 (m68k_num_regs): Define.
3476 (m68k_regmap): Renamed from regmap, made static.
3477 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3479 (m68k_cannot_store_register): Renamed from cannot_store_register,
3481 (the_low_target): New.
3482 * linux-mips-low.c (num_regs): Remove.
3483 (mips_num_regs): Define.
3484 (mips_regmap): Renamed from regmap, made static.
3485 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3487 (mips_cannot_store_register): Renamed from cannot_store_register,
3489 (the_low_target): New.
3490 * linux-ppc-low.c (num_regs): Remove.
3491 (ppc_num_regs): Define.
3492 (ppc_regmap): Renamed from regmap, made static.
3493 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3495 (ppc_cannot_store_register): Renamed from cannot_store_register,
3497 (the_low_target): New.
3498 * linux-s390-low.c (num_regs): Remove.
3499 (s390_num_regs): Define.
3500 (s390_regmap): Renamed from regmap, made static.
3501 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3503 (s390_cannot_store_register): Renamed from cannot_store_register,
3505 (the_low_target): New.
3506 * linux-sh-low.c (num_regs): Remove.
3507 (sh_num_regs): Define.
3508 (sh_regmap): Renamed from regmap, made static.
3509 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3511 (sh_cannot_store_register): Renamed from cannot_store_register,
3513 (the_low_target): New.
3514 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3515 (the_low_target): New.
3517 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3519 * Makefile.in: Add stamp-h target.
3520 * configure.in: Create stamp-h.
3521 * configure: Regenerated.
3523 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3525 * inferiors.c: New file.
3526 * target.c: New file.
3527 * target.h: New file.
3528 * Makefile.in: Add target.o and inferiors.o. Update
3530 * linux-low.c (inferior_pid): New static variable,
3531 moved from server.c.
3532 (linux_create_inferior): Renamed from create_inferior.
3533 Call add_inferior. Return 0 on success instead of a PID.
3534 (linux_attach): Renamed from myattach.
3535 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3536 (linux_thread_alive): Renamed from mythread_alive.
3537 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3539 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3540 (regsets_store_inferior_registers): Correct error message.
3541 Add missing ``return 0''.
3542 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3543 (linux_store_registers): Renamed from store_inferior_registers.
3544 (linux_read_memory): Renamed from read_inferior_memory.
3545 (linux_write_memory): Renamed from write_inferior_memory.
3546 (linux_target_ops): New structure.
3547 (initialize_low): Call set_target_ops ().
3548 * remote-utils.c (unhexify): New function.
3549 (hexify): New function.
3550 (input_interrupt): Send signals to ``signal_pid''.
3551 * server.c (inferior_pid): Remove.
3552 (start_inferior): Update create_inferior call.
3553 (attach_inferior): Call add_inferior.
3554 (handle_query): New function.
3555 (main): Call handle_query for `q' packets.
3556 * server.h: Include "target.h". Remove obsolete prototypes.
3557 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3559 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3561 * Makefile.in: Add WARN_CFLAGS. Update configury
3563 * configure.in: Check for <string.h>
3564 * configure: Regenerate.
3565 * config.in: Regenerate.
3566 * gdbreplay.c: Include needed system headers.
3567 (remote_open): Remove strchr prototype.
3568 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3569 * regcache.c (supply_register): Change buf argument to const void *.
3570 (supply_register_by_name): Likewise.
3571 (collect_register): Change buf argument to void *.
3572 (collect_register_by_name): Likewise.
3573 * regcache.h: Add missing prototypes.
3574 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3575 * server.c (handle_query): New function.
3576 (attached): New static variable, moved out of main.
3577 (main): Quiet longjmp clobber warnings.
3578 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3579 * utils.c (error): Remove NORETURN.