1 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3 * Makefile.in (clean): Remove new generated files.
4 (reg-s390.o, reg-s390.c): Remove rules.
5 (reg-s390x.o, reg-s390x.c): Likewise.
6 (s390-linux32.o, s390-linux32.c): Add rules.
7 (s390-linux64.o, s390-linux64.c): Likewise.
8 (s390x-linux64.o, s390x-linux64.c): Likewise.
9 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10 * linux-s390-low.c: Include <elf.h>.
11 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12 (init_registers_s390): Remove prototype.
13 (init_registers_s390x): Likewise.
14 (init_registers_s390_linux32): Add prototype.
15 (init_registers_s390_linux64): Likewise.
16 (init_registers_s390x_linux64): Likewise.
17 (s390_num_regs_3264): New define.
18 (s390_regmap_3264): New global variable.
19 (s390_cannot_fetch_register): Remove obsolete check.
20 (s390_cannot_store_register): Likewise.
21 (s390_collect_ptrace_register): Handle upper/lower register halves.
22 (s390_supply_ptrace_register): Likewise.
23 (s390_fill_gregset): Update to register number changes.
24 (s390_get_hwcap): New routine.
25 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
26 Install appropriate regmap and register set.
28 2010-01-01 Joel Brobecker <brobecker@adacore.com>
30 * server.c (gdbserver_version): Update copyright year to 2010.
31 * gdbreplay.c (gdbreplay_version): Likewise.
33 2009-12-28 Doug Evans <dje@google.com>
35 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
36 elf/external.h. Include <elf.h> instead but only if necessary.
38 2009-12-28 Pedro Alves <pedro@codesourcery.com>
40 * linux-low.c (linux_remove_process): Remove `detaching'
41 parameter. Don't release/detach from thread_db here.
42 (linux_kill): Release/detach from thread_db here, ...
43 (linux_detach): ... and here, before actually detaching.
44 (linux_wait_1): ... and here, when a process exits.
45 * thread-db.c (any_thread_of): New.
46 (thread_db_free): Switch the current inferior to a thread of the
49 2009-12-21 Doug Evans <dje@google.com>
51 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
53 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
54 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
55 warning ifndef __NR_tkill. Move setting of errno there too.
56 Delete unnecessary resetting of errno after syscall.
57 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
59 * configure.ac: Check for dladdr.
60 * config.in: Regenerate.
61 * configure: Regenerate.
62 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
63 (try_thread_db_load): Update.
65 * linux-low.c (my_waitpid): Delete unnecessary prototype.
67 2009-12-18 Doug Evans <dje@google.com>
69 * event-loop.c: Include unistd.h if it exists.
71 * linux-low.c (my_waitpid): Move definition away from being in
72 between linux_tracefork_child/linux_test_for_tracefork.
74 * gdb_proc_service.h (psaddr_t): Fix type.
75 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
76 signature to match glibc.
78 2009-12-16 Doug Evans <dje@google.com>
80 * linux-low.c (linux_read_memory): Fix argument to read.
82 2009-11-26 Pedro Alves <pedro@codesourcery.com>
84 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
85 events, don't leave current_inferior pointing at null.
87 2009-11-26 Pedro Alves <pedro@codesourcery.com>
89 * win32-low.c (LOG): Delete.
90 (OUTMSG): Output to stderr.
91 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
92 on compile time LOG macro.
93 (win32_wait): Fix debug output.
95 2009-11-26 Pedro Alves <pedro@codesourcery.com>
97 * win32-low.c (win32_add_one_solib): If the dll name is
98 "ntdll.dll", prepend the system directory to the dll path.
100 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
102 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
104 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
105 Vladimir Prus <vladimir@codesourcery.com>
107 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
108 * configure.ac: Check for __mcoldfire__ and set
109 gdb_cv_m68k_is_coldfire.
110 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
111 reg-cf.o and reg-m68k.o.
112 * configure: Regenerated.
114 2009-11-16 Pedro Alves <pedro@codesourcery.com>
116 * linux-low.c (linux_remove_process): Add `detaching' parameter.
117 Pass it to thread_db_free.
118 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
119 proper `detaching' argument to linux_remove_process.
120 * linux-low.h (thread_db_free): Add `detaching' parameter.
121 * thread-db.c (thread_db_init): Pass false as `detaching' argument
123 (thread_db_free): Add `detaching' parameter. Only
124 call td_ta_clear_event if detaching from process.
126 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
128 * thread-db.c (thread_db_free): Fix typo.
130 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
133 * thread-db.c (thread_db_free): Call td_ta_clear_event.
135 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
137 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
138 with an i686 compiler.
139 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
141 * configure: Rebuilt.
143 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
147 * server.c (handle_search_memory_1): Correct read_addr initialization
148 in loop for searching subsequent chunks.
150 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
152 * configure.ac: New --with-libthread-db option.
153 * thread-db.c: Allow direct dependence on libthread_db.
154 (thread_db_free): Adjust.
155 * config.in: Regenerate.
156 * configure: Likewise.
158 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
161 * thread-db.c (attach_thread): New function.
162 (maybe_attach_thread): Return success/failure.
163 (find_new_threads_callback): Adjust.
164 (thread_db_find_new_threads): Loop until no new threads.
166 2009-10-13 Pedro Alves <pedro@codesourcery.com>
168 * proc-service.c (ps_lgetregs): Formatting.
170 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
172 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
173 * configure.ac: Adjust.
174 * linux-low.h (struct process_info_private): Move members to struct
176 (thread_db_free, thread_db_handle_monitor_command): New prototype.
177 * linux-low.c (linux_remove_process): Adjust.
178 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
179 * server.c (handle_query): Move code ...
180 (handle_monitor_command): ... here. New function.
181 * target.h (struct target_ops): New member.
182 * thread-db.c (struct thread_db): New.
183 (libthread_db_search_path): New variable.
184 (thread_db_create_event, thread_db_enable_reporting)
185 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
186 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
187 (try_thread_db_load_1, dladdr_to_soname): New functions.
188 (try_thread_db_load, thread_db_load_search): New functions.
189 (thread_db_init): Search for libthread_db.
190 (thread_db_free): New function.
191 (thread_db_handle_monitor_command): Likewise.
192 * config.in: Regenerate.
193 * configure: Regenerate.
195 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
197 * spu-low.c (spu_kill): Wait for inferior to terminate.
198 Call clear_inferiors.
199 (spu_detach): Call clear_inferiors.
201 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
203 * aclocal.m4: Regenerate.
204 * config.in: Likewise.
205 * configure: Likewise.
207 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
209 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
210 (parse_spufs_run): New function.
211 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
212 (ppc_breakpoint_at): Handle SPU breakpoints.
214 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
216 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
217 (SPUFS_MAGIC): Define.
218 (spu_enumerate_spu_ids): New function.
219 (linux_qxfer_spu): New function.
220 (linux_target_ops): Install linux_qxfer_spu.
222 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
224 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
225 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
226 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
227 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
228 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
229 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
230 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
231 (init_registers_powerpc_cell32l): Add prototype.
232 (init_registers_powerpc_cell64l): Likewise.
233 (ppc_arch_setup): Detect Cell/B.E. architecture.
235 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
237 * Makefile.in (datarootdir): New variable.
239 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
241 * linux-low.c (linux_write_memory): Update debugging output.
242 * Makefile.in (clean): Add new descriptions.
243 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
244 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
245 * configure.srv: Add new files for arm*-*-linux*.
246 * linux-arm-low.c: Add new declarations.
247 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
248 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
249 (HWCAP_VFPv3D16): New.
250 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
251 instead of __IWMMXT__.
252 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
253 (arm_arch_setup): New.
254 (target_regsets): Remove #ifdef. Add VFP regset.
255 (the_low_target): Use arm_arch_setup.
257 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
259 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
260 the main thread again.
262 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
264 Adding Neutrino gdbserver.
265 * configure: Regenerated.
266 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
267 * configure.srv (i[34567]86-*-nto*): New target.
268 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
269 * remote-utils.c [__QNX__]: Include sys/iomgr.h
270 (nto_comctrl) [__QNX__]: New function.
271 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
273 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
275 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
278 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
279 Pedro Alves <pedro@codesourcery.com>
281 * win32-i386-low.c (i386_get_thread_context): Handle systems that
282 don't support CONTEXT_EXTENDED_REGISTERS.
283 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
284 (the_low_target): Install them.
285 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
286 failing with ERROR_PIPE_NOT_CONNECTED.
288 2009-06-30 Doug Evans <dje@google.com>
289 Pierre Muller <muller@ics.u-strasbg.fr>
291 Add h/w watchpoint support to x86-linux, win32-i386.
292 * Makefile.in (SFILES): Add i386-low.c
293 (i386_low_h): Define.
294 (i386-low.o): Add dependencies.
295 (linux-x86-low.o): Add i386-low.h dependency.
296 (win32-i386-low.o): Ditto.
297 * i386-low.c: New file.
298 * i386-low.h: New file.
299 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
300 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
301 * linux-low.c (linux_add_process): Initialize arch_private.
302 (linux_remove_process): Free arch_private.
303 (add_lwp): Initialize arch_private.
304 (delete_lwp): Free arch_private.
305 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
307 * linux-low.h (process_info_private): New member arch_private.
308 (lwp_info): New member arch_private.
309 (linux_target_ops): New members new_process, new_thread,
311 (ptid_of): New macro.
312 * linux-x86-low.c: Include stddef.h, i386-low.h.
313 (arch_process_info): New struct.
314 (arch_lwp_info): New struct.
315 (x86_linux_dr_get, x86_linux_dr_set): New functions.
316 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
317 (i386_dr_low_get_status): New function.
318 (x86_insert_point, x86_remove_point): New functions.
319 (x86_stopped_by_watchpoint): New function.
320 (x86_stopped_data_address): New function.
321 (x86_linux_new_process, x86_linux_new_thread): New functions.
322 (x86_linux_prepare_to_resume): New function.
323 (the_low_target): Add entries for insert_point, remove_point,
324 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
326 * server.c (debug_hw_points): New global.
327 (monitor_show_help): Document set debug-hw-points.
328 (handle_query): Process "set debug-hw-points".
329 * server.h (debug_hw_points): Declare.
331 * utils.c (NUMCELLS, CELLSIZE): New macros.
332 (get_sell, xsnprintf, paddress): New functions.
333 * win32-arm-low.c (the_low_target): Add entries for insert_point,
334 remove_point, stopped_by_watchpoint, stopped_data_address.
335 * win32-i386-low.c: Include i386-low.h.
336 (debug_reg_state): Replaces dr.
337 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
338 (i386_dr_low_get_status): New function.
339 (i386_insert_point, i386_remove_point): New functions.
340 (i386_stopped_by_watchpoint): New function.
341 (i386_stopped_data_address): New function.
342 (i386_initial_stuff): Update.
343 (get_thread_context,set_thread_context,i386_thread_added): Update.
344 (the_low_target): Add entries for insert_point,
345 remove_point, stopped_by_watchpoint, stopped_data_address.
346 * win32-low.c (win32_insert_watchpoint): New function.
347 (win32_remove_watchpoint): New function.
348 (win32_stopped_by_watchpoint): New function.
349 (win32_stopped_data_address): New function.
350 (win32_target_ops): Add entries for insert_watchpoint,
351 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
352 * win32-low.h (win32_target_ops): New members insert_point,
353 remove_point, stopped_by_watchpoint, stopped_data_address.
355 2009-06-25 Pedro Alves <pedro@codesourcery.com>
357 * server.c (process_serial_event): Re-return unsupported, not
358 error, if the type isn't recognized. Re-allow supporting only
359 insert or remove packets. Also call require_running for
360 breakpoints. Add missing break statement to default case. Tidy.
361 * target.h (struct target_ops): Rename insert_watchpoint to
362 insert_point, and remove_watchpoint to remove_point.
364 * linux-low.h (struct linux_target_ops): Likewise.
365 * linux-low.c (linux_insert_watchpoint): Rename to ...
366 (linux_insert_point): ... this. Adjust.
367 (linux_remove_watchpoint): Rename to ...
368 (linux_remove_point): ... this. Adjust.
369 (linux_target_ops): Adjust.
370 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
371 (cris_insert_point): ... this.
372 (cris_remove_watchpoint): Rename to ...
373 (cris_remove_point): ... this.
374 (the_low_target): Adjust.
376 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
378 * server.c (handle_v_kill): Pass signal_pid to
379 kill_inferior if multi_process is zero.
381 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
383 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
384 * target.h (target_ops): Comment for *_watchpoint to make it clear
385 the functions can get types '0' and '1'.
387 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
389 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
390 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
391 * regcache.c (get_regcache): Likewise.
392 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
393 * win32-low.c (child_fetch_inferior_registers): Remove check for
396 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
397 Pedro Alves <pedro@codesourcery.com>
399 * target.h (struct target_ops) <supports_multi_process>: New
401 (target_supports_multi_process): New.
402 * server.c (handle_query): Even if GDB reports support, only
403 enable multi-process if the target also supports it. Report
404 multi-process support only if the target backend supports it.
405 * linux-low.c (linux_supports_multi_process): New function.
406 (linux_target_ops): Install it as target_supports_multi_process
409 2009-05-24 Doug Evans <dje@google.com>
411 Global renaming of find_thread_pid to find_thread_ptid.
412 * server.h (find_thread_ptid): Renamed from find_thread_pid.
413 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
416 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
417 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
420 * linux-low.c (get_stop_pc): Print pc if debug_threads.
421 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
422 (linux_resume_one_lwp): Ditto.
424 2009-05-23 Doug Evans <dje@google.com>
426 * linux-low.c (linux_resume_one_lwp): Change type of first arg
427 from struct inferior_list_entry * to struct lwp_info *.
430 2009-05-13 Doug Evans <dje@google.com>
432 * linux-x86-low.c: Don't include assert.h.
433 (x86_siginfo_fixup): Use fatal, not assert.
434 (x86_arch_setup): Fix comment.
436 2009-05-12 Doug Evans <dje@google.com>
438 Biarch support for i386/amd64 gdbserver.
439 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
441 (linux-i386-low.o, linux-x86-64-low.o): Delete.
442 (linux-x86-low.o): Add.
443 * linux-x86-64-low.c: Delete.
444 * linux-i386-low.c: Delete.
445 * linux-x86-low.c: New file.
446 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
448 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
450 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
451 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
452 (linux_child_pid_to_exec_file): New function.
453 (elf_64_header_p, elf_64_file_p): New functions.
454 (siginfo_fixup): New function.
455 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
456 give target a chance to convert layout.
457 * linux-low.h (linux_target_ops): New member siginfo_fixup.
458 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
460 2009-05-07 Doug Evans <dje@google.com>
462 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
463 (regsets_store_inferior_registers): Ditto.
465 2009-05-06 Pedro Alves <pedro@codesourcery.com>
469 * linux-low.c (must_set_ptrace_flags): Delete.
470 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
472 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
473 `lwp->must_set_ptrace_flags' instead.
474 (linux_wait_for_event_1): Set ptrace options here.
475 (linux_wait_1): ... not here.
477 2009-04-30 Doug Evans <dje@google.com>
479 * inferiors.c (started_inferior_callback): New function.
480 (attached_inferior_callback): New function.
481 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
482 * server.c (print_started_pid, print_attached_pid): New functions.
483 (detach_or_kill_for_exit): New function.
484 (main): Call it instead of for_each_inferior (kill_inferior_callback).
485 * server.h (have_started_inferiors_p): Declare.
486 (have_attached_inferiors_p): Declare.
488 * inferiors.c (remove_process): Fix memory leak, free process.
489 * linux-low.c (linux_remove_process): New function.
490 (linux_kill): Call it instead of remove_process.
491 (linux_detach, linux_wait_1): Ditto.
493 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
495 * configure.srv: Add x86 Windows CE target.
497 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
499 * inferiors.c (get_thread_process): Make global.
500 * server.h (get_thread_process): Add prototype.
501 * thread-db.c (find_one_thread): Use get_thread_process
502 instead of current_process.
503 (thread_db_get_tls_address): Do not crash if called when
504 thread layer is not yet initialized.
506 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
508 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
509 * spu-low.c (current_tid): Rename to ...
510 (current_ptid): ... this.
511 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
512 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
513 ptid_get_lwp (current_ptid) instead of current_tid.
514 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
515 instead of current_tid. Use find_process_pid to verify pid
516 argument is valid. Pass proper argument to remove_process.
517 (spu_thread_alive): Compare current_ptid instead of current_tid.
518 (spu_resume): Likewise.
520 2009-04-02 Pedro Alves <pedro@codesourcery.com>
522 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
525 2009-04-01 Pedro Alves <pedro@codesourcery.com>
527 Implement the multiprocess extensions, and add linux multiprocess
530 * server.h (ULONGEST): Declare.
531 (struct ptid, ptid_t): New.
532 (minus_one_ptid, null_ptid): Declare.
533 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
534 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
535 (struct inferior_list_entry): Change `id' type from unsigned from
537 (struct sym_cache, struct breakpoint, struct
538 process_info_private): Forward declare.
539 (struct process_info): Declare.
540 (current_process): Declare.
541 (all_processes): Declare.
542 (initialize_inferiors): Declare.
543 (add_thread): Adjust to use ptid_t.
544 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
545 (add_process, remove_process, find_thread_pid): Declare.
546 (find_inferior_id): Adjust to use ptid_t.
547 (cont_thread, general_thread, step_thread): Change type to ptid_t.
548 (multi_process): Declare.
549 (push_event): Adjust to use ptid_t.
550 (read_ptid, write_ptid): Declare.
551 (prepare_resume_reply): Adjust to use ptid_t.
552 (clear_symbol_cache): Declare.
553 * inferiors.c (all_processes): New.
554 (null_ptid, minus_one_ptid): New.
555 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
556 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
557 (add_thread): Change unsigned long to ptid. Remove gdb_id
559 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
560 (gdb_id_to_thread): Rename to ...
561 (find_thread_pid): ... this. Change unsigned long to ptid.
562 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
563 (loaded_dll, pull_pid_from_list): Adjust.
564 (add_process, remove_process, find_process_pid)
565 (get_thread_process, current_process, initialize_inferiors): New.
566 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
567 (struct target_waitstatus) <related_pid>: Ditto.
568 (struct target_ops) <kill, detach>: Add `pid' argument. Change
570 (struct target_ops) <join>: Add `pid' argument.
571 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
572 (struct target_ops) <wait>: Add `ptid' field. Change return type
574 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
575 (mywait): Add `ptid' argument. Change return type to ptid_t.
576 (target_pid_to_str): Declare.
577 * target.c (set_desired_inferior): Adjust to use ptids.
578 (mywait): Add new `ptid' argument. Adjust.
579 (target_pid_to_str): New.
580 * mem-break.h (free_all_breakpoints): Declare.
581 * mem-break.c (breakpoints): Delelete.
582 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
583 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
584 to use per-process breakpoint list.
585 (free_all_breakpoints): New.
586 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
587 (symbol_cache, all_symbols_looked_up): Delete.
589 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
591 (prepare_resume_reply): Change ptid argument's type from unsigned
592 long to ptid_t. Adjust. Implement W;process and X;process.
593 (free_sym_cache, clear_symbol_cache): New.
594 (look_up_one_symbol): Adjust to per-process symbol cache. *
595 * server.c (cont_thread, general_thread, step_thread): Change type
598 (multi_process): New.
599 (last_ptid): Change type to ptid_t.
600 (struct vstop_notif) <ptid>: Change type to ptid_t.
601 (queue_stop_reply, push_event): Change `ptid' argument's type to
603 (discard_queued_stop_replies): Add `pid' argument.
604 (start_inferior): Adjust to use ptids. Adjust to mywait interface
605 changes. Don't reference the `attached' global.
606 (attach_inferior): Adjust to mywait interface changes.
607 (handle_query): Adjust to use ptids. Parse GDB's qSupported
608 features. Handle and report "multiprocess+". Handle
610 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
612 (handle_v_kill): New.
613 (handle_v_stopped): Adjust to use target_pid_to_str.
614 (handle_v_requests): Allow multiple attaches and runs when
615 multiprocess extensions are in effect. Handle "vKill".
616 (myresume): Adjust to use ptids.
617 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
618 (handle_status): Adjust to discard_queued_stop_replies interface
620 (first_thread_of, kill_inferior_callback)
621 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
622 (main): Call initialize_inferiors. Adjust to use ptids, killing
623 and detaching from all inferiors. Handle multiprocess packet
625 * linux-low.h: Include gdb_proc_service.h.
626 (struct process_info_private): New.
627 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
628 <lwpid_of>: Use ptid_get_lwp.
629 (get_lwp_thread): Adjust.
630 (struct lwp_info): Add `dead' member.
631 (find_lwp_pid): Declare.
632 * linux-low.c (thread_db_active): Delete.
633 (new_inferior): Adjust comment.
634 (inferior_pid): Delete.
635 (linux_add_process): New.
636 (handle_extended_wait): Adjust.
637 (add_lwp): Change unsigned long to ptid.
638 (linux_create_inferior): Add process to processes table. Adjust
639 to use ptids. Don't set new_inferior here.
640 (linux_attach_lwp): Rename to ...
641 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
642 it. Adjust to use ptids.
643 (linux_attach_lwp): New.
644 (linux_attach): Add process to processes table. Don't set
646 (struct counter): New.
647 (second_thread_of_pid_p, last_thread_of_process_p): New.
648 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
650 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
651 processes. Remove process from process table.
652 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
653 to multiple processes.
654 (any_thread_of): New.
655 (linux_detach): Add `pid' argument, and handle it. Remove process
656 from processes table.
657 (linux_join): Add `pid' argument. Handle it.
658 (linux_thread_alive): Change unsighed long argument to ptid_t.
659 Consider dead lwps as not being alive.
660 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
661 threads we're not interested in.
662 (same_lwp, find_lwp_pid): New.
663 (linux_wait_for_lwp): Change `pid' argument's type from int to
665 (linux_wait_for_event): Rename to ...
666 (linux_wait_for_event_1): ... this. Change `pid' argument's type
667 from int to ptid_t. Adjust.
668 (linux_wait_for_event): New.
669 (linux_wait_1): Add `ptid' argument. Change return type to
670 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
671 that exit from the process table.
672 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
674 (mark_lwp_dead): New.
675 (wait_for_sigstop): Adjust to use ptids. If a process exits while
676 stopping all threads, mark its main lwp as dead.
677 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
679 (fetch_register, usr_store_inferior_registers)
680 (regsets_fetch_inferior_registers)
681 (regsets_store_inferior_registers, linux_read_memory)
682 (linux_write_memory): Inline `inferior_pid'.
683 (linux_look_up_symbols): Adjust to use per-process
685 (linux_request_interrupt): Adjust to use ptids.
686 (linux_read_auxv): Inline `inferior_pid'.
687 (initialize_low): Don't reference thread_db_active.
688 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
689 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
690 (ps_getpid): Return the pid of the current inferior.
691 * thread-db.c (proc_handle, thread_agent): Delete.
692 (thread_db_create_event, thread_db_enable_reporting): Adjust to
694 (find_one_thread): Change argument type to ptid_t. Adjust to
696 (maybe_attach_thread): Adjust to per-process data and ptids.
697 (thread_db_find_new_threads): Ditto.
698 (thread_db_init): Ditto.
699 * spu-low.c (spu_create_inferior, spu_attach): Add process to
700 processes table. Adjust to use ptids.
701 (spu_kill, spu_detach): Adjust interface. Remove process from
703 (spu_join, spu_thread_alive): Adjust interface.
704 (spu_wait): Adjust interface. Remove process from processes
705 table. Adjust to use ptids.
706 * win32-low.c (current_inferior_tid): Delete.
707 (current_inferior_ptid): New.
708 (debug_event_ptid): New.
709 (thread_rec): Take a ptid. Adjust.
710 (child_add_thread): Add `pid' argument. Adjust to use ptids.
711 (child_delete_thread): Ditto.
712 (do_initial_child_stuff): Add `attached' argument. Add process to
714 (child_fetch_inferior_registers, child_store_inferior_registers):
716 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
717 (win32_attach): Pass 1 to do_initial_child_stuff.
718 (win32_kill): Adjust interface. Remove process from processes
720 (win32_detach): Ditto.
721 (win32_join): Adjust interface.
722 (win32_thread_alive): Take a ptid.
723 (win32_resume): Adjust to use ptids.
724 (get_child_debug_event): Ditto.
725 (win32_wait): Adjust interface. Remove exiting process from
728 2009-04-01 Pedro Alves <pedro@codesourcery.com>
730 Non-stop mode support.
732 * server.h (non_stop): Declare.
733 (gdb_client_data, handler_func): Declare.
734 (delete_file_handler, add_file_handler, start_event_loop):
736 (handle_serial_event, handle_target_event, push_event)
737 (putpkt_notif): Declare.
738 * target.h (enum resume_kind): New.
739 (struct thread_resume): Replace `step' field by `kind' field.
740 (TARGET_WNOHANG): Define.
741 (struct target_ops) <wait>: Add `options' argument.
742 <supports_non_stop, async, start_non_stop>: New fields.
743 (target_supports_non_stop, target_async): New.
744 (start_non_stop): Declare.
745 (mywait): Add `options' argument.
746 * target.c (mywait): Add `options' argument. Print child exit
748 (start_non_stop): New.
749 * server.c (non_stop, own_buf, mem_buf): New globals.
750 (struct vstop_notif): New.
751 (notif_queue): New global.
752 (queue_stop_reply, push_event, discard_queued_stop_replies)
753 (send_next_stop_reply): New.
754 (start_inferior): Adjust to use resume_kind. Adjust to mywait
756 (attach_inferior): In non-stop mode, don't wait for the target
758 (handle_general_set): Handle QNonStop.
759 (handle_query): When handling qC, return the current general
760 thread, instead of the first thread of the list.
761 (handle_query): If the backend supports non-stop mode, include
762 QNonStop+ in the qSupported query response.
763 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
765 (handle_v_attach, handle_v_run): Handle non-stop mode.
766 (handle_v_stopped): New.
767 (handle_v_requests): Report support for vCont;t. Handle vStopped.
768 (myresume): Adjust to use resume_kind. Handle non-stop.
769 (queue_stop_reply_callback): New.
770 (handle_status): Handle non-stop mode.
771 (main): Clear non_stop flag on reconnection. Use the event-loop.
772 Refactor serial protocol handling from here ...
773 (process_serial_event): ... to this new function. When GDB
774 selects any thread, select one here. In non-stop mode, wait until
775 GDB acks all pending events before exiting.
776 (handle_serial_event, handle_target_event): New.
777 * remote-utils.c (remote_open): Install remote_desc in the event
779 (remote_close): Remove remote_desc from the event loop.
780 (putpkt_binary): Rename to...
781 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
782 (putpkt_binary): New as wrapper around putpkt_binary_1.
784 (prepare_resume_reply): In non-stop mode, don't change the
787 * Makefile.in (OBJ): Add event-loop.o.
788 (event-loop.o): New rule.
790 * linux-low.h (pid_of): Moved here.
792 (get_lwp_thread): Use lwpid_of.
793 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
794 * linux-low.c (pid_of): Delete.
795 (inferior_pid): Use lwpid_of.
796 (linux_event_pipe): New.
797 (target_is_async_p): New.
799 (handle_extended_wait): Use lwpid_of.
800 (add_lwp): Don't set lwpid field.
801 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
802 (linux_kill_one_lwp): If killing a running lwp, stop it first.
803 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
804 (linux_detach_one_lwp): If detaching from a running lwp, stop it
805 first. Adjust to linux_wait_for_event interface changes. Use
807 (linux_detach): Don't delete the main lwp here.
808 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
809 (status_pending_p): Don't consider explicitly suspended lwps.
810 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
811 pointer. Add OPTIONS argument. Change return type to int. Use
812 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
813 (linux_wait_for_event): Take an integer pid instead of a lwp_info
814 pointer. Add status pointer argument. Return a pid instead of a
815 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
816 changes. In non-stop mode, don't switch to a random thread.
817 (linux_wait): Rename to...
818 (linux_wait_1): ... this. Add target_options argument, and handle
819 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
820 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
821 clean exit and signal exit code. Don't stop all threads in
822 non-stop mode. In all-stop mode, only stop all threads when
823 reporting a stop to GDB. Handle explicit thread stop requests.
824 (async_file_flush, async_file_mark): New.
826 (send_sigstop): Use lwpid_of.
827 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
828 interface changes. In non-stop mode, don't switch to a random
830 (linux_resume_one_lwp): Use lwpid_of.
831 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
832 (linux_resume_one_thread): ... this. Handle resume_stop. In
833 non-stop mode, don't look for pending flag in all threads.
834 (resume_status_pending_p): Don't consider explicitly suspended
836 (my_waitpid): Reimplement. Emulate __WALL.
837 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
839 (sigchld_handler, linux_supports_non_stop, linux_async)
840 (linux_start_non_stop): New.
841 (linux_target_ops): Register linux_supports_non_stop, linux_async
842 and linux_start_non_stop.
843 (initialize_low): Install SIGCHLD handler.
844 * thread-db.c (thread_db_create_event, find_one_thread)
845 (thread_db_get_tls_address): Use lwpid_of.
846 * win32-low.c (win32_detach): Adjust to use resume_kind.
847 (win32_wait): Add `options' argument.
848 * spu-low.c (spu_resume): Adjust to use resume_kind.
849 (spu_wait): Add `options' argument.
851 2009-04-01 Pedro Alves <pedro@codesourcery.com>
853 Decouple target code from remote protocol.
855 * target.h (enum target_waitkind): New.
856 (struct target_waitstatus): New.
857 (struct target_ops) <wait>: Return an unsigned long. Take a
858 target_waitstatus pointer instead of a char pointer.
860 * target.c (mywait): Change prototype to return an unsigned long.
861 Take a target_waitstatus pointer instead of a char pointer. Adjust.
862 * server.h (thread_from_wait, old_thread_from_wait): Delete
864 (prepare_resume_reply): Change prototype to take a
866 * server.c (thread_from_wait, old_thread_from_wait): Delete.
867 (last_status, last_ptid): New.
868 (start_inferior): Remove "statusptr" argument. Adjust. Return a
869 pid instead of a signal.
870 (attach_inferior): Remove "status" and "signal" parameters.
872 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
874 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
875 (handle_v_requests, myresume): Remove "status" and "signal"
877 (handle_status): New.
878 (main): Delete local `status'. Adjust.
879 * remote-utils.c: Include target.h.
880 (prepare_resume_reply): Change prototype to take a
881 target_waitstatus. Adjust.
883 * linux-low.c (linux_wait): Adjust to new target_ops->wait
885 * spu-low.c (spu_wait): Adjust.
886 * win32-low.c (enum target_waitkind, struct target_waitstatus):
888 (win32_wait): Adjust.
890 2009-04-01 Pedro Alves <pedro@codesourcery.com>
892 * target.h (struct thread_resume): Delete leave_stopped member.
893 (struct target_ops): Add a `n' argument to the `resume' callback.
894 * server.c (start_inferior): Adjust.
895 (handle_v_cont, myresume): Adjust.
896 * linux-low.c (check_removed_breakpoint): Adjust to resume
897 interface change, and to removed leave_stopped field.
898 (resume_ptr): Delete.
899 (struct thread_resume_array): New.
900 (linux_set_resume_request): Add new `arg' parameter. Adjust to
901 resume interface change.
902 (linux_continue_one_thread, linux_queue_one_thread)
903 (resume_status_pending_p): Check if the resume field is NULL
904 instead of checking the leave_stopped member.
905 (linux_resume): Adjust to the target resume interface change.
906 * spu-low.c (spu_resume): Adjust to the target resume interface
908 * win32-low.c (win32_detach, win32_resume): Ditto.
910 2009-04-01 Pedro Alves <pedro@codesourcery.com>
912 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
914 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
916 (linux_continue_one_thread): Only preserve the stepping flag if
917 there's a pending breakpoint.
919 2009-03-31 Pedro Alves <pedro@codesourcery.com>
921 * server.c (main): After the inferior having exited, call
922 remote_close before exiting gdbserver.
924 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
926 Fix size of FPSCR in Power 7 processors.
927 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
928 (PPC_FEATURE_HAS_DFP): New #define.
929 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
932 2009-03-23 Pedro Alves <pedro@codesourcery.com>
934 * server.c (handle_query) Whitespace and formatting.
936 2009-03-22 Pedro Alves <pedro@codesourcery.com>
938 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
939 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
940 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
941 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
942 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
943 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
944 Makefile.in, configure.ac: Fix whitespace throughout.
945 * configure: Regenerate.
947 2009-03-22 Pedro Alves <pedro@codesourcery.com>
949 * inferiors.c (find_inferior): Make it safe for the callback
950 function to delete the currently iterated inferior.
952 2009-03-22 Pedro Alves <pedro@codesourcery.com>
954 * Makefile.in (linuw_low_h): Move higher.
955 (thread-db.o): Depend on $(linux_low_h).
957 2009-03-17 Pedro Alves <pedro@codesourcery.com>
959 Rename "process" to "lwp" throughout.
961 * linux-low.c (all_processes): Rename to...
962 (all_lwps): ... this.
963 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
964 (add_process): Rename to ...
965 (add_lwp): ... this. Adjust.
966 (linux_create_inferior): Adjust.
967 (linux_attach_lwp): Adjust.
968 (linux_attach): Adjust.
969 (linux_kill_one_process): Rename to ...
970 (linux_kill_one_lwp): ... this. Adjust.
971 (linux_kill): Adjust.
972 (linux_detach_one_process): Rename to ...
973 (linux_detach_one_lwp): ... this. Adjust.
974 (linux_detach): Adjust.
975 (check_removed_breakpoint): Adjust.
976 (status_pending_p): Adjust.
977 (linux_wait_for_process): Rename to ...
978 (linux_wait_for_lwp): ... this. Adjust.
979 (linux_wait_for_event): Adjust.
980 (send_sigstop): Adjust.
981 (wait_for_sigstop): Adjust.
982 (stop_all_processes): Rename to ...
983 (stop_all_lwps): ... this.
984 (linux_resume_one_process): Rename to ...
985 (linux_resume_one_lwp): ... this. Adjust.
986 (linux_set_resume_request, linux_continue_one_thread)
987 (linux_queue_one_thread, resume_status_pending_p)
988 (usr_store_inferior_registers, regsets_store_inferior_registers)
989 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
991 * linux-low.h (get_process): Rename to ...
992 (get_lwp): ... this. Adjust.
993 (get_thread_process): Rename to ...
994 (get_thread_lwp): ... this. Adjust.
995 (get_process_thread): Rename to ...
996 (get_lwp_thread): ... this. Adjust.
997 (struct process_info): Rename to ...
998 (struct lwp_info): ... this.
999 (all_processes): Rename to ...
1000 (all_lwps): ... this.
1001 * proc-service.c (ps_lgetregs): Adjust.
1002 * thread-db.c (thread_db_create_event, find_one_thread)
1003 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1005 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1007 * server.c (handle_query): Handle "qAttached".
1009 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1011 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1012 GPLv3, update license URL.
1014 2009-03-01 Doug Evans <dje@google.com>
1016 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1017 (server_h): Add gdb_signals.h.
1018 (signals.o): Update.
1019 * server.h (target_signal_from_host,target_signal_to_host_p)
1020 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1022 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1024 * remote-utils.c (getpkt): Also generate remote-debug
1025 information if noack_mode is set.
1027 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1029 * server.c (handle_query): Report qXfer:siginfo:read and
1030 qXfer:siginfo:write as supported and handle them.
1031 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1032 * linux-low.c (linux_xfer_siginfo): New.
1033 (linux_target_ops): Set it.
1035 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1037 * server.c (gdbserver_usage): Mention --remote-debug.
1038 (main): Accept '--remote-debug' switch.
1040 2009-01-18 Doug Evans <dje@google.com>
1042 * regcache.c (new_register_cache): No need to check result of xcalloc.
1043 * server.c (handle_search_memory): Back out calls to xmalloc,
1044 result is checked and error is returned to user upon failure.
1045 (handle_query): Ditto. Add more checks for result of malloc.
1046 (handle_v_cont): Check result of malloc, report error back to
1048 (handle_v_run): Ditto. Call freeargv.
1049 * server.h (freeargv): Declare.
1050 * utils.c (freeargv): New fn.
1052 2009-01-15 Doug Evans <dje@google.com>
1054 * gdbreplay.c (perror_with_name): Make arg const char *.
1055 * server.h (target_signal_to_name): Make return type const char *.
1056 * thread-db.c (thread_db_err_str): Make return type const char *.
1057 * utils.c (perror_with_name): Make arg const char *.
1059 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1061 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1062 when handling a EXIT_PROCESS_DEBUG_EVENT.
1064 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1066 * gdbreplay.c (gdbreplay_version): Update copyright year.
1067 * server.c (gdbserver_version): Likewise.
1069 2009-01-05 Doug Evans <dje@google.com>
1071 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1072 (handle_extended_wait): Improve comment.
1074 2008-12-13 Doug Evans <dje@google.com>
1076 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1077 * server.h (ATTR_MALLOC): New macro.
1078 (xmalloc,xcalloc,xstrdup): Declare.
1079 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1080 * inferiors.c: Ditto.
1081 * linux-low.c: Ditto.
1082 * mem-break.c: Ditto.
1083 * regcache.c: Ditto.
1084 * remote-utils.c: Ditto.
1087 * win32-low.c: Ditto.
1089 2008-12-12 Doug Evans <dje@google.com>
1091 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1092 in debugging printf.
1094 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1096 2008-12-09 Doug Evans <dje@google.com>
1098 * linux-low.h (struct process_info): Delete member tid, unused.
1099 * thread-db.c (find_one_thread): Update.
1100 (maybe_attach_thread): Update.
1102 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1104 * target.h (struct target_ops): Add qxfer_osdata member.
1105 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1107 (linux_qxfer_osdata): New functions.
1108 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1110 * server.c (handle_query): Handle "qXfer:osdata:read:".
1111 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1112 (buffer_xml_printf): New functions.
1113 * server.h (struct buffer): New.
1114 (buffer_grow_str, buffer_grow_str0): New macros.
1115 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1116 (buffer_xml_printf): Declare.
1118 2008-11-24 Doug Evans <dje@google.com>
1120 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1122 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1124 * server.c (handle_v_run): Always use the supplied argument list.
1126 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1128 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1129 (xtensa_regmap_table): Add entry for scompare1.
1131 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1133 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1134 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1135 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1136 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1137 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1138 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1139 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1140 XML target descriptions.
1141 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1142 when inferior is running on an ISA 2.05 or later processor. Add
1143 special case to return offset for full 64-bit slot of FPSCR when
1146 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1148 * Makefile.in (SFILES, clean): Added sparc64 files.
1149 (reg-sparc64.o, reg-sparc64.c): New.
1150 * configure.srv (sparc*-*-linux*): New configuration.
1151 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1152 syscall arguments for SPARC.
1153 (regsets_store_inferior_registers): Likewise.
1154 * linux-sparc-low.c: New file.
1156 2008-10-21 Doug Evans <dje@google.com>
1158 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1159 (READLINE_DIR,READLINE_DEP): Delete.
1160 (INTERNAL_CFLAGS): Update.
1161 (LINTFLAGS): Update.
1163 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1165 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1166 whole argv from the last run, not just argv[0].
1168 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1170 * regcache.c (new_register_cache): Return NULL if the register
1171 cache size isn't known yet.
1172 (free_register_cache): Avoid dereferencing a NULL regcache.
1174 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1176 * configure.srv: Merge MIPS and MIPS64.
1178 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1180 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1182 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1184 * Makefile.in: Add required vsx dependencies.
1186 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1187 Declare init_registers_powerpc_vsx32l.
1188 Declare init_registers_powerpc_vsx64l.
1189 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1190 (ppc_arch_setup): Check for VSX in hwcap.
1191 (ppc_fill_vsxregset): New function.
1192 (ppc_store_vsxregset): New function.
1193 Add new VSX entry in regset_info target_regsets.
1195 * configure.srv: Add new VSX dependencies.
1197 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1199 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1200 (remote_open): Set or clear transport_is_reliable.
1201 (putpkt_binary): Don't expect acks in noack mode.
1202 (getpkt): Don't send ack/nac in noack mode.
1203 * server.c (handle_general_set): Handle QStartNoAckMode.
1204 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1206 (main): Reset noack_mode on every connection.
1207 * server.h (noack_mode): Declare.
1209 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1211 * Makefile.in (GDBREPLAY_OBS): New variable.
1212 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1214 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1215 Daniel Jacobowitz <dan@codesourcery.com>
1217 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1218 (usr_store_inferior_registers): Likewise.
1219 (regsets_store_inferior_registers): Likewise.
1221 2008-07-31 Rolf Jansen <rj@surtec.com>
1222 Pedro Alves <pedro@codesourcery.com>
1224 * configure.ac: Check for memmem declaration.
1225 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1226 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1227 (disable_packet_qfThreadInfo): Unconditionally compile.
1228 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1229 * configure, config.in: Regenerate.
1231 2008-07-28 Doug Kwan <dougkwan@google.com>
1233 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1234 (linux_write_memory): Remove declaration of errno.
1236 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1238 * linux-low.c (handle_extended_wait): Do not use "status"
1239 variable uninitialized.
1241 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1243 * server.c (handle_v_attach): Inhibit reporting dll changes.
1245 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1247 * remote-utils.c (prepare_resume_reply): If requested, don't
1248 output "thread:TID" in the T stop reply.
1250 * server.c (disable_packet_vCont, disable_packet_Tthread)
1251 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1252 (handle_query): If requested, disable support for qC, qfThreadInfo
1254 (handle_v_requests): If requested, disable support for vCont.
1255 (gdbserver_show_disableable): New.
1256 (main): Handle --disable-packet and --disable-packet=LIST.
1258 * server.h (disable_packet_vCont, disable_packet_Tthread)
1259 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1261 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1263 * server.c (gdbserver_usage): Mention --version.
1265 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1267 * Makefile.in (gdbreplay.o): New rule.
1269 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1271 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1272 message, not gdbserver.
1274 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1275 Nathan Sidwell <nathan@codesourcery.com>
1276 Joseph Myers <joseph@codesourcery.com>
1278 * acinclude.m4: Include ../../config/acx.m4.
1279 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1280 * configure, config.in: Regenerate.
1281 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1282 * server.c (gdbserver_version): Print PKGVERSION.
1283 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1284 (main): Adjust gdbserver_usage calls.
1285 * gdbreplay.c (version, host_name): Add declarations.
1286 (gdbreplay_version, gdbreplay_usage): New.
1287 (main): Accept --version and --help options.
1289 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1291 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1292 (arm_breakpoint_at): Handle Thumb.
1293 (the_low_target): Add comment.
1295 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1297 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1299 2008-05-09 Doug Evans <dje@google.com>
1301 * server.h (decode_search_memory_packet): Declare.
1302 * remote-utils.c (decode_search_memory_packet): New fn.
1303 * server.c (handle_search_memory_1): New fn.
1304 (handle_search_memory): New fn.
1305 (handle_query): Process qSearch:memory packets.
1307 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1309 * regcache.c (registers_length): Remove.
1310 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1311 full register packet.
1312 * regcache.h (registers_length): Remove prototype.
1313 * server.h (PBUFSIZ): Define to 16384.
1315 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1317 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1318 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1319 powerpc-64l.o, and powerpc-altivec64l.o.
1320 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1321 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1322 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1323 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1324 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1327 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1328 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1329 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1330 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1331 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1332 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1333 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1334 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1335 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1336 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1339 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1340 (init_registers_powerpc_32l): ... this new prototype.
1341 (init_registers_powerpc_32): Remove, replace by ...
1342 (init_registers_powerpc_altivec32l): ... this new prototype.
1343 (init_registers_powerpc_e500): Remove, replace by ...
1344 (init_registers_powerpc_e500l): ... this new prototype.
1345 (init_registers_ppc64): Remove, replace by ...
1346 (init_registers_powerpc_64l): ... this new prototype.
1347 (init_registers_powerpc_64): Remove, replace by ...
1348 (init_registers_powerpc_altivec64l): ... this new prototype.
1349 (ppc_num_regs): Set to 73.
1350 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1351 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1352 (ppc_cannot_store_register): Handle orig_r3 and trap.
1353 (ppc_arch_setup): Update init_registers_... calls.
1354 (ppc_fill_gregset): Handle orig_r3 and trap.
1356 * inferiors.c (clear_inferiors): Reset current_inferior.
1358 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1360 * acinclude.m4: Add override.m4.
1361 * configure: Regenerate.
1363 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1365 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1366 initial call to init_register_ppc64.
1368 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1370 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1371 powerpc*-*-linux* case.
1372 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1374 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1376 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1377 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1379 * linux-ppc-low.c: Include <elf.h>.
1380 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1381 (ppc_hwcap): New global variable.
1382 (ppc_regmap): Remove __SPE__ #ifdef sections.
1383 (ppc_regmap_e500): New global variable.
1384 (ppc_cannot_store_register): Update __SPE__ special case.
1385 (ppc_get_hwcap): New function.
1386 (ppc_arch_setup): Use it to determine whether inferior supports
1387 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1388 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1389 Do not access registers if target does not support AltiVec.
1390 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1391 Do not access registers if target does not support SPE.
1392 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1394 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1396 * linux-low.c (disabled_regsets, num_regsets): New.
1397 (use_regsets_p): Delete.
1398 (linux_wait_for_process): Clear disabled_regsets.
1399 (regsets_fetch_inferior_registers): Check and set it.
1400 (regsets_store_inferior_registers): Likewise.
1401 (linux_fetch_registers, linux_store_registers): Do not use
1403 (initialize_low): Allocate disabled_regsets.
1405 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1407 * Makefile.in (LIBOBJS): New.
1409 (memmem.o): New rule.
1410 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1411 * configure: Regenerated.
1413 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1415 * server.c (handle_query): Never return "unsupported" for
1416 qXfer:features:read queries.
1418 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1420 * server.c (get_features_xml): Fix inverted condition.
1421 (handle_query): Always support qXfer:feature:read.
1423 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1425 * server.c (wrapper_argv): New.
1426 (start_inferior): Handle wrapper_argv. If set, expect an extra
1428 (gdbserver_usage): Document --wrapper.
1429 (main): Parse --wrapper.
1431 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1433 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1434 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1435 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1436 (ppc_set_pc): Likewise.
1437 (ppc_arch_setup): New function.
1438 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1439 of collect_register.
1440 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1442 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1444 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1445 instead of linux-ppc64-low.o.
1446 * linux-ppc64-low.c: Remove file.
1447 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1448 (linux-ppc64-low.o): Remove rule.
1450 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1451 (init_registers_powerpc_64): Likewise.
1452 (ppc_regmap): Conditionally define depending on __powerpc64__.
1453 (ppc_cannot_store_register): Do not special-case "fpscr" when
1454 compiled on __powerpc64__.
1455 (ppc_collect_ptrace_register): New function.
1456 (ppc_supply_ptrace_register): New function.
1457 (ppc_breakpoint): Change type to "unsigned int".
1458 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1459 (the_low_target): Conditionally provide initializers for the
1460 arch_setup member depending on __powerpc64__. Install
1461 collect_ptrace_register and supply_ptrace_register members.
1463 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1465 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1466 * server.c (gdbserver_xmltarget): Define.
1467 (get_features_xml): Use it to replace "target.xml" and arch_string.
1469 * configure.srv: Remove srv_xmltarget. Add XML files that were
1470 mentioned there to srv_xmlfiles instead. Remove conditional tests
1471 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1472 srv_xmlfiles and srv_regobj to include all possible choices.
1473 * configure.ac (srv_xmltarget): Remove.
1474 (srv_xmlfiles): Do not add "target.xml".
1475 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1476 checks for supplementary target information.
1477 * configure: Regenerate.
1478 * Makefile.in (XML_TARGET): Remove.
1479 (target.xml): Remove rule.
1480 (clean): Do not clean up target.xml.
1481 (.PRECIOUS): Do not mention target.xml.
1483 * target.h (struct target_ops): Remove arch_string member.
1484 * linux-low.c (linux_arch_string): Remove.
1485 (linux_target_ops): Remove arch_string initializer.
1486 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1487 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1488 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1489 * spu-low.c (spu_arch_string): Remove.
1490 (spu_target_ops): Remove arch_string initializer.
1491 * win32-low.c (win32_arch_string): Remove.
1492 (win32_target_ops): Remove arch_string initializer.
1493 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1494 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1495 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1497 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1499 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1500 by collect_ptrace_register and supply_ptrace_register hooks.
1501 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1502 instead of checking for the_low_target.left_pad_xfer.
1503 (usr_store_inferior_registers): Use collect_ptrace_register callback
1504 instead of checking for the_low_target.left_pad_xfer.
1506 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1507 (s390_supply_ptrace_register): Likewise.
1508 (s390_fill_gregset): Call s390_collect_ptrace_register.
1509 (the_low_target): Update.
1511 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1512 (ppc_supply_ptrace_register): Likewise.
1513 (the_low_target): Update.
1515 * linux-i386-low.c (the_low_target): Update.
1516 * linux-x86-64-low.c (the_low_target): Update.
1518 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1520 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1521 reg-s390.o and reg-s390x.o.
1523 * linux-low.c (new_inferior): New global variable.
1524 (linux_create_inferior, linux_attach): Set it.
1525 (linux_wait_for_process): Call the_low_target.arch_setup after the
1526 target has stopped for the first time.
1527 (initialize_low): Do not call the_low_target.arch_setup.
1529 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1530 (s390_set_pc): Likewise.
1531 (s390_arch_setup): New function.
1532 (the_low_target): Use s390_arch_setup as arch_setup routine.
1534 * regcache.c (realloc_register_cache): New function.
1535 (set_register_cache): Call it for each existing regcache.
1537 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1539 * server.h (init_registers): Remove prototype.
1541 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1542 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1543 instead of init_registers ().
1544 * linux-arm-low.c (init_registers_arm): Add prototype.
1545 (init_registers_arm_with_iwmmxt): Likewise.
1546 (the_low_target): Add initializer for arch_setup field.
1547 * linux-cris-low.c (init_registers_cris): Add prototype.
1548 (the_low_target): Add initializer for arch_setup field.
1549 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1550 (the_low_target): Add initializer for arch_setup field.
1551 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1552 (the_low_target): Add initializer for arch_setup field.
1553 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1554 (the_low_target): Add initializer for arch_setup field.
1555 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1556 (the_low_target): Add initializer for arch_setup field.
1557 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1558 (the_low_target): Add initializer for arch_setup field.
1559 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1560 (init_registers_mips64_linux): Likewise.
1561 (the_low_target): Add initializer for arch_setup field.
1562 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1563 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1564 (the_low_target): Add initializer for arch_setup field.
1565 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1566 (init_registers_powerpc_64): Likewise.
1567 (the_low_target): Add initializer for arch_setup field.
1568 * linux-s390-low.c (init_registers_s390): Add prototype.
1569 (init_registers_s390x): Likewise.
1570 (the_low_target): Add initializer for arch_setup field.
1571 * linux-sh-low.c (init_registers_sh): Add prototype.
1572 (the_low_target): Add initializer for arch_setup field.
1573 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1574 (the_low_target): Add initializer for arch_setup field.
1575 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1576 (the_low_target): Add initializer for arch_setup field.
1578 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1579 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1580 instead of init_registers ().
1581 * win32-arm-low.c (init_registers_arm): Add prototype.
1582 (the_low_target): Add initializer for arch_setup field.
1583 * win32-i386-low.c (init_registers_i386): Add prototype.
1584 (the_low_target): Add initializer for arch_setup field.
1586 * spu-low.c (init_registers_spu): Add prototype.
1587 (initialize_low): Call initialie_registers_spu () instead of
1588 initialize_registers ().
1590 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1592 * server.c (handle_v_requests): When handling the vRun and vAttach
1593 packets, if already debugging a process, don't kill it. Return an
1596 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1598 * server.c (handle_query): Correct length check.
1600 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1602 * win32-low.c (do_initial_child_stuff): Add process handle
1603 parameter. Set current_process_handle and current_process_id from the
1604 parameters. Clear globals.
1605 (win32_create_inferior): Don't set current_process_handle and
1606 current_process_id here. Instead pass them on the call to
1607 do_initial_child_stuff.
1608 (win32_attach): Likewise.
1609 (win32_clear_inferiors): New.
1610 (win32_kill): Don't close the current process handle or the
1611 current thread handle here. Instead call win32_clear_inferiors.
1612 (win32_detach): Don't open a new handle to the process. Call
1613 win32_clear_inferiors.
1614 (win32_join): Don't rely on current_process_handle; open a new
1615 handle using the process id.
1616 (win32_wait): Call win32_clear_inferiors when the inferior process
1619 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1621 * server.c (monitor_show_help): Add "exit".
1623 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1625 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1626 (clean): Add reg-xtensa.c.
1627 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1628 * configure.srv (xtensa*-*-linux*) New target.
1629 * linux-xtensa-low.c: New.
1630 * xtensa-xtregs.c: New.
1632 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1634 * hostio.c: Don't include errno.h.
1635 (errno_to_fileio_errno): Move to hostio-errno.
1636 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1637 error number outputting to the target->hostio_last_error callback.
1638 (hostio_packet_error): Use FILEIO_EINVAL directly.
1639 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1640 calls to hostio_error.
1641 * hostio-errno.c: New.
1642 * server.h (hostio_last_error_from_errno): Declare.
1643 * target.h (target_ops): Add hostio_last_error member.
1644 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1645 as hostio_last_error handler.
1646 * spu-low.c (spu_target_ops): Likewise.
1647 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1648 (wince_hostio_last_error): New functions.
1649 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1650 as hostio_last_error handler.
1651 (win32_target_ops) [!_WIN32_WCE]: Register
1652 hostio_last_error_from_errno as hostio_last_error handler.
1653 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1654 (hostio-errno.o): New rule.
1655 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1656 * configure.srv (srv_hostio_err_objs): New variable. Default to
1658 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1659 * configure: Regenerate.
1661 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1663 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1664 (linux_kill, linux_detach): Clean up the process list.
1665 * remote-utils.c (remote_open): Improve port number parsing.
1666 (putpkt_binary, input_interrupt): Only send interrupts if the target
1668 * server.c (extended_protocol): Make static.
1669 (attached): Define earlier.
1670 (exit_requested, response_needed, program_argv): New variables.
1671 (target_running): New.
1672 (start_inferior): Clear attached here.
1673 (attach_inferior): Set attached here.
1674 (require_running): Define.
1675 (handle_query): Use require_running and target_running. Implement
1677 (handle_v_attach, handle_v_run): New.
1678 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1679 (gdbserver_usage): Update.
1680 (main): Redo argument parsing. Handle --debug and --multi. Handle
1681 --attach along with other options or after the port. Save
1682 program_argv. Support no initial program. Resynchronize
1683 communication with GDB after an error. Handle "monitor exit".
1684 Use require_running and target_running. Always allow the extended
1685 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1686 restart in extended mode.
1687 * README: Refer to the GDB manual. Update --attach usage.
1689 2007-12-20 Andreas Schwab <schwab@suse.de>
1691 * linux-low.c (STACK_SIZE): Define.
1692 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1693 (linux_test_for_tracefork): Likewise.
1695 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1697 * linux-low.c (linux_wait_for_event): Update messages. Do not
1698 reinsert auto-delete breakpoints.
1699 * mem-break.c (struct breakpoint): Change return type of handler to
1701 (set_breakpoint_at): Update handler type.
1702 (reinsert_breakpoint_handler): Return 1 instead of calling
1704 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1706 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1707 * mem-break.h (set_breakpoint_at): Update handler type.
1708 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1709 * win32-low.c (auto_delete_breakpoint): New.
1710 (get_child_debug_event): Use it.
1712 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1714 * configure.ac: Check for pread and pwrite.
1715 * hostio.c (handle_pread): Fall back to lseek and read.
1716 (handle_pwrite): Fall back to lseek and write.
1717 * config.in, configure: Regenerated.
1719 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1721 * server.c (myresume): Add own_buf argument.
1722 (main): Update calls.
1724 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1726 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1727 * remote-utils.c (remote_open): Do not call disable_async_io.
1728 (block_async_io): Delete.
1729 (unblock_async_io): Make static.
1730 (initialize_async_io): New.
1731 * server.c (handle_v_cont): Handle async I/O here.
1732 (myresume): Likewise. Move other common resume tasks here...
1733 (main): ... from here. Call initialize_async_io. Disable async
1734 I/O before the main loop.
1735 * server.h (initialize_async_io): Declare.
1736 (block_async_io, unblock_async_io): Delete prototypes.
1737 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1739 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1741 * remote-utils.c (readchar): Allow binary data in received messages.
1743 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1745 * win32-low.c (attaching): New global.
1746 (win32_create_inferior): Clear the `attaching' global.
1747 (win32_attach): Set the `attaching' global.
1748 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1749 attaching. Only set a breakpoint at the entry point if not
1752 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1754 * server.c (main): Don't report dll events on the initial
1755 connection on attaches.
1757 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1759 * server.c (main): Relax numerical bases supported for the pid of
1760 the --attach command line argument.
1762 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1764 * win32-low.c (win32_attach): Call OpenProcess before
1765 DebugActiveProcess, not after. Add last error output to error
1768 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1770 * win32-low.c (win32_get_thread_context)
1771 (win32_set_thread_context): New functions.
1772 (thread_rec): Use win32_get_thread_context.
1773 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1774 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1777 2007-12-03 Leo Zayas
1778 Pedro Alves <pedro_alves@portugalmail.pt>
1780 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1782 (child_add_thread): Minor cleanup.
1783 (child_continue): Resume artificially suspended threads before
1784 calling ContinueDebugEvent.
1785 (suspend_one_thread): New.
1786 (fake_breakpoint_event): New.
1787 (get_child_debug_event): Change return type to int. Check here if
1788 gdb sent an interrupt request. If a soft interrupt was requested,
1789 fake a breakpoint event. Return 0 if there is no event to handle,
1791 (win32_wait): Don't check here if gdb sent an interrupt request.
1792 Ensure there is a valid event to handle.
1793 (win32_request_interrupt): Add soft interruption method as last
1796 2007-12-03 Leo Zayas
1797 Pedro Alves <pedro_alves@portugalmail.pt>
1799 * win32-low.h (win32_thread_info): Add descriptions to the
1800 structure members. Replace `suspend_count' counter by a
1802 * win32-low.c (thread_rec): Update condition of when to get the
1803 context from the inferior. Rely on ContextFlags being set if it
1804 has already been retrieved. Only suspend the inferior thread if
1805 we haven't already. Warn if that fails.
1806 (continue_one_thread): s/suspend_count/suspended/. Only call
1807 ResumeThread once. Warn if that fails.
1809 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1811 * win32-low.c (win32_wait): Don't read from the inferior when it
1814 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1816 * Makefile.in (win32_low_h): New variable.
1817 (win32-low.o): Add dependency on $(win32_low_h).
1818 (win32-arm-low.o, win32-i386-low.o): New rules.
1820 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1822 * hostio.c: Correct copyright year.
1824 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1826 * Makefile.in (OBS): Add hostio.o.
1827 (hostio.o): New rule.
1828 * server.h (handle_vFile): Declare.
1829 * hostio.c: New file.
1830 * server.c (handle_v_requests): Take packet_len and new_packet_len
1831 for binary packets. Call handle_vFile.
1832 (main): Update call to handle_v_requests.
1834 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1836 * linux-low.c: Include <sched.h>.
1838 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1840 * linux-low.c (linux_tracefork_grandchild): New.
1841 (linux_tracefork_child): Use clone.
1842 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1844 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1846 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1848 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1850 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1852 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1854 * inferiors.c (change_inferior_id): Delete.
1855 (add_pid_to_list, pull_pid_from_list): New.
1856 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1857 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1858 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1859 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1860 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1861 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1862 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1863 (using_threads): Always set to 1.
1864 (handle_extended_wait): New.
1865 (add_process): Do not set TID.
1866 (linux_create_inferior): Set must_set_ptrace_flags.
1867 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1868 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1869 (linux_thread_alive): Rename TID argument to LWPID.
1870 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1871 (linux_wait_for_event): Do not use TID or check using_threads. Update
1872 call to dead_thread_notify. Call handle_extended_wait.
1873 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1874 (send_sigstop): Delete sigstop_sent.
1875 (wait_for_sigstop): Avoid TID.
1876 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1877 (linux_test_for_tracefork): New.
1878 (linux_lookup_signals): Use thread_db_active and
1879 linux_supports_tracefork_flag.
1880 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1881 * linux-low.h (get_process_thread): Avoid TID.
1882 (struct process_ifo): Move thread_known and tid to the end. Remove
1884 (linux_attach_lwp, thread_db_init): Update prototypes.
1885 * server.h (change_inferior_id): Delete prototype.
1886 (add_pid_to_list, pull_pid_from_list): New prototypes.
1887 * thread-db.c (thread_db_use_events): New.
1888 (find_first_thread): Rename to...
1889 (find_one_thread): ...this. Update callers and messages. Do not
1890 call fatal. Check thread_db_use_events. Do not call
1891 change_inferior_id or new_thread_notify.
1892 (maybe_attach_thread): Update. Do not call new_thread_notify.
1893 (thread_db_init): Set thread_db_use_events. Check use_events.
1894 * utils.c (fatal, warning): Correct message prefix.
1896 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1898 * Makefile.in (clean): Remove new files.
1899 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1900 (powerpc-64.o, powerpc-64.c): New rules.
1901 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1902 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1904 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1906 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1907 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1908 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1909 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1910 (target_regsets): Add AltiVec and SPE register sets.
1911 * configure.ac: Check for AltiVec and SPE.
1912 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1913 (ppc_fill_vrregset, ppc_store_vrregset): New.
1914 (target_regsets): Add AltiVec register set.
1915 * configure: Regenerated.
1917 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1919 * linux-low.c (O_LARGEFILE): Define.
1920 (linux_read_memory): Use /proc/PID/mem.
1921 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1922 * configure, config.in: Regenerated.
1924 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1926 * linux-low.c (linux_wait_for_event): Do not pass signals while
1929 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1931 * win32-low.c (create_process): New.
1932 (win32_create_inferior): Use create_process instead of
1933 CreateProcess. If create_process failed retry appending an ".exe"
1934 suffix. Store the GetLastError result immediatelly after
1935 create_process calls and use it on the call to error.
1937 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1939 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1941 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1943 * configure.ac: Switch license to GPLv3.
1945 2007-08-01 Michael Snyder <msnyder@access-company.com>
1947 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1949 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1951 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1953 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1954 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1955 CloseToolhelp32Snapshot.
1956 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1957 CloseToolhelp32Snapshot.
1959 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1961 * server.c (main): Check for inferior exit before main loop.
1963 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1965 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1966 instead of on tmp_desc.
1968 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1969 Daniel Jacobowitz <dan@codesourcery.com>
1971 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1972 (add_thread): Minor cleanups.
1973 (clear_inferiors): Move lower in the file. Clear the DLL
1975 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1976 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1977 (xml_escape_text): New.
1978 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1980 (handle_v_cont): Report errors.
1981 (gdbserver_version): Update.
1982 (main): Correct size of own_buf. Do not report initial DLL events.
1983 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1984 (unloaded_dll, xml_escape_text): New.
1985 * win32-low.c (enum target_waitkind): Update comments.
1986 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1987 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1988 (win32_EnumProcessModules, win32_GetModuleInformation)
1989 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1990 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1991 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1992 (win32_Module32First, win32_Module32Next, load_toolhelp)
1993 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1994 (get_child_debug_event): Handle DLL events.
1995 (win32_wait): Likewise.
1997 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1999 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2000 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2002 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2004 * win32-low.c (handle_output_debug_string): Ignore event if not
2007 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2009 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2011 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2013 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2015 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2017 * inferiors.c (change_inferior_id): Add comment.
2018 * linux-low.c (check_removed_breakpoint): Add an early
2019 prototype. Improve debug output.
2020 (linux_attach): Doc update.
2021 (linux_detach_one_process, linux_detach): Clean up before releasing
2023 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2024 * linux-low.h (struct process_info): Doc improvement.
2025 * mem-break.c (delete_all_breakpoints): New.
2026 * mem-break.h (delete_all_breakpoints): New prototype.
2027 * thread-db.c (find_first_thread): New.
2028 (thread_db_create_event): Call it instead of
2029 thread_db_find_new_threads. Clean up unused variables.
2030 (maybe_attach_thread): Remove first thread handling.
2031 (thread_db_find_new_threads): Use find_first_thread.
2032 (thread_db_get_tls_address): Likewise.
2034 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2036 * thread-db.c (thread_db_find_new_threads): Add prototype.
2037 (thread_db_create_event): Check for the main thread before adding
2039 (maybe_attach_thread): Only enable event reporting if TID == 0.
2040 (thread_db_get_tls_address): Check for new threads.
2042 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2044 * linux-low.c (linux_create_inferior): Try execv before execvp.
2045 * spu-low.c (spu_create_inferior): Likewise.
2047 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2049 * linux-low.c (linux_create_inferior): Change execv to execvp.
2050 * spu-low.c (spu_create_inferior): Likewies.
2052 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2054 * Makefile.in (clean): Clean new files instead of deleted ones.
2055 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2056 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2058 * configure.srv: Specify XML files and new regformats for MIPS and
2060 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2061 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2062 an entry for the restart register.
2063 (mips_cannot_fetch_register, mips_cannot_store_register)
2064 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2065 register names to match the XML descriptions.
2066 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2067 restart register instead of $0.
2069 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2070 Markus Deuling <deuling@de.ibm.com>
2072 * remote-utils.c (decode_xfer_write): New function.
2073 * server.h (decode_xfer_write): Add prototype.
2074 * server.c (handle_query): Add PACKET_LEN argument. Support
2075 qXfer:spu:read and qXfer:spu:write packets.
2076 (main): Pass packet_len to handle_query.
2077 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2078 * target.h (target_ops): Add qxfer_spu.
2080 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2082 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2083 accessing non-seekable spufs files.
2085 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2087 * server.c (handle_query): Add reply for qC packet.
2089 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2090 Leo Zayas <lerele@champenstudios@com>
2092 * server.h (check_remote_input_interrupt_request): New function.
2093 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2094 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2095 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2096 (check_remote_input_interrupt_request): New function.
2097 * server.h (check_remote_input_interrupt_request): Declare.
2098 * win32-low.c (winapi_DebugBreakProcess,
2099 winapi_GenerateConsoleCtrlEvent): New typedefs.
2100 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2102 (win32_wait): Check for remote interrupt request
2103 with check_remote_input_interrupt_request.
2104 (win32_request_interrupt): New function.
2105 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2107 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2109 * win32-low.c (debug_registers_changed,
2110 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2111 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2112 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2113 (thread_rec): Get context using the low target.
2114 (child_add_thread): Call thread_added on the low target,
2115 which does the same thing.
2117 (do_initial_child_stuff): Remove debug registers references.
2118 Set context using the low target. Resume threads after
2119 setting the contexts.
2120 (child_continue): Remove dead variable. Remove debug
2121 registers references.
2122 (child_fetch_inferior_registers): Go through the low target.
2123 (do_child_store_inferior_registers): Remove.
2124 (child_store_inferior_registers): Go through the low target.
2125 (win32_resume): Remove debug registers references.
2126 Set context using the low target.
2127 (handle_exception): Change return type to void. Don't record
2128 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2129 first chance exception.
2130 (get_child_debug_event): Change return type to void. Remove
2131 goto loop. Always return after waiting for debug event.
2132 (win32_wait): Convert to switch statement. Handle spurious
2135 * win32-i386-low.c (debug_registers_changed,
2136 debug_registers_used): New.
2137 (initial_stuff): Rename to ...
2138 (i386_initial_stuff): ... this. Clear debug registers
2140 (store_debug_registers): Delete.
2141 (i386_get_thread_context): New.
2142 (load_debug_registers): Delete.
2143 (i386_set_thread_context): New.
2144 (i386_thread_added): New.
2145 (single_step): Rename to ...
2146 (i386_single_step): ... this.
2147 (do_fetch_inferior_registers): Rename to ...
2148 (i386_fetch_inferior_register): ... this.
2149 (i386_store_inferior_register): New.
2150 (the_low_target): Adapt to new interface.
2152 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2153 (arm_get_thread_context): New.
2154 (arm_set_thread_context): New.
2156 (do_fetch_inferior_registers): Rename to ...
2157 (arm_fetch_inferior_register): ... this.
2158 (arm_store_inferior_register): New.
2159 (arm_wince_breakpoint): Reimplement as unsigned long.
2160 (arm_wince_breakpoint_len): Define.
2161 (the_low_target): Adapt to new interface.
2163 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2164 load_debug_registers. Add get_thread_context, set_thread_context,
2165 thread_added and store_inferior_register. Rename
2166 fetch_inferior_registers to fetch_inferior_register.
2167 (regptr): Remove declaration.
2169 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2171 * linux-low.c (linux_detach): Change return type to int. Return 0.
2172 * spu-low.c (spu_detach): Likewise.
2174 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2176 * target.h (target_ops): Change return type of detach to int.
2178 (join_inferior): New.
2179 * server.c (main): Don't skip detach support on mingw32.
2180 If the inferior doesn't support detaching return error.
2181 Call join_inferior instead of using waitpid.
2182 * linux-low.c (linux_join): New.
2183 (linux_target_op): Add linux_join.
2184 * spu-low.c (spu_join): New.
2185 (spu_target_ops): Add spu_join.
2186 * win32-low.c (win32_detach): Adapt to new interface.
2187 Reopen current_process_handle before detaching. Issue a child
2188 resume before detaching.
2190 (win32_target_op): Add win32_join.
2192 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2194 * win32-low.c (win32-attach): Fix return value.
2195 * target.h (target_ops): Describe ATTACH return values.
2197 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2199 * win32-low.c (GETPROCADDRESS): Define.
2200 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2201 (winapi_DebugSetProcessKillOnExit): Likewise.
2202 (win32_create_inferior): Force usage of ansi CreateProcessA.
2203 (win32_attach): Use GETPROCADDRESS.
2204 (win32_detach): Likewise.
2206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2208 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2210 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2212 * win32-low.c: Commit leftover changes from 2007-03-29.
2214 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2216 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2217 fields short instead of int. Add explicit padding.
2218 (i387_cache_to_fsave): Remove unnecessary casts.
2219 (i387_fsave_to_cache): Doc fix.
2220 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2222 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2224 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2225 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2227 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2229 * configure.srv (arm*-*-mingw32ce*): Move near the other
2232 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2234 * configure.ac: Add errno checking.
2235 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2236 sys/file.h and malloc.h.
2237 (AC_CHECK_DECLS): Add perror.
2238 (srv_mingwce): Handle.
2239 * configure.srv (i[34567]86-*-cygwin*): Add
2240 win32-i386-low.o to srv_tgtobj.
2241 (i[34567]86-*-mingw*): Likewise.
2242 (arm*-*-mingw32ce*): Add case.
2243 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2244 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2245 [__MINGW32CE__] (strerror): New function.
2246 [__MINGW32CE__] (errno): Define to GetLastError.
2247 [__MINGW32CE__] (COUNTOF): New macro.
2248 (remote_open): Remove extra close call.
2249 * mem-break.c (delete_breakpoint_at): New function.
2250 * mem-break.h (delete_breakpoint_at): Declare.
2251 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2252 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2253 [USE_WIN32API] (read, write): Add char* casts.
2254 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2255 * server.h: Include wincecompat.h on Windows CE.
2256 [HAVE_ERRNO_H]: Check.
2257 (perror): Declare if not declared.
2258 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2259 (perror_with_name): Remove errno declaration.
2260 * wincecompat.h: New.
2261 * wincecompat.c: New.
2263 * win32-arm-low.c: New.
2264 * win32-i386-low.c: New.
2265 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2266 (OUTMSG2): Make it safe.
2268 (COUNTOF): New macro.
2269 (NUM_REGS): Get it from the low target.
2270 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2271 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2272 (thread_rec): Let low target handle debug registers.
2273 (child_add_thread): Likewise.
2274 (child_init_thread_list): Likewise.
2275 (continue_one_thread): Likewise.
2277 (do_child_fetch_inferior_registers): Move to ...
2278 * win32-i386-low.c: ... here, and rename to ...
2279 (do_fetch_inferior_registers): ... this.
2280 * win32-low.c (child_fetch_inferior_registers):
2281 Go through the low target.
2282 (do_child_store_inferior_registers): Use regptr.
2283 (strwinerror): New function.
2284 (win32_create_inferior): Handle Windows CE.
2285 Use strwinerror instead of strerror on Windows error
2286 codes. Add program to the error output.
2287 Don't close the main thread handle on Windows CE.
2288 (win32_attach): Use coredll.dll on Windows CE.
2289 (win32_kill): Close current process and current
2291 (win32_detach): Use coredll.dll on Windows CE.
2292 (win32_resume): Let low target handle debug registers, and
2294 (handle_exception): Add/Remove initial breakpoint. Avoid
2295 non-existant WSTOPSIG on Windows CE.
2296 (win32_read_inferior_memory): Cast to remove warning.
2297 (win32_arch_string): Go through the low target.
2298 (initialize_low): Call set_breakpoint_data with the low
2299 target's breakpoint.
2300 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2301 FOP_REGNUM, mappings): Move to ...
2302 * win32-i386-low.c: ... here.
2303 * win32-low.c (win32_thread_info): Move to ...
2304 * win32-low.h: ... here.
2305 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2306 win32-arm-low.c and wincecompat.c.
2307 (all:): Add $EXEEXT.
2308 (install-only:): Likewise.
2309 (gdbserver:): Likewise.
2310 (gdbreplay:): Likewise.
2311 * config.in: Regenerate.
2312 * configure: Regenerate.
2314 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2316 * win32-low.c: Rename typedef thread_info to
2317 win32_thread_info throughout.
2319 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2321 * win32-i386-low.c: Rename to ...
2322 * win32-low.c: ... this.
2323 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2324 * Makefile.in: Likewise.
2326 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2328 * remote-utils.c (monitor_output): Constify msg parameter.
2329 * server.h (monitor_output): Likewise.
2330 * win32-i386-low.c (handle_output_debug_string): New.
2331 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2332 handle_output_debug_string.
2333 (get_child_debug_event): Likewise.
2335 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2337 * server.c (main): Correct strtoul check.
2339 2007-03-27 Jon Ringle <jon@ringle.org>
2341 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2343 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2345 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2347 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2349 * terminal.h: Check HAVE_SGTTY_H.
2351 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2353 * remote-utils.c (remote_open): Print out the assigned port number.
2355 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2357 * remote-utils.c (monitor_output): New function.
2358 * server.c (debug_threads): Define here.
2359 (monitor_show_help): New function.
2360 (handle_query): Handle qRcmd.
2361 (main): Do not handle 'd' packet.
2362 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2363 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2366 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2368 * Makefile.in (EXEEXT): New.
2369 (clean): Use $(EXEEXT).
2371 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2373 * target.h (target_ops): Rename send_signal to request_interrupt,
2374 and remove enum target_signal parameter.
2375 * linux-low.c (linux_request_interrupt): Rename from
2376 linux_send_signal, and always send SIGINT.
2377 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2378 and always send SIGINT.
2379 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2381 (input_interrupt): Likewise.
2383 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2385 * server.c (get_features_xml): Check if target implemented
2387 * win32-i386-low.c (win32_arch_string): New.
2388 (win32_target_ops): Add win32_arch_string as arch_string member.
2390 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2392 * spu-low.c (spu_arch_string): New.
2393 (spu_target_ops): Add spu_arch_string.
2395 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2397 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2398 * configure.ac: Do not check for terminal.h.
2399 * configure, config.in: Regenerated.
2401 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2403 * Makefile.in (OBS): Add $(XML_BUILTIN).
2404 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2406 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2407 (arm-with-iwmmxt.c): New.
2408 * config.in, configure: Regenerate.
2409 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2410 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2411 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2412 (arm*-*-linux*): Add iWMMXt and regset support.
2413 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2414 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2415 (arm_store_wmmxregset, target_regsets): New.
2416 * server.c (get_features_xml): Take annex argument. Check builtin
2418 (handle_query): Handle multiple annexes.
2420 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2422 * remote-utils.c [USE_WIN32API] (read, write): Define.
2423 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2426 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2428 * linux-i386-low.c (the_low_target): Set arch_string.
2429 * linux-x86-64-low.c (the_low_target): Likewise.
2430 * linux-low.c (linux_arch_string): New.
2431 (linux_target_ops): Add it.
2432 * linux-low.h (struct linux_target_ops): Add arch_string.
2433 * server.c (write_qxfer_response): Use const void * for DATA.
2434 (get_features_xml): New.
2435 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2436 * target.h (struct target_ops): Add arch_string method.
2438 2007-01-03 Denis Pilat <denis.pilat@st.com>
2439 Daniel Jacobowitz <dan@codesourcery.com>
2441 * linux-low.c (linux_kill): Handle being called with no threads.
2442 * win32-i386-low.c (win32_kill): Likewise.
2443 (get_child_debug_event): Clear current_process_handle.
2445 2006-12-30 Denis PILAT <denis.pilat@st.com>
2446 Daniel Jacobowitz <dan@codesourcery.com>
2448 * remote-utils.c (remote_open): Check the type of specified
2449 serial port devices before opening them.
2450 * server.c (main): Kill the inferior if an error occurs during
2451 the first remote_open.
2453 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2455 * README: Update supported targets.
2457 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2459 * Makefile.in (clean): Remove reg-mips64.c.
2460 (reg-mips64.c, reg-mips64.o): New rules.
2461 * configure.srv: Handle mips64. Include regset support for mips.
2462 * linux-mips-low.c (union mips_register): New.
2463 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2464 (mips_breakpoint, mips_breakpoint_at): Use int.
2465 (mips_collect_register, mips_supply_register)
2466 (mips_collect_register_32bit, mips_supply_register_32bit)
2467 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2468 (mips_store_fpregset, target_regsets): New.
2469 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2471 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2473 * configure.srv: Add target "spu*-*-*".
2474 * Makefile.in (clean): Remove reg-spu.c.
2475 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2476 * spu-low.c: New file.
2478 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2480 * configure.ac: Correct td_thr_tls_get_addr test.
2481 * configure: Regenerated.
2483 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2485 * linux-low.c (linux_wait_for_event): Reformat. Use the
2487 * remote-utils.c (decode_address_to_semicolon): New.
2488 * server.c (pass_signals, handle_general_set): New.
2489 (handle_query): Mention QPassSignals for qSupported.
2490 (main): Call handle_general_set.
2491 * server.h (pass_signals, decode_address_to_semicolon): New.
2493 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2495 * server.c (handle_query): Correct error handling for read_auxv.
2497 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2499 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2500 and srv_linux_thread_db to yes.
2501 * linux-s390-low.c (s390_fill_gregset): New function.
2502 (target_regsets): Define data structure.
2504 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2506 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2507 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2508 * config.in, configure: Regenerated.
2509 * inferiors.c (gdb_id_to_thread): New function.
2510 (gdb_id_to_thread_id): Use it.
2511 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2512 * linux-low.h (struct process_info): Add th member.
2513 (thread_db_get_tls_address): New prototype.
2514 * remote-utils.c (decode_address): Make non-static.
2515 * server.c (handle_query): Handle qGetTLSAddr.
2516 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2517 * target.h (struct target_ops): Add get_tls_address.
2518 * thread-db.c (maybe_attach_thread): Save the thread handle.
2519 (thread_db_get_tls_address): New.
2521 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2523 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2524 (linux_resume_one_process): Take a siginfo_t *. Update all
2525 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2526 (struct pending_signals): Add a siginfo_t.
2527 (linux_wait_for_process): Always set last_status.
2528 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2529 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2530 * linux-low.h (struct process_info): Add last_status.
2532 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2534 * remote-utils.c (try_rle): New function.
2535 (putpkt_binary): Use it.
2537 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2539 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2540 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2541 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2542 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2543 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2546 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2548 * server.c (terminal_fd): New variable.
2549 (old_foreground_pgrp): Likewise.
2550 (restore_old_foreground_pgrp): New function.
2551 (start_inferior): Record the terminal file descriptor in terminal_fd
2552 and its original foreground group in old_foreground_pgrp. Register
2553 restore_old_foreground_pgrp with atexit().
2555 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2557 * server.c (handle_query): Correct qPart to qXfer.
2559 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2561 * configure.ac: Check for more headers which are missing on
2562 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2563 * configure.srv: Add Cygwin and mingw32.
2564 * remote-utils.c: Don't include headers unconditionally which
2565 are missing on mingw32. Include <winsock.h> for mingw32.
2566 (remote_open): Adjust for mingw32 support. Flush
2567 standard error after writing to it.
2568 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2569 (unblock_async_io, enable_async_io, disable_async_io)
2570 (readchar, getpkt): Update for Winsock support.
2571 (prepare_resume_reply): Expect a protocol signal number.
2572 * server.c: Disable <sys/wait.h> on mingw32.
2573 (start_inferior): Adjust for mingw32 support. Flush
2574 standard error after writing to it.
2575 (attach_inferior): Likewise. Use protocol signal
2577 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2579 * win32-i386-low.c: New file.
2580 * Makefile.in (XM_CLIBS): Set.
2581 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2582 (win32-i386-low.o): New dependency rule.
2583 * linux-low.c (linux_wait): Use target signal numbers.
2584 * target.h (struct target_ops): Doc fix.
2585 * server.h (target_signal_to_name): New prototype.
2586 * gdbreplay.c: Don't include headers unconditionally which
2587 are missing on mingw32. Include <winsock.h> for mingw32.
2588 (remote_close, remote_open): Adjust for Winsock support.
2589 * configure, config.in: Regenerated.
2591 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2593 * server.c (decode_xfer_read, write_qxfer_response): New.
2594 (handle_query): Take a packet length argument. Handle
2595 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2596 the qSupported response.
2597 (main): Update call to handle_query.
2599 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2601 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2602 (putpkt_binary): Renamed from putpkt and adjusted for binary
2604 (putpkt): New wrapper for putpkt_binary.
2605 (readchar): Don't mask off the high bit.
2606 (decode_X_packet): New function.
2607 * server.c (main): Call putpkt_binary if a handler sets the packet
2608 length. Save the length of the incoming packet. Handle 'X'.
2609 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2611 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2613 * server.c (handle_query): Handle qSupported.
2615 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2617 * remote-utils.c (all_symbols_looked_up): New variable.
2618 (look_up_one_symbol): Check it.
2619 * server.h (look_up_one_symbol): New declaration.
2620 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2622 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2624 * Makefile.in (linux-arm-low.o): Update dependencies.
2625 * linux-arm-low.c: Include "gdb_proc_service.h".
2626 (PTRACE_GET_THREAD_AREA): Define.
2627 (ps_get_thread_area): New function.
2629 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2631 * configure.srv (m68k*-*-uclinux*): New target.
2632 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2633 (linux_resume_one_process): Remove extraneous cast.
2634 (linux_read_offsets): New.
2635 (linux_target_op): Add linux_read_offsets on mmuless systems.
2636 * server.c (handle_query): Add qOffsets logic.
2637 * target.h (struct target_ops): Add read_offsets.
2639 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2641 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2642 (PTRACE_GET_THREAD_AREA): Define.
2643 (ps_get_thread_area): New function.
2644 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2645 (linux-x86-64-low.o): Update.
2647 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2649 * configure.ac: Remove checks for prfpregset_t.
2650 * gdb_proc_service.h: New file.
2651 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2652 new "gdb_proc_service.h".
2653 * proc-service.c: Likewise.
2654 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2655 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2656 * Makefile.in (gdb_proc_service_h): Updated.
2657 * configure, config.in: Regenerated.
2659 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2661 * remote-utils.c (prepare_resume_reply): Move declaration
2662 of gdb_id_from_wait to the top of the block.
2664 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2666 * linux-low.c (regsets_store_inferior_registers): Read the regset
2667 from the target before filling it.
2669 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2671 * server.c (attach_inferior): Return SIGTRAP for a successful
2674 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2676 * Makefile.in (OBS): Add version.o.
2677 (STAGESTUFF): Delete.
2678 (version.o): Add dependencies.
2679 (version.c): Replace rule.
2680 (clean): Remove version.c.
2681 * server.c (gdbserver_version): New.
2682 (gdbserver_usage): Use printf.
2683 (main): Handle --version and --help.
2684 * server.h (version, host_name): Add declarations.
2686 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2698 * linux-x86-64-low.c:
2701 * linux-ppc64-low.c:
2710 * linux-crisv32-low.c:
2722 * gdbserver.1: Add (C) after Copyright. Update the FSF
2725 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2727 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2728 (arm_breakpoint_at): Recognize both breakpoints.
2729 (the_low_target): Use the correct breakpoint instruction.
2731 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2733 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2734 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2735 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2736 (the_low_target): Update.
2738 2005-10-25 Andreas Schwab <schwab@suse.de>
2740 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2742 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2743 (ia64_num_regs): Reduce to 462.
2745 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2747 * acinclude.m4: Correct quoting.
2748 * aclocal.m4: Regenerated.
2750 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2751 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2752 (thread_db_init): Call thread_db_err_str.
2753 * configure.ac: Check for TD_VERSION.
2754 * config.in, configure: Regenerated.
2756 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2758 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2760 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2762 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2763 is not available. Define HAVE_PTRACE_GETREGS if it is.
2764 * config.in, configure: Regenerated.
2765 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2766 * linux-i386-low.c, linux-m68k-low.c: Update to use
2767 HAVE_PTRACE_GETREGS.
2768 * linux-low.c (regsets_fetch_inferior_registers)
2769 (regsets_store_inferior_registers): Only return 0 if we processed
2771 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2772 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2774 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2776 * inferiors.c (struct thread_info): Add gdb_id.
2777 (add_thread): Add gdb_id argument.
2778 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2779 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2780 calls to add_thread.
2781 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2782 * server.c (handle_query): Use thread_to_gdb_id.
2783 (handle_v_cont, main): Use gdb_id_to_thread_id.
2784 * server.h (add_thread): Update prototype.
2785 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2788 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2790 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2791 left-padded registers.
2792 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2793 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2795 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2797 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2798 * configure: Regenerate.
2799 * config.in: Regenerate.
2800 * server.h (NEED_DECLARATION_STRERROR):
2801 Replace with !HAVE_DECL_STRERROR.
2803 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2805 * linux-low.c (linux_wait, linux_send_signal): Don't test
2806 an unsigned long variable for > 0 if it could be MAX_ULONG.
2807 * server.c (myresume): Likewise.
2808 * target.c (set_desired_inferior): Likewise.
2810 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2812 * configure.ac: Simplify and improve check for socklen_t.
2813 * configure, config.in: Regenerate.
2815 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2817 * acconfig.h: Remove.
2818 * configure.ac: Add a test for socklen_t. Use three-argument
2819 AC_DEFINE throughout.
2820 * config.in: Regenerated using autoheader 2.59.
2821 * configure: Regenerated.
2823 * gdbreplay.c (socklen_t): Provide a default.
2824 (remote_open): Use socklen_t.
2825 * remote-utils.c (socklen_t): Provide a default.
2826 (remote_open): Use socklen_t.
2827 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2830 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2832 * linux-low.c (linux_read_memory, linux_write_memory)
2833 (linux_read_auxv): Likewise.
2834 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2835 (check_mem_write): Likewise.
2836 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2838 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2839 (registers_from_string, register_data): Likewise.
2840 * server.c (handle_query, main): Likewise.
2841 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2842 (decode_M_packet): Likewise.
2843 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2844 * target.h (struct target_ops): Update read_memory, write_memory,
2846 (read_inferior_memory, write_inferior_memory): Update.
2847 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2849 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2850 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2851 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2852 linux-s390-low.c, linux-sh-low.c: Update for changes in
2853 read_inferior_memory and the_low_target->breakpoint.
2855 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2857 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2858 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2859 * configure.srv: Add powerpc64-*-linux*.
2860 * linux-ppc64-low.c: New file.
2862 2005-05-23 Orjan Friberg <orjanf@axis.com>
2864 * linux-cris-low.c: New file with support for CRIS.
2865 * linux-crisv32-low.c: Ditto for CRISv32.
2866 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2867 (clean): Add reg-cris.c and reg-crisv32.c.
2868 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2869 reg-crisv32.o, and reg-crisv32.c to make rules.
2870 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2873 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2875 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2876 of sizeof (PTRACE_XFER_TYPE).
2877 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2879 2005-05-12 Orjan Friberg <orjanf@axis.com>
2881 * target.h (struct target_ops): Add insert_watchpoint,
2882 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2883 pointers for hardware watchpoint support.
2884 * linux-low.h (struct linux_target_ops): Ditto.
2885 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2886 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2887 to linux_target_ops.
2888 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2890 * server.c (main): Recognize 'Z' and 'z' packets.
2892 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2894 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2895 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2896 (the_low_target): Add new members.
2898 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2900 * proc-service.c (ps_lgetregs): Search all_processes instead of
2903 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2905 * server.c (start_inferior): Change return type to int.
2906 (attach_inferior): Change sigptr to int *.
2907 (handle_v_cont, handle_v_requests): Change signal to int *.
2908 (main): Change signal to int.
2910 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2912 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2913 * configure.srv: Add m32r*-*-linux*.
2914 * linux-m32r-low.c: New file.
2916 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2918 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2920 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2922 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2923 Take unsigned long arguments for PIDs.
2924 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2925 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2926 (wait_for_sigstop, linux_resume_one_process)
2927 (regsets_fetch_inferior_registers, linux_send_signal)
2928 (linux_read_auxv): Likewise. Update the types of variables holding
2929 PIDs. Update format string specifiers.
2930 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2931 * remote-utils.c (prepare_resume_reply): Likewise.
2932 * server.c (cont_thread, general_thread, step_thread)
2933 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2935 (handle_query): Update format specifiers.
2936 (handle_v_cont, main): Use strtoul for thread IDs.
2937 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2938 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2939 (general_thread, step_thread, thread_from_wait)
2940 (old_thread_from_wait): Update.
2941 * target.h (struct thread_resume): Use unsigned long for THREAD.
2942 (struct target_ops): Use unsigned long for arguments to attach and
2945 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2947 * acinclude.m4: Include bfd/bfd.m4 directly.
2948 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2949 <agriffis@toolchain.org>.
2950 * aclocal.m4, configure: Regenerated.
2952 2005-01-07 Andrew Cagney <cagney@gnu.org>
2954 * configure.ac: Rename configure.in, require autoconf 2.59.
2955 * configure: Re-generate.
2957 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2959 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2961 * aclocal.m4: Regenerated.
2962 * configure: Regenerated.
2964 2004-11-21 Andreas Schwab <schwab@suse.de>
2966 * linux-m68k-low.c (m68k_num_gregs): Define.
2967 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2968 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2969 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2970 (m68k_breakpoint_at): New. Add to the_low_target.
2972 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2973 srv_linux_thread_db to yes.
2975 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2977 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2978 (ARCH_SET_FS): Likewise.
2979 (ARCH_GET_FS): Likewise.
2980 (ARCH_GET_GS): Likewise.
2982 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2984 * linux-i386-low.c (ps_get_thread_area): New.
2985 * linux-x86-64-low.c (ps_get_thread_area): New.
2986 * linux-low.c: Include <sys/syscall.h>.
2987 (linux_kill_one_process): Don't kill the first thread here.
2988 (linux_kill): Kill the first thread here.
2989 (kill_lwp): New function.
2990 (send_sigstop, linux_send_signal): Use it.
2991 * proc-service.c: Clean up #ifdefs.
2992 (fpregset_info): Delete.
2993 (ps_lgetregs): Update and enable implementation.
2994 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2996 * remote-utils.c (struct sym_cache, symbol_cache): New.
2997 (input_interrupt): Print a clearer message.
2998 (async_io_enabled): New variable.
2999 (enable_async_io, disable_async_io): Use it. Update comments.
3000 (look_up_one_symbol): Use the symbol cache.
3001 * thread-db.c (thread_db_look_up_symbols): New function.
3002 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3004 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3006 * configure.in: Test for -rdynamic.
3007 * configure: Regenerated.
3008 * Makefile (INTERNAL_LDFLAGS): New.
3009 (gdbserver, gdbreplay): Use it.
3011 2004-09-02 Andrew Cagney <cagney@gnu.org>
3013 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3015 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3017 * linux-low.c (linux_wait): Clear all_processes list also.
3019 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3021 * linux-low.c: Include <errno.h>. Remove extern declaration of
3024 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3026 * gdbreplay.c, server.h, utils.c: Update copyright years.
3028 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3030 * server.c (main): Print child status or termination signal from
3031 variable 'signal', not 'sig'.
3033 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3035 * linux-low.c (linux_read_memory): Change return type to
3036 int. Check for and return error from ptrace().
3037 * target.c (read_inferior_memory): Change return type to int. Pass
3038 back return status from the_target->read_memory().
3039 * target.h (struct target_ops): Adapt *read_memory() prototype.
3041 (read_inferior_memory): Adapt prototype.
3042 * server.c (main): Return an error packet if
3043 read_inferior_memory() returns an error.
3045 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3047 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3048 Unify with other clean targets.
3050 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3052 * server.c (handle_v_cont): Call set_desired_inferior.
3054 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3056 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3058 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3060 * linux-low.c (linux_wait): Unblock async I/O.
3061 (linux_resume): Block and enable async I/O.
3062 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3063 * server.h (block_async_io, unblock_async_io): Add prototypes.
3065 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3067 * remote-utils.c (remote_open): Print a status notice after
3069 * server.c (attach_inferior): Print a status notice after
3072 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3074 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3076 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3078 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3080 * server.c, target.h: Update copyright years.
3082 2004-02-25 Roland McGrath <roland@redhat.com>
3084 * target.h (struct target_ops): New member `read_auxv'.
3085 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3086 * linux-low.c (linux_read_auxv): New function.
3087 (linux_target_ops): Initialize `read_auxv' member to that.
3089 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3091 Committed by Jim Blandy <jimb@redhat.com>.
3093 * linux-s390-low.c (s390_num_regs): Update.
3094 (s390_regmap): Remove control registers. Use __s390x__ predefine
3095 instead of GPR_SIZE to distiguish s390 and s390x targets.
3097 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3099 * linux-low.c: Update copyright year.
3100 (check_removed_breakpoint): Clear pending_is_breakpoint.
3101 (linux_set_resume_request, linux_queue_one_thread)
3102 (resume_status_pending_p): New functions.
3103 (linux_continue_one_thread): Use process->resume.
3104 (linux_resume): Only resume threads if there are no pending events.
3105 * linux-low.h (struct process_info): Add resume request
3108 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3110 * regcache.c (new_register_cache): Clear the allocated register
3111 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3113 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3115 * linux-low.c (linux_resume): Take a struct thread_resume *
3117 (linux_wait): Update call.
3118 (resume_ptr): New static variable.
3119 (linux_continue_one_thread): Renamed from
3120 linux_continue_one_process. Use resume_ptr.
3121 (linux_resume): Use linux_continue_one_thread.
3122 * server.c (handle_v_cont, handle_v_requests): New functions.
3123 (myresume): New function.
3124 (main): Handle 'v' case.
3125 * target.h (struct thread_resume): New type.
3126 (struct target_ops): Change argument of "resume" to struct
3128 (myresume): Delete macro.
3130 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3132 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3133 (uninstall): Support DESTDIR.
3135 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3137 * configure.srv: Add xscale*linux copy of arm*linux entry.
3139 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3141 * linux-arm-low.c (arm_reinsert_addr): New function.
3142 (the_low_target): Add arm_reinsert_addr.
3144 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3146 * mem-break.c: Remove whitespace at end of file.
3148 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3150 * configure.in: Check whether we need to prototype strerror.
3151 * server.h: Optionally prototype strerror.
3152 * gdbreplay.c (perror_with_name): Use strerror.
3153 * linux-low.c (linux_attach_lwp): Use strerror.
3154 * utils.c (perror_with_name): Use strerror.
3155 * config.in, configure: Regenerated.
3157 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3159 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3160 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3162 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3164 * Makefile.in (SFILES): Update.
3165 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3166 low-sun3.c: Remove files.
3168 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3170 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3171 (linux_detach_one_process, linux_detach): New functions.
3172 (linux_target_ops): Add linux_detach.
3173 * server.c (main): Handle 'D' packet.
3174 * target.h (struct target_ops): Add "detach" member.
3175 (detach_inferior): Define.
3177 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3179 From Kelley Cook <kelleycook@wideopenwest.com>:
3180 * configure.srv: Accept i[34567]86 variants.
3182 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3184 * linux-low.c (linux_wait_for_event): Correct comment typos.
3185 (linux_resume_one_process): Call check_removed_breakpoint.
3186 (linux_send_signal): New function.
3187 (linux_target_ops): Add linux_send_signal.
3188 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3190 * target.h (struct target_ops): Add send_signal.
3192 2003-05-29 Jim Blandy <jimb@redhat.com>
3194 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3195 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3196 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3197 away part of the register's value.
3199 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3201 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3202 (linux_wait_for_event, linux_init_signals): Likewise.
3204 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
3206 * configure.in: Check for stdlib.h.
3207 * configure: Regenerated.
3208 * config.in: Regenerated.
3210 2003-01-04 Andreas Schwab <schwab@suse.de>
3212 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3214 2003-01-02 Andrew Cagney <ac131313@redhat.com>
3216 * Makefile.in: Remove obsolete code.
3218 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3220 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3221 defined(PT_FPR0_HI).
3223 2002-11-17 Stuart Hughes <seh@zee2.com>
3225 * linux-arm-low.c (arm_num_regs): Increase.
3226 (arm_regmap): Include status register.
3228 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3230 * linux-low.c (register_addr): Remove incorrect -1 check.
3232 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3234 * linux-low.c (linux_create_inferior): Call setpgid. Return
3236 (unstopped_p, linux_signal_pid): Remove.
3237 (linux_target_ops): Remove linux_signal_pid.
3238 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3239 global instead of target method.
3240 * target.h (struct target_ops): Remove signal_pid. Update comment
3241 for create_inferior.
3242 * server.c (signal_pid): New variable.
3243 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3244 gdbserver. Set the child to be the foreground process group.
3245 (attach_inferior): Set signal_pid.
3247 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3249 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3251 2002-08-20 Jim Blandy <jimb@redhat.com>
3253 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3256 2002-08-01 Andrew Cagney <cagney@redhat.com>
3258 * Makefile.in: Make chill references obsolete.
3260 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3262 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3263 * configure: Regenerate.
3264 * config.in: Regenerate.
3266 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3268 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3269 (perror_with_name, remote_close, remote_open, expect, play): Static.
3271 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3273 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3274 byte offsets instead of an array of indexes.
3275 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3277 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3279 * regcache.c: Add comment.
3281 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3283 * thread-db.c: New file.
3284 * proc-service.c: New file.
3285 * acinclude.m4: New file.
3286 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3287 proc-service.o, and thread-db.o.
3288 (linux-low.o): Add USE_THREAD_DB.
3289 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3290 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3291 * aclocal.m4: Regenerated.
3292 * config.in: Regenerated.
3293 * configure: Regenerated.
3294 * configure.in: Check for proc_service.h, sys/procfs.h,
3295 thread_db.h, and linux/elf.h headrs.
3296 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3297 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3298 Check for -lthread_db and thread support.
3299 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3300 PowerPC, and SuperH.
3301 * i387-fp.c: Constify arguments.
3302 * i387-fp.h: Likewise.
3303 * inferiors.c: (struct thread_info): Renamed from
3304 `struct inferior_info'. Remove PID member. Use generic inferior
3305 list header. All uses updated.
3306 (inferiors, signal_pid): Removed.
3307 (all_threads): New variable.
3308 (get_thread): Define.
3309 (add_inferior_to_list): New function.
3310 (for_each_inferior): New function.
3311 (change_inferior_id): New function.
3312 (add_inferior): Removed.
3313 (remove_inferior): New function.
3314 (add_thread): New function.
3315 (free_one_thread): New function.
3316 (remove_thread): New function.
3317 (clear_inferiors): Use for_each_inferior and free_one_thread.
3318 (find_inferior): New function.
3319 (find_inferior_id): New function.
3320 (inferior_target_data): Update argument type.
3321 (set_inferior_target_data): Likewise.
3322 (inferior_regcache_data): Likewise.
3323 (set_inferior_regcache_data): Likewise.
3324 * linux-low.c (linux_bp_reinsert): Remove.
3325 (all_processes, stopping_threads, using_thrads)
3326 (struct pending_signals, debug_threads, pid_of): New.
3327 (inferior_pid): Replace with macro.
3328 (struct inferior_linux_data): Remove.
3329 (get_stop_pc, add_process): New functions.
3330 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3331 Use add_process and add_thread.
3332 (linux_attach_lwp): New function, based on old linux_attach. Use
3333 add_process and add_thread. Set stop_expected for new threads.
3334 (linux_attach): New function.
3335 (linux_kill_one_process): New function.
3336 (linux_kill): Kill all LWPs.
3337 (linux_thread_alive): Use find_inferior_id.
3338 (check_removed_breakpoints, status_pending_p): New functions.
3339 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3340 Update. Use WNOHANG. Wait for cloned processes also. Update process
3341 struct for the found process.
3342 (linux_wait_for_event): New function.
3343 (linux_wait): Use it. Support LWPs.
3344 (send_sigstop, wait_for_sigstop, stop_all_processes)
3345 (linux_resume_one_process, linux_continue_one_process): New functions.
3346 (linux_resume): Support LWPs.
3347 (REGISTER_RAW_SIZE): Remove.
3348 (fetch_register): Use register_size instead. Call supply_register.
3349 (usr_store_inferior_registers): Likewise. Call collect_register.
3351 (regsets_fetch_inferior_registers): Improve error message.
3352 (regsets_store_inferior_registers): Add debugging.
3353 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3354 (unstopped_p, linux_signal_pid): New functions.
3355 (linux_target_ops): Add linux_signal_pid.
3356 (linux_init_signals): New function.
3357 (initialize_low): Call it. Initialize using_threads.
3358 * regcache.c (inferior_regcache_data): Add valid
3360 (get_regcache): Fetch registers lazily. Add fetch argument
3361 and update all callers.
3362 (regcache_invalidate_one, regcache_invalidate): New
3364 (new_register_cache): Renamed from create_register_cache.
3365 Return the new regcache.
3366 (free_register_cache): Change argument to a void *.
3367 (registers_to_string, registers_from_string): Call get_regcache
3368 with fetch flag set.
3369 (register_data): Make static. Pass fetch flag to get_regcache.
3370 (supply_register): Call get_regcache with fetch flag clear.
3371 (collect_register): Call get_regcache with fetch flag set.
3372 (collect_register_as_string): New function.
3373 * regcache.h: Update.
3374 * remote-utils.c (putpkt): Flush after debug output and use
3376 Handle input interrupts while waiting for an ACK.
3377 (input_interrupt): Use signal_pid method.
3378 (getpkt): Flush after debug output and use stderr.
3379 (outreg): Use collect_register_as_string.
3380 (new_thread_notify, dead_thread_notify): New functions.
3381 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3383 (look_up_one_symbol): Flush after debug output.
3384 * server.c (step_thread, server_waiting): New variables.
3385 (start_inferior): Don't use signal_pid. Update call to mywait.
3386 (attach_inferior): Update call to mywait.
3387 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3388 (main): Don't fetch/store registers explicitly. Use
3389 set_desired_inferior. Support proposed ``Hs'' packet. Update
3392 (struct inferior_list, struct_inferior_list_entry): New.
3393 * target.c (set_desired_inferior): New.
3394 (write_inferior_memory): Constify.
3395 (mywait): New function.
3397 (struct target_ops): New signal_pid method.
3398 (mywait): Removed macro, added prototype.
3400 * linux-low.h (regset_func): Removed.
3401 (regset_fill_func, regset_store_func): New.
3402 (enum regset_type): New.
3403 (struct regset_info): Add type field. Use new operation types.
3404 (struct linux_target_ops): stop_pc renamed to get_pc.
3405 Add decr_pc_after_break and breakpoint_at.
3406 (get_process, get_thread_proess, get_process_thread)
3407 (strut process_info, all_processes, linux_attach_lwp)
3408 (thread_db_init): New.
3410 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3411 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3412 (the_low_target): Add new members.
3413 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3414 (i386_store_fpxregset): Constify.
3415 (target_regsets): Add new kind identifier.
3416 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3417 (i386_set_pc): Add debugging.
3418 (i386_breakpoint_at): New function.
3419 (the_low_target): Add new members.
3420 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3421 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3422 (mips_breakpoint_at): New.
3423 (the_low_target): Add new members.
3424 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3425 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3426 (the_low_target): Add new members.
3427 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3428 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3429 (the_low_target): Add new members.
3430 * linux-x86-64-low.c (target_regsets): Add new kind
3433 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3435 From Martin Pool <mbp@samba.org>:
3436 * server.c (gdbserver_usage): New function.
3439 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3441 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3444 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3446 * Makefile.in: Remove obsolete code.
3448 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3450 * linux-low.c (regsets_fetch_inferior_registers),
3451 (regsets_store_inferior_registers): Removed cast to int from
3453 * regcache.h: Added declaration of struct inferior_info.
3455 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3457 * inferiors.c (struct inferior_info): Add regcache_data.
3458 (add_inferior): Call create_register_cache.
3459 (clear_inferiors): Call free_register_cache.
3460 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3461 * regcache.c (struct inferior_regcache_data): New.
3462 (registers): Remove.
3463 (get_regcache): New function.
3464 (create_register_cache, free_register_cache): New functions.
3465 (set_register_cache): Don't initialize the register cache here.
3466 (registers_to_string, registers_from_string, register_data): Call
3468 * regcache.h: Add prototypes.
3469 * server.h: Likewise.
3471 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3473 * mem-break.c: New file.
3474 * mem-break.h: New file.
3475 * Makefile.in: Add mem-break.o rule; update server.h
3477 * inferiors.c (struct inferior_info): Add target_data
3479 (clear_inferiors): Free target_data member if set.
3480 (inferior_target_data, set_inferior_target_data): New functions.
3481 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3482 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3483 * linux-low.c (linux_bp_reinsert): New variable.
3484 (struct inferior_linux_data): New.
3485 (linux_create_inferior): Use set_inferior_target_data.
3486 (linux_attach): Likewise. Call add_inferior.
3487 (linux_wait_for_one_inferior): New function.
3488 (linux_wait): Call it.
3489 (linux_write_memory): Add const.
3490 (initialize_low): Call set_breakpoint_data.
3491 * linux-low.h (struct linux_target_ops): Add breakpoint
3493 * server.c (attach_inferior): Remove extra add_inferior
3495 * server.h: Include mem-break.h. Update inferior.c
3497 * target.c (read_inferior_memory)
3498 (write_inferior_memory): New functions.
3499 * target.h (read_inferior_memory)
3500 (write_inferior_memory): Change macros to prototypes.
3501 (struct target_ops): Update comments. Add const to write_memory
3504 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3506 * linux-low.c (usr_store_inferior_registers): Support
3507 registers which are allowed to fail to store.
3508 * linux-low.h (linux_target_ops): Likewise.
3509 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3510 (ppc_cannot_store_register): FPSCR may not be storable.
3512 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3514 * server.h: Include <string.h> if HAVE_STRING_H.
3515 * ChangeLog: Correct paths in last ChangeLog entry.
3517 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3519 * linux-low.h: Remove obsolete prototypes.
3520 (struct linux_target_ops): New.
3521 (extern the_low_target): New.
3522 * linux-low.c (num_regs, regmap): Remove declarations.
3523 (register_addr): Use the_low_target explicitly.
3524 (fetch_register): Likewise.
3525 (usr_fetch_inferior_registers): Likewise.
3526 (usr_store_inferior_registers): Likewise.
3527 * linux-arm-low.c (num_regs): Remove.
3528 (arm_num_regs): Define.
3529 (arm_regmap): Renamed from regmap, made static.
3530 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3532 (arm_cannot_store_register): Renamed from cannot_store_register,
3534 (the_low_target): New.
3535 * linux-i386-low.c (num_regs): Remove.
3536 (i386_num_regs): Define.
3537 (i386_regmap): Renamed from regmap, made static.
3538 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3540 (i386_cannot_store_register): Renamed from cannot_store_register,
3542 (the_low_target): New.
3543 * linux-ia64-low.c (num_regs): Remove.
3544 (ia64_num_regs): Define.
3545 (ia64_regmap): Renamed from regmap, made static.
3546 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3548 (ia64_cannot_store_register): Renamed from cannot_store_register,
3550 (the_low_target): New.
3551 * linux-m68k-low.c (num_regs): Remove.
3552 (m68k_num_regs): Define.
3553 (m68k_regmap): Renamed from regmap, made static.
3554 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3556 (m68k_cannot_store_register): Renamed from cannot_store_register,
3558 (the_low_target): New.
3559 * linux-mips-low.c (num_regs): Remove.
3560 (mips_num_regs): Define.
3561 (mips_regmap): Renamed from regmap, made static.
3562 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3564 (mips_cannot_store_register): Renamed from cannot_store_register,
3566 (the_low_target): New.
3567 * linux-ppc-low.c (num_regs): Remove.
3568 (ppc_num_regs): Define.
3569 (ppc_regmap): Renamed from regmap, made static.
3570 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3572 (ppc_cannot_store_register): Renamed from cannot_store_register,
3574 (the_low_target): New.
3575 * linux-s390-low.c (num_regs): Remove.
3576 (s390_num_regs): Define.
3577 (s390_regmap): Renamed from regmap, made static.
3578 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3580 (s390_cannot_store_register): Renamed from cannot_store_register,
3582 (the_low_target): New.
3583 * linux-sh-low.c (num_regs): Remove.
3584 (sh_num_regs): Define.
3585 (sh_regmap): Renamed from regmap, made static.
3586 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3588 (sh_cannot_store_register): Renamed from cannot_store_register,
3590 (the_low_target): New.
3591 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3592 (the_low_target): New.
3594 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3596 * Makefile.in: Add stamp-h target.
3597 * configure.in: Create stamp-h.
3598 * configure: Regenerated.
3600 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3602 * inferiors.c: New file.
3603 * target.c: New file.
3604 * target.h: New file.
3605 * Makefile.in: Add target.o and inferiors.o. Update
3607 * linux-low.c (inferior_pid): New static variable,
3608 moved from server.c.
3609 (linux_create_inferior): Renamed from create_inferior.
3610 Call add_inferior. Return 0 on success instead of a PID.
3611 (linux_attach): Renamed from myattach.
3612 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3613 (linux_thread_alive): Renamed from mythread_alive.
3614 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3616 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3617 (regsets_store_inferior_registers): Correct error message.
3618 Add missing ``return 0''.
3619 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3620 (linux_store_registers): Renamed from store_inferior_registers.
3621 (linux_read_memory): Renamed from read_inferior_memory.
3622 (linux_write_memory): Renamed from write_inferior_memory.
3623 (linux_target_ops): New structure.
3624 (initialize_low): Call set_target_ops ().
3625 * remote-utils.c (unhexify): New function.
3626 (hexify): New function.
3627 (input_interrupt): Send signals to ``signal_pid''.
3628 * server.c (inferior_pid): Remove.
3629 (start_inferior): Update create_inferior call.
3630 (attach_inferior): Call add_inferior.
3631 (handle_query): New function.
3632 (main): Call handle_query for `q' packets.
3633 * server.h: Include "target.h". Remove obsolete prototypes.
3634 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3636 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3638 * Makefile.in: Add WARN_CFLAGS. Update configury
3640 * configure.in: Check for <string.h>
3641 * configure: Regenerate.
3642 * config.in: Regenerate.
3643 * gdbreplay.c: Include needed system headers.
3644 (remote_open): Remove strchr prototype.
3645 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3646 * regcache.c (supply_register): Change buf argument to const void *.
3647 (supply_register_by_name): Likewise.
3648 (collect_register): Change buf argument to void *.
3649 (collect_register_by_name): Likewise.
3650 * regcache.h: Add missing prototypes.
3651 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3652 * server.c (handle_query): New function.
3653 (attached): New static variable, moved out of main.
3654 (main): Quiet longjmp clobber warnings.
3655 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3656 * utils.c (error): Remove NORETURN.