1 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9 prototype to take a regcache. Adjust.
11 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13 * regcache.h (struct thread_info): Forward declare.
14 (struct regcache): New.
15 (new_register_cache): Adjust prototype.
16 (get_thread_regcache): Declare.
17 (free_register_cache): Adjust prototype.
18 (registers_to_string, registers_from_string): Ditto.
19 (supply_register, supply_register_by_name, collect_register)
20 (collect_register_as_string, collect_register_by_name): Ditto.
21 * regcache.c (struct inferior_regcache_data): Delete.
22 (get_regcache): Rename to ...
23 (get_thread_regcache): ... this. Adjust. Switch inferior before
25 (regcache_invalidate_one): Adjust.
26 (regcache_invalidate): Fix prototype.
27 (new_register_cache): Return the new register cache.
28 (free_register_cache): Change prototype.
29 (realloc_register_cache): Adjust.
30 (registers_to_string): Change prototype to take a regcache. Adjust.
31 (registers_from_string): Ditto.
32 (register_data): Ditto.
33 (supply_register): Ditto.
34 (supply_register_by_name): Ditto.
35 (collect_register): Ditto.
36 (collect_register_as_string): Ditto.
37 (collect_register_by_name): Ditto.
38 * server.c (process_serial_event): Adjust.
39 * linux-low.h (regset_fill_func, regset_store_func): Change
41 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
43 * linux-low.c (get_stop_pc): Adjust.
44 (check_removed_breakpoint): Adjust.
45 (linux_wait_for_event): Adjust.
46 (linux_resume_one_lwp): Adjust.
47 (fetch_register): Add regcache parameter. Adjust.
48 (usr_store_inferior_registers): Ditto.
49 (regsets_fetch_inferior_registers): Ditto.
50 (regsets_store_inferior_registers): Ditto.
51 (linux_fetch_registers, linux_store_registers): Ditto.
52 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
54 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
55 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
56 prototype to take a regcache.
57 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
58 * remote-utils.c (convert_ascii_to_int, outreg)
59 (prepare_resume_reply): Change prototype to take a regcache.
61 * target.h (struct target_ops) <fetch_registers, store_registers>:
62 Change prototype to take a regcache.
63 (fetch_inferior_registers, store_inferior_registers): Change
64 prototype to take a regcache. Adjust.
65 * proc-service.c (ps_lgetregs): Adjust.
66 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
67 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
68 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
69 take a regcache. Adjust.
70 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
71 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
72 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
73 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
74 * linux-cris-low.c (cris_get_pc, cris_set_pc)
75 (cris_cannot_fetch_register):
76 (cris_breakpoint_at): Change prototype to take a regcache.
78 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
79 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
80 to take a regcache. Adjust.
81 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
83 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
84 take a regcache. Adjust.
85 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
86 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
87 (m68k_set_pc): Change prototype to take a regcache. Adjust.
88 * linux-mips-low.c (mips_get_pc):
89 (mips_set_pc): Change prototype to take a regcache. Adjust.
90 (mips_reinsert_addr): Adjust.
91 (mips_collect_register): Change prototype to take a regcache.
93 (mips_supply_register):
94 (mips_collect_register_32bit, mips_supply_register_32bit)
95 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
96 (mips_store_fpregset): Ditto.
97 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
99 (parse_spufs_run): Adjust.
100 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
101 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
102 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
103 take a regcache. Adjust.
104 * linux-s390-low.c (s390_collect_ptrace_register)
105 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
106 (s390_set_pc): Change prototype to take a regcache. Adjust.
107 (s390_arch_setup): Adjust.
108 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
109 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
110 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
111 (sparc_fill_gregset, sparc_store_gregset_from_stack)
112 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
114 (sparc_breakpoint_at): Adjust.
115 * linux-xtensa-low.c (xtensa_fill_gregset):
116 (xtensa_store_gregset):
117 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
118 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
119 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
120 prototype to take a regcache. Adjust.
121 * win32-arm-low.c (arm_fetch_inferior_register)
122 (arm_store_inferior_register): Change prototype to take a
124 * win32-i386-low.c (i386_fetch_inferior_register)
125 (i386_store_inferior_register): Change prototype to take a
127 * win32-low.c (child_fetch_inferior_registers)
128 (child_store_inferior_registers): Change prototype to take a
130 (win32_wait): Adjust.
131 (win32_fetch_inferior_registers): Change prototype to take a
133 (win32_store_inferior_registers): Adjust.
134 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
135 store_inferior_register>: Change prototype to take a regcache.
137 2010-01-20 Doug Evans <dje@google.com>
139 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
141 (linux_wait_for_event1, linux_init_signals): Ditto.
142 (W_STOPCODE): Provide definition if missing.
144 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
146 * linux-low.c (linux_core_of_thread): New.
147 (compare_ints, show_process, list_threads): New.
148 (linux_qxfer_osdata): Report threads and cores.
149 (linux_target_op): Register linux_core_of_thread.
150 * remote-utils.c (prepare_resume_reply): Report the core.
151 (buffer_xml_printf): Support %d specifier.
152 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
154 (handle_query): Handle qXfer:threads. Announce availability
156 * target.h (struct target_ops): New field core_of_thread.
158 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
160 * Makefile.in (clean): Remove new generated files.
161 (reg-s390.o, reg-s390.c): Remove rules.
162 (reg-s390x.o, reg-s390x.c): Likewise.
163 (s390-linux32.o, s390-linux32.c): Add rules.
164 (s390-linux64.o, s390-linux64.c): Likewise.
165 (s390x-linux64.o, s390x-linux64.c): Likewise.
166 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
167 * linux-s390-low.c: Include <elf.h>.
168 (HWCAP_S390_HIGH_GPRS): Define if undefined.
169 (init_registers_s390): Remove prototype.
170 (init_registers_s390x): Likewise.
171 (init_registers_s390_linux32): Add prototype.
172 (init_registers_s390_linux64): Likewise.
173 (init_registers_s390x_linux64): Likewise.
174 (s390_num_regs_3264): New define.
175 (s390_regmap_3264): New global variable.
176 (s390_cannot_fetch_register): Remove obsolete check.
177 (s390_cannot_store_register): Likewise.
178 (s390_collect_ptrace_register): Handle upper/lower register halves.
179 (s390_supply_ptrace_register): Likewise.
180 (s390_fill_gregset): Update to register number changes.
181 (s390_get_hwcap): New routine.
182 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
183 Install appropriate regmap and register set.
185 2010-01-01 Joel Brobecker <brobecker@adacore.com>
187 * server.c (gdbserver_version): Update copyright year to 2010.
188 * gdbreplay.c (gdbreplay_version): Likewise.
190 2009-12-28 Doug Evans <dje@google.com>
192 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
193 elf/external.h. Include <elf.h> instead but only if necessary.
195 2009-12-28 Pedro Alves <pedro@codesourcery.com>
197 * linux-low.c (linux_remove_process): Remove `detaching'
198 parameter. Don't release/detach from thread_db here.
199 (linux_kill): Release/detach from thread_db here, ...
200 (linux_detach): ... and here, before actually detaching.
201 (linux_wait_1): ... and here, when a process exits.
202 * thread-db.c (any_thread_of): New.
203 (thread_db_free): Switch the current inferior to a thread of the
206 2009-12-21 Doug Evans <dje@google.com>
208 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
210 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
211 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
212 warning ifndef __NR_tkill. Move setting of errno there too.
213 Delete unnecessary resetting of errno after syscall.
214 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
216 * configure.ac: Check for dladdr.
217 * config.in: Regenerate.
218 * configure: Regenerate.
219 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
220 (try_thread_db_load): Update.
222 * linux-low.c (my_waitpid): Delete unnecessary prototype.
224 2009-12-18 Doug Evans <dje@google.com>
226 * event-loop.c: Include unistd.h if it exists.
228 * linux-low.c (my_waitpid): Move definition away from being in
229 between linux_tracefork_child/linux_test_for_tracefork.
231 * gdb_proc_service.h (psaddr_t): Fix type.
232 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
233 signature to match glibc.
235 2009-12-16 Doug Evans <dje@google.com>
237 * linux-low.c (linux_read_memory): Fix argument to read.
239 2009-11-26 Pedro Alves <pedro@codesourcery.com>
241 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
242 events, don't leave current_inferior pointing at null.
244 2009-11-26 Pedro Alves <pedro@codesourcery.com>
246 * win32-low.c (LOG): Delete.
247 (OUTMSG): Output to stderr.
248 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
249 on compile time LOG macro.
250 (win32_wait): Fix debug output.
252 2009-11-26 Pedro Alves <pedro@codesourcery.com>
254 * win32-low.c (win32_add_one_solib): If the dll name is
255 "ntdll.dll", prepend the system directory to the dll path.
257 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
259 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
261 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
262 Vladimir Prus <vladimir@codesourcery.com>
264 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
265 * configure.ac: Check for __mcoldfire__ and set
266 gdb_cv_m68k_is_coldfire.
267 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
268 reg-cf.o and reg-m68k.o.
269 * configure: Regenerated.
271 2009-11-16 Pedro Alves <pedro@codesourcery.com>
273 * linux-low.c (linux_remove_process): Add `detaching' parameter.
274 Pass it to thread_db_free.
275 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
276 proper `detaching' argument to linux_remove_process.
277 * linux-low.h (thread_db_free): Add `detaching' parameter.
278 * thread-db.c (thread_db_init): Pass false as `detaching' argument
280 (thread_db_free): Add `detaching' parameter. Only
281 call td_ta_clear_event if detaching from process.
283 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
285 * thread-db.c (thread_db_free): Fix typo.
287 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
290 * thread-db.c (thread_db_free): Call td_ta_clear_event.
292 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
294 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
295 with an i686 compiler.
296 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
298 * configure: Rebuilt.
300 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
304 * server.c (handle_search_memory_1): Correct read_addr initialization
305 in loop for searching subsequent chunks.
307 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
309 * configure.ac: New --with-libthread-db option.
310 * thread-db.c: Allow direct dependence on libthread_db.
311 (thread_db_free): Adjust.
312 * config.in: Regenerate.
313 * configure: Likewise.
315 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
318 * thread-db.c (attach_thread): New function.
319 (maybe_attach_thread): Return success/failure.
320 (find_new_threads_callback): Adjust.
321 (thread_db_find_new_threads): Loop until no new threads.
323 2009-10-13 Pedro Alves <pedro@codesourcery.com>
325 * proc-service.c (ps_lgetregs): Formatting.
327 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
329 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
330 * configure.ac: Adjust.
331 * linux-low.h (struct process_info_private): Move members to struct
333 (thread_db_free, thread_db_handle_monitor_command): New prototype.
334 * linux-low.c (linux_remove_process): Adjust.
335 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
336 * server.c (handle_query): Move code ...
337 (handle_monitor_command): ... here. New function.
338 * target.h (struct target_ops): New member.
339 * thread-db.c (struct thread_db): New.
340 (libthread_db_search_path): New variable.
341 (thread_db_create_event, thread_db_enable_reporting)
342 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
343 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
344 (try_thread_db_load_1, dladdr_to_soname): New functions.
345 (try_thread_db_load, thread_db_load_search): New functions.
346 (thread_db_init): Search for libthread_db.
347 (thread_db_free): New function.
348 (thread_db_handle_monitor_command): Likewise.
349 * config.in: Regenerate.
350 * configure: Regenerate.
352 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
354 * spu-low.c (spu_kill): Wait for inferior to terminate.
355 Call clear_inferiors.
356 (spu_detach): Call clear_inferiors.
358 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
360 * aclocal.m4: Regenerate.
361 * config.in: Likewise.
362 * configure: Likewise.
364 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
366 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
367 (parse_spufs_run): New function.
368 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
369 (ppc_breakpoint_at): Handle SPU breakpoints.
371 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
373 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
374 (SPUFS_MAGIC): Define.
375 (spu_enumerate_spu_ids): New function.
376 (linux_qxfer_spu): New function.
377 (linux_target_ops): Install linux_qxfer_spu.
379 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
381 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
382 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
383 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
384 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
385 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
386 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
387 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
388 (init_registers_powerpc_cell32l): Add prototype.
389 (init_registers_powerpc_cell64l): Likewise.
390 (ppc_arch_setup): Detect Cell/B.E. architecture.
392 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
394 * Makefile.in (datarootdir): New variable.
396 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
398 * linux-low.c (linux_write_memory): Update debugging output.
399 * Makefile.in (clean): Add new descriptions.
400 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
401 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
402 * configure.srv: Add new files for arm*-*-linux*.
403 * linux-arm-low.c: Add new declarations.
404 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
405 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
406 (HWCAP_VFPv3D16): New.
407 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
408 instead of __IWMMXT__.
409 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
410 (arm_arch_setup): New.
411 (target_regsets): Remove #ifdef. Add VFP regset.
412 (the_low_target): Use arm_arch_setup.
414 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
416 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
417 the main thread again.
419 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
421 Adding Neutrino gdbserver.
422 * configure: Regenerated.
423 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
424 * configure.srv (i[34567]86-*-nto*): New target.
425 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
426 * remote-utils.c [__QNX__]: Include sys/iomgr.h
427 (nto_comctrl) [__QNX__]: New function.
428 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
430 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
432 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
435 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
436 Pedro Alves <pedro@codesourcery.com>
438 * win32-i386-low.c (i386_get_thread_context): Handle systems that
439 don't support CONTEXT_EXTENDED_REGISTERS.
440 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
441 (the_low_target): Install them.
442 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
443 failing with ERROR_PIPE_NOT_CONNECTED.
445 2009-06-30 Doug Evans <dje@google.com>
446 Pierre Muller <muller@ics.u-strasbg.fr>
448 Add h/w watchpoint support to x86-linux, win32-i386.
449 * Makefile.in (SFILES): Add i386-low.c
450 (i386_low_h): Define.
451 (i386-low.o): Add dependencies.
452 (linux-x86-low.o): Add i386-low.h dependency.
453 (win32-i386-low.o): Ditto.
454 * i386-low.c: New file.
455 * i386-low.h: New file.
456 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
457 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
458 * linux-low.c (linux_add_process): Initialize arch_private.
459 (linux_remove_process): Free arch_private.
460 (add_lwp): Initialize arch_private.
461 (delete_lwp): Free arch_private.
462 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
464 * linux-low.h (process_info_private): New member arch_private.
465 (lwp_info): New member arch_private.
466 (linux_target_ops): New members new_process, new_thread,
468 (ptid_of): New macro.
469 * linux-x86-low.c: Include stddef.h, i386-low.h.
470 (arch_process_info): New struct.
471 (arch_lwp_info): New struct.
472 (x86_linux_dr_get, x86_linux_dr_set): New functions.
473 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
474 (i386_dr_low_get_status): New function.
475 (x86_insert_point, x86_remove_point): New functions.
476 (x86_stopped_by_watchpoint): New function.
477 (x86_stopped_data_address): New function.
478 (x86_linux_new_process, x86_linux_new_thread): New functions.
479 (x86_linux_prepare_to_resume): New function.
480 (the_low_target): Add entries for insert_point, remove_point,
481 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
483 * server.c (debug_hw_points): New global.
484 (monitor_show_help): Document set debug-hw-points.
485 (handle_query): Process "set debug-hw-points".
486 * server.h (debug_hw_points): Declare.
488 * utils.c (NUMCELLS, CELLSIZE): New macros.
489 (get_sell, xsnprintf, paddress): New functions.
490 * win32-arm-low.c (the_low_target): Add entries for insert_point,
491 remove_point, stopped_by_watchpoint, stopped_data_address.
492 * win32-i386-low.c: Include i386-low.h.
493 (debug_reg_state): Replaces dr.
494 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
495 (i386_dr_low_get_status): New function.
496 (i386_insert_point, i386_remove_point): New functions.
497 (i386_stopped_by_watchpoint): New function.
498 (i386_stopped_data_address): New function.
499 (i386_initial_stuff): Update.
500 (get_thread_context,set_thread_context,i386_thread_added): Update.
501 (the_low_target): Add entries for insert_point,
502 remove_point, stopped_by_watchpoint, stopped_data_address.
503 * win32-low.c (win32_insert_watchpoint): New function.
504 (win32_remove_watchpoint): New function.
505 (win32_stopped_by_watchpoint): New function.
506 (win32_stopped_data_address): New function.
507 (win32_target_ops): Add entries for insert_watchpoint,
508 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
509 * win32-low.h (win32_target_ops): New members insert_point,
510 remove_point, stopped_by_watchpoint, stopped_data_address.
512 2009-06-25 Pedro Alves <pedro@codesourcery.com>
514 * server.c (process_serial_event): Re-return unsupported, not
515 error, if the type isn't recognized. Re-allow supporting only
516 insert or remove packets. Also call require_running for
517 breakpoints. Add missing break statement to default case. Tidy.
518 * target.h (struct target_ops): Rename insert_watchpoint to
519 insert_point, and remove_watchpoint to remove_point.
521 * linux-low.h (struct linux_target_ops): Likewise.
522 * linux-low.c (linux_insert_watchpoint): Rename to ...
523 (linux_insert_point): ... this. Adjust.
524 (linux_remove_watchpoint): Rename to ...
525 (linux_remove_point): ... this. Adjust.
526 (linux_target_ops): Adjust.
527 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
528 (cris_insert_point): ... this.
529 (cris_remove_watchpoint): Rename to ...
530 (cris_remove_point): ... this.
531 (the_low_target): Adjust.
533 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
535 * server.c (handle_v_kill): Pass signal_pid to
536 kill_inferior if multi_process is zero.
538 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
540 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
541 * target.h (target_ops): Comment for *_watchpoint to make it clear
542 the functions can get types '0' and '1'.
544 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
546 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
547 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
548 * regcache.c (get_regcache): Likewise.
549 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
550 * win32-low.c (child_fetch_inferior_registers): Remove check for
553 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
554 Pedro Alves <pedro@codesourcery.com>
556 * target.h (struct target_ops) <supports_multi_process>: New
558 (target_supports_multi_process): New.
559 * server.c (handle_query): Even if GDB reports support, only
560 enable multi-process if the target also supports it. Report
561 multi-process support only if the target backend supports it.
562 * linux-low.c (linux_supports_multi_process): New function.
563 (linux_target_ops): Install it as target_supports_multi_process
566 2009-05-24 Doug Evans <dje@google.com>
568 Global renaming of find_thread_pid to find_thread_ptid.
569 * server.h (find_thread_ptid): Renamed from find_thread_pid.
570 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
573 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
574 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
577 * linux-low.c (get_stop_pc): Print pc if debug_threads.
578 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
579 (linux_resume_one_lwp): Ditto.
581 2009-05-23 Doug Evans <dje@google.com>
583 * linux-low.c (linux_resume_one_lwp): Change type of first arg
584 from struct inferior_list_entry * to struct lwp_info *.
587 2009-05-13 Doug Evans <dje@google.com>
589 * linux-x86-low.c: Don't include assert.h.
590 (x86_siginfo_fixup): Use fatal, not assert.
591 (x86_arch_setup): Fix comment.
593 2009-05-12 Doug Evans <dje@google.com>
595 Biarch support for i386/amd64 gdbserver.
596 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
598 (linux-i386-low.o, linux-x86-64-low.o): Delete.
599 (linux-x86-low.o): Add.
600 * linux-x86-64-low.c: Delete.
601 * linux-i386-low.c: Delete.
602 * linux-x86-low.c: New file.
603 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
605 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
607 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
608 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
609 (linux_child_pid_to_exec_file): New function.
610 (elf_64_header_p, elf_64_file_p): New functions.
611 (siginfo_fixup): New function.
612 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
613 give target a chance to convert layout.
614 * linux-low.h (linux_target_ops): New member siginfo_fixup.
615 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
617 2009-05-07 Doug Evans <dje@google.com>
619 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
620 (regsets_store_inferior_registers): Ditto.
622 2009-05-06 Pedro Alves <pedro@codesourcery.com>
626 * linux-low.c (must_set_ptrace_flags): Delete.
627 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
629 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
630 `lwp->must_set_ptrace_flags' instead.
631 (linux_wait_for_event_1): Set ptrace options here.
632 (linux_wait_1): ... not here.
634 2009-04-30 Doug Evans <dje@google.com>
636 * inferiors.c (started_inferior_callback): New function.
637 (attached_inferior_callback): New function.
638 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
639 * server.c (print_started_pid, print_attached_pid): New functions.
640 (detach_or_kill_for_exit): New function.
641 (main): Call it instead of for_each_inferior (kill_inferior_callback).
642 * server.h (have_started_inferiors_p): Declare.
643 (have_attached_inferiors_p): Declare.
645 * inferiors.c (remove_process): Fix memory leak, free process.
646 * linux-low.c (linux_remove_process): New function.
647 (linux_kill): Call it instead of remove_process.
648 (linux_detach, linux_wait_1): Ditto.
650 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
652 * configure.srv: Add x86 Windows CE target.
654 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
656 * inferiors.c (get_thread_process): Make global.
657 * server.h (get_thread_process): Add prototype.
658 * thread-db.c (find_one_thread): Use get_thread_process
659 instead of current_process.
660 (thread_db_get_tls_address): Do not crash if called when
661 thread layer is not yet initialized.
663 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
665 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
666 * spu-low.c (current_tid): Rename to ...
667 (current_ptid): ... this.
668 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
669 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
670 ptid_get_lwp (current_ptid) instead of current_tid.
671 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
672 instead of current_tid. Use find_process_pid to verify pid
673 argument is valid. Pass proper argument to remove_process.
674 (spu_thread_alive): Compare current_ptid instead of current_tid.
675 (spu_resume): Likewise.
677 2009-04-02 Pedro Alves <pedro@codesourcery.com>
679 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
682 2009-04-01 Pedro Alves <pedro@codesourcery.com>
684 Implement the multiprocess extensions, and add linux multiprocess
687 * server.h (ULONGEST): Declare.
688 (struct ptid, ptid_t): New.
689 (minus_one_ptid, null_ptid): Declare.
690 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
691 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
692 (struct inferior_list_entry): Change `id' type from unsigned from
694 (struct sym_cache, struct breakpoint, struct
695 process_info_private): Forward declare.
696 (struct process_info): Declare.
697 (current_process): Declare.
698 (all_processes): Declare.
699 (initialize_inferiors): Declare.
700 (add_thread): Adjust to use ptid_t.
701 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
702 (add_process, remove_process, find_thread_pid): Declare.
703 (find_inferior_id): Adjust to use ptid_t.
704 (cont_thread, general_thread, step_thread): Change type to ptid_t.
705 (multi_process): Declare.
706 (push_event): Adjust to use ptid_t.
707 (read_ptid, write_ptid): Declare.
708 (prepare_resume_reply): Adjust to use ptid_t.
709 (clear_symbol_cache): Declare.
710 * inferiors.c (all_processes): New.
711 (null_ptid, minus_one_ptid): New.
712 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
713 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
714 (add_thread): Change unsigned long to ptid. Remove gdb_id
716 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
717 (gdb_id_to_thread): Rename to ...
718 (find_thread_pid): ... this. Change unsigned long to ptid.
719 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
720 (loaded_dll, pull_pid_from_list): Adjust.
721 (add_process, remove_process, find_process_pid)
722 (get_thread_process, current_process, initialize_inferiors): New.
723 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
724 (struct target_waitstatus) <related_pid>: Ditto.
725 (struct target_ops) <kill, detach>: Add `pid' argument. Change
727 (struct target_ops) <join>: Add `pid' argument.
728 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
729 (struct target_ops) <wait>: Add `ptid' field. Change return type
731 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
732 (mywait): Add `ptid' argument. Change return type to ptid_t.
733 (target_pid_to_str): Declare.
734 * target.c (set_desired_inferior): Adjust to use ptids.
735 (mywait): Add new `ptid' argument. Adjust.
736 (target_pid_to_str): New.
737 * mem-break.h (free_all_breakpoints): Declare.
738 * mem-break.c (breakpoints): Delelete.
739 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
740 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
741 to use per-process breakpoint list.
742 (free_all_breakpoints): New.
743 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
744 (symbol_cache, all_symbols_looked_up): Delete.
746 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
748 (prepare_resume_reply): Change ptid argument's type from unsigned
749 long to ptid_t. Adjust. Implement W;process and X;process.
750 (free_sym_cache, clear_symbol_cache): New.
751 (look_up_one_symbol): Adjust to per-process symbol cache. *
752 * server.c (cont_thread, general_thread, step_thread): Change type
755 (multi_process): New.
756 (last_ptid): Change type to ptid_t.
757 (struct vstop_notif) <ptid>: Change type to ptid_t.
758 (queue_stop_reply, push_event): Change `ptid' argument's type to
760 (discard_queued_stop_replies): Add `pid' argument.
761 (start_inferior): Adjust to use ptids. Adjust to mywait interface
762 changes. Don't reference the `attached' global.
763 (attach_inferior): Adjust to mywait interface changes.
764 (handle_query): Adjust to use ptids. Parse GDB's qSupported
765 features. Handle and report "multiprocess+". Handle
767 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
769 (handle_v_kill): New.
770 (handle_v_stopped): Adjust to use target_pid_to_str.
771 (handle_v_requests): Allow multiple attaches and runs when
772 multiprocess extensions are in effect. Handle "vKill".
773 (myresume): Adjust to use ptids.
774 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
775 (handle_status): Adjust to discard_queued_stop_replies interface
777 (first_thread_of, kill_inferior_callback)
778 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
779 (main): Call initialize_inferiors. Adjust to use ptids, killing
780 and detaching from all inferiors. Handle multiprocess packet
782 * linux-low.h: Include gdb_proc_service.h.
783 (struct process_info_private): New.
784 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
785 <lwpid_of>: Use ptid_get_lwp.
786 (get_lwp_thread): Adjust.
787 (struct lwp_info): Add `dead' member.
788 (find_lwp_pid): Declare.
789 * linux-low.c (thread_db_active): Delete.
790 (new_inferior): Adjust comment.
791 (inferior_pid): Delete.
792 (linux_add_process): New.
793 (handle_extended_wait): Adjust.
794 (add_lwp): Change unsigned long to ptid.
795 (linux_create_inferior): Add process to processes table. Adjust
796 to use ptids. Don't set new_inferior here.
797 (linux_attach_lwp): Rename to ...
798 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
799 it. Adjust to use ptids.
800 (linux_attach_lwp): New.
801 (linux_attach): Add process to processes table. Don't set
803 (struct counter): New.
804 (second_thread_of_pid_p, last_thread_of_process_p): New.
805 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
807 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
808 processes. Remove process from process table.
809 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
810 to multiple processes.
811 (any_thread_of): New.
812 (linux_detach): Add `pid' argument, and handle it. Remove process
813 from processes table.
814 (linux_join): Add `pid' argument. Handle it.
815 (linux_thread_alive): Change unsighed long argument to ptid_t.
816 Consider dead lwps as not being alive.
817 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
818 threads we're not interested in.
819 (same_lwp, find_lwp_pid): New.
820 (linux_wait_for_lwp): Change `pid' argument's type from int to
822 (linux_wait_for_event): Rename to ...
823 (linux_wait_for_event_1): ... this. Change `pid' argument's type
824 from int to ptid_t. Adjust.
825 (linux_wait_for_event): New.
826 (linux_wait_1): Add `ptid' argument. Change return type to
827 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
828 that exit from the process table.
829 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
831 (mark_lwp_dead): New.
832 (wait_for_sigstop): Adjust to use ptids. If a process exits while
833 stopping all threads, mark its main lwp as dead.
834 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
836 (fetch_register, usr_store_inferior_registers)
837 (regsets_fetch_inferior_registers)
838 (regsets_store_inferior_registers, linux_read_memory)
839 (linux_write_memory): Inline `inferior_pid'.
840 (linux_look_up_symbols): Adjust to use per-process
842 (linux_request_interrupt): Adjust to use ptids.
843 (linux_read_auxv): Inline `inferior_pid'.
844 (initialize_low): Don't reference thread_db_active.
845 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
846 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
847 (ps_getpid): Return the pid of the current inferior.
848 * thread-db.c (proc_handle, thread_agent): Delete.
849 (thread_db_create_event, thread_db_enable_reporting): Adjust to
851 (find_one_thread): Change argument type to ptid_t. Adjust to
853 (maybe_attach_thread): Adjust to per-process data and ptids.
854 (thread_db_find_new_threads): Ditto.
855 (thread_db_init): Ditto.
856 * spu-low.c (spu_create_inferior, spu_attach): Add process to
857 processes table. Adjust to use ptids.
858 (spu_kill, spu_detach): Adjust interface. Remove process from
860 (spu_join, spu_thread_alive): Adjust interface.
861 (spu_wait): Adjust interface. Remove process from processes
862 table. Adjust to use ptids.
863 * win32-low.c (current_inferior_tid): Delete.
864 (current_inferior_ptid): New.
865 (debug_event_ptid): New.
866 (thread_rec): Take a ptid. Adjust.
867 (child_add_thread): Add `pid' argument. Adjust to use ptids.
868 (child_delete_thread): Ditto.
869 (do_initial_child_stuff): Add `attached' argument. Add process to
871 (child_fetch_inferior_registers, child_store_inferior_registers):
873 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
874 (win32_attach): Pass 1 to do_initial_child_stuff.
875 (win32_kill): Adjust interface. Remove process from processes
877 (win32_detach): Ditto.
878 (win32_join): Adjust interface.
879 (win32_thread_alive): Take a ptid.
880 (win32_resume): Adjust to use ptids.
881 (get_child_debug_event): Ditto.
882 (win32_wait): Adjust interface. Remove exiting process from
885 2009-04-01 Pedro Alves <pedro@codesourcery.com>
887 Non-stop mode support.
889 * server.h (non_stop): Declare.
890 (gdb_client_data, handler_func): Declare.
891 (delete_file_handler, add_file_handler, start_event_loop):
893 (handle_serial_event, handle_target_event, push_event)
894 (putpkt_notif): Declare.
895 * target.h (enum resume_kind): New.
896 (struct thread_resume): Replace `step' field by `kind' field.
897 (TARGET_WNOHANG): Define.
898 (struct target_ops) <wait>: Add `options' argument.
899 <supports_non_stop, async, start_non_stop>: New fields.
900 (target_supports_non_stop, target_async): New.
901 (start_non_stop): Declare.
902 (mywait): Add `options' argument.
903 * target.c (mywait): Add `options' argument. Print child exit
905 (start_non_stop): New.
906 * server.c (non_stop, own_buf, mem_buf): New globals.
907 (struct vstop_notif): New.
908 (notif_queue): New global.
909 (queue_stop_reply, push_event, discard_queued_stop_replies)
910 (send_next_stop_reply): New.
911 (start_inferior): Adjust to use resume_kind. Adjust to mywait
913 (attach_inferior): In non-stop mode, don't wait for the target
915 (handle_general_set): Handle QNonStop.
916 (handle_query): When handling qC, return the current general
917 thread, instead of the first thread of the list.
918 (handle_query): If the backend supports non-stop mode, include
919 QNonStop+ in the qSupported query response.
920 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
922 (handle_v_attach, handle_v_run): Handle non-stop mode.
923 (handle_v_stopped): New.
924 (handle_v_requests): Report support for vCont;t. Handle vStopped.
925 (myresume): Adjust to use resume_kind. Handle non-stop.
926 (queue_stop_reply_callback): New.
927 (handle_status): Handle non-stop mode.
928 (main): Clear non_stop flag on reconnection. Use the event-loop.
929 Refactor serial protocol handling from here ...
930 (process_serial_event): ... to this new function. When GDB
931 selects any thread, select one here. In non-stop mode, wait until
932 GDB acks all pending events before exiting.
933 (handle_serial_event, handle_target_event): New.
934 * remote-utils.c (remote_open): Install remote_desc in the event
936 (remote_close): Remove remote_desc from the event loop.
937 (putpkt_binary): Rename to...
938 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
939 (putpkt_binary): New as wrapper around putpkt_binary_1.
941 (prepare_resume_reply): In non-stop mode, don't change the
944 * Makefile.in (OBJ): Add event-loop.o.
945 (event-loop.o): New rule.
947 * linux-low.h (pid_of): Moved here.
949 (get_lwp_thread): Use lwpid_of.
950 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
951 * linux-low.c (pid_of): Delete.
952 (inferior_pid): Use lwpid_of.
953 (linux_event_pipe): New.
954 (target_is_async_p): New.
956 (handle_extended_wait): Use lwpid_of.
957 (add_lwp): Don't set lwpid field.
958 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
959 (linux_kill_one_lwp): If killing a running lwp, stop it first.
960 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
961 (linux_detach_one_lwp): If detaching from a running lwp, stop it
962 first. Adjust to linux_wait_for_event interface changes. Use
964 (linux_detach): Don't delete the main lwp here.
965 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
966 (status_pending_p): Don't consider explicitly suspended lwps.
967 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
968 pointer. Add OPTIONS argument. Change return type to int. Use
969 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
970 (linux_wait_for_event): Take an integer pid instead of a lwp_info
971 pointer. Add status pointer argument. Return a pid instead of a
972 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
973 changes. In non-stop mode, don't switch to a random thread.
974 (linux_wait): Rename to...
975 (linux_wait_1): ... this. Add target_options argument, and handle
976 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
977 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
978 clean exit and signal exit code. Don't stop all threads in
979 non-stop mode. In all-stop mode, only stop all threads when
980 reporting a stop to GDB. Handle explicit thread stop requests.
981 (async_file_flush, async_file_mark): New.
983 (send_sigstop): Use lwpid_of.
984 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
985 interface changes. In non-stop mode, don't switch to a random
987 (linux_resume_one_lwp): Use lwpid_of.
988 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
989 (linux_resume_one_thread): ... this. Handle resume_stop. In
990 non-stop mode, don't look for pending flag in all threads.
991 (resume_status_pending_p): Don't consider explicitly suspended
993 (my_waitpid): Reimplement. Emulate __WALL.
994 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
996 (sigchld_handler, linux_supports_non_stop, linux_async)
997 (linux_start_non_stop): New.
998 (linux_target_ops): Register linux_supports_non_stop, linux_async
999 and linux_start_non_stop.
1000 (initialize_low): Install SIGCHLD handler.
1001 * thread-db.c (thread_db_create_event, find_one_thread)
1002 (thread_db_get_tls_address): Use lwpid_of.
1003 * win32-low.c (win32_detach): Adjust to use resume_kind.
1004 (win32_wait): Add `options' argument.
1005 * spu-low.c (spu_resume): Adjust to use resume_kind.
1006 (spu_wait): Add `options' argument.
1008 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1010 Decouple target code from remote protocol.
1012 * target.h (enum target_waitkind): New.
1013 (struct target_waitstatus): New.
1014 (struct target_ops) <wait>: Return an unsigned long. Take a
1015 target_waitstatus pointer instead of a char pointer.
1017 * target.c (mywait): Change prototype to return an unsigned long.
1018 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1019 * server.h (thread_from_wait, old_thread_from_wait): Delete
1021 (prepare_resume_reply): Change prototype to take a
1023 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1024 (last_status, last_ptid): New.
1025 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1026 pid instead of a signal.
1027 (attach_inferior): Remove "status" and "signal" parameters.
1029 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1031 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1032 (handle_v_requests, myresume): Remove "status" and "signal"
1034 (handle_status): New.
1035 (main): Delete local `status'. Adjust.
1036 * remote-utils.c: Include target.h.
1037 (prepare_resume_reply): Change prototype to take a
1038 target_waitstatus. Adjust.
1040 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1042 * spu-low.c (spu_wait): Adjust.
1043 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1045 (win32_wait): Adjust.
1047 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1049 * target.h (struct thread_resume): Delete leave_stopped member.
1050 (struct target_ops): Add a `n' argument to the `resume' callback.
1051 * server.c (start_inferior): Adjust.
1052 (handle_v_cont, myresume): Adjust.
1053 * linux-low.c (check_removed_breakpoint): Adjust to resume
1054 interface change, and to removed leave_stopped field.
1055 (resume_ptr): Delete.
1056 (struct thread_resume_array): New.
1057 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1058 resume interface change.
1059 (linux_continue_one_thread, linux_queue_one_thread)
1060 (resume_status_pending_p): Check if the resume field is NULL
1061 instead of checking the leave_stopped member.
1062 (linux_resume): Adjust to the target resume interface change.
1063 * spu-low.c (spu_resume): Adjust to the target resume interface
1065 * win32-low.c (win32_detach, win32_resume): Ditto.
1067 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1069 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1071 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1073 (linux_continue_one_thread): Only preserve the stepping flag if
1074 there's a pending breakpoint.
1076 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1078 * server.c (main): After the inferior having exited, call
1079 remote_close before exiting gdbserver.
1081 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1083 Fix size of FPSCR in Power 7 processors.
1084 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1085 (PPC_FEATURE_HAS_DFP): New #define.
1086 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1089 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1091 * server.c (handle_query) Whitespace and formatting.
1093 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1095 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1096 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1097 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1098 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1099 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1100 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1101 Makefile.in, configure.ac: Fix whitespace throughout.
1102 * configure: Regenerate.
1104 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1106 * inferiors.c (find_inferior): Make it safe for the callback
1107 function to delete the currently iterated inferior.
1109 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1111 * Makefile.in (linuw_low_h): Move higher.
1112 (thread-db.o): Depend on $(linux_low_h).
1114 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1116 Rename "process" to "lwp" throughout.
1118 * linux-low.c (all_processes): Rename to...
1119 (all_lwps): ... this.
1120 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1121 (add_process): Rename to ...
1122 (add_lwp): ... this. Adjust.
1123 (linux_create_inferior): Adjust.
1124 (linux_attach_lwp): Adjust.
1125 (linux_attach): Adjust.
1126 (linux_kill_one_process): Rename to ...
1127 (linux_kill_one_lwp): ... this. Adjust.
1128 (linux_kill): Adjust.
1129 (linux_detach_one_process): Rename to ...
1130 (linux_detach_one_lwp): ... this. Adjust.
1131 (linux_detach): Adjust.
1132 (check_removed_breakpoint): Adjust.
1133 (status_pending_p): Adjust.
1134 (linux_wait_for_process): Rename to ...
1135 (linux_wait_for_lwp): ... this. Adjust.
1136 (linux_wait_for_event): Adjust.
1137 (send_sigstop): Adjust.
1138 (wait_for_sigstop): Adjust.
1139 (stop_all_processes): Rename to ...
1140 (stop_all_lwps): ... this.
1141 (linux_resume_one_process): Rename to ...
1142 (linux_resume_one_lwp): ... this. Adjust.
1143 (linux_set_resume_request, linux_continue_one_thread)
1144 (linux_queue_one_thread, resume_status_pending_p)
1145 (usr_store_inferior_registers, regsets_store_inferior_registers)
1146 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1148 * linux-low.h (get_process): Rename to ...
1149 (get_lwp): ... this. Adjust.
1150 (get_thread_process): Rename to ...
1151 (get_thread_lwp): ... this. Adjust.
1152 (get_process_thread): Rename to ...
1153 (get_lwp_thread): ... this. Adjust.
1154 (struct process_info): Rename to ...
1155 (struct lwp_info): ... this.
1156 (all_processes): Rename to ...
1157 (all_lwps): ... this.
1158 * proc-service.c (ps_lgetregs): Adjust.
1159 * thread-db.c (thread_db_create_event, find_one_thread)
1160 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1162 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1164 * server.c (handle_query): Handle "qAttached".
1166 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1168 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1169 GPLv3, update license URL.
1171 2009-03-01 Doug Evans <dje@google.com>
1173 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1174 (server_h): Add gdb_signals.h.
1175 (signals.o): Update.
1176 * server.h (target_signal_from_host,target_signal_to_host_p)
1177 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1179 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1181 * remote-utils.c (getpkt): Also generate remote-debug
1182 information if noack_mode is set.
1184 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1186 * server.c (handle_query): Report qXfer:siginfo:read and
1187 qXfer:siginfo:write as supported and handle them.
1188 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1189 * linux-low.c (linux_xfer_siginfo): New.
1190 (linux_target_ops): Set it.
1192 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1194 * server.c (gdbserver_usage): Mention --remote-debug.
1195 (main): Accept '--remote-debug' switch.
1197 2009-01-18 Doug Evans <dje@google.com>
1199 * regcache.c (new_register_cache): No need to check result of xcalloc.
1200 * server.c (handle_search_memory): Back out calls to xmalloc,
1201 result is checked and error is returned to user upon failure.
1202 (handle_query): Ditto. Add more checks for result of malloc.
1203 (handle_v_cont): Check result of malloc, report error back to
1205 (handle_v_run): Ditto. Call freeargv.
1206 * server.h (freeargv): Declare.
1207 * utils.c (freeargv): New fn.
1209 2009-01-15 Doug Evans <dje@google.com>
1211 * gdbreplay.c (perror_with_name): Make arg const char *.
1212 * server.h (target_signal_to_name): Make return type const char *.
1213 * thread-db.c (thread_db_err_str): Make return type const char *.
1214 * utils.c (perror_with_name): Make arg const char *.
1216 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1218 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1219 when handling a EXIT_PROCESS_DEBUG_EVENT.
1221 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1223 * gdbreplay.c (gdbreplay_version): Update copyright year.
1224 * server.c (gdbserver_version): Likewise.
1226 2009-01-05 Doug Evans <dje@google.com>
1228 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1229 (handle_extended_wait): Improve comment.
1231 2008-12-13 Doug Evans <dje@google.com>
1233 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1234 * server.h (ATTR_MALLOC): New macro.
1235 (xmalloc,xcalloc,xstrdup): Declare.
1236 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1237 * inferiors.c: Ditto.
1238 * linux-low.c: Ditto.
1239 * mem-break.c: Ditto.
1240 * regcache.c: Ditto.
1241 * remote-utils.c: Ditto.
1244 * win32-low.c: Ditto.
1246 2008-12-12 Doug Evans <dje@google.com>
1248 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1249 in debugging printf.
1251 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1253 2008-12-09 Doug Evans <dje@google.com>
1255 * linux-low.h (struct process_info): Delete member tid, unused.
1256 * thread-db.c (find_one_thread): Update.
1257 (maybe_attach_thread): Update.
1259 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1261 * target.h (struct target_ops): Add qxfer_osdata member.
1262 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1264 (linux_qxfer_osdata): New functions.
1265 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1267 * server.c (handle_query): Handle "qXfer:osdata:read:".
1268 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1269 (buffer_xml_printf): New functions.
1270 * server.h (struct buffer): New.
1271 (buffer_grow_str, buffer_grow_str0): New macros.
1272 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1273 (buffer_xml_printf): Declare.
1275 2008-11-24 Doug Evans <dje@google.com>
1277 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1279 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1281 * server.c (handle_v_run): Always use the supplied argument list.
1283 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1285 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1286 (xtensa_regmap_table): Add entry for scompare1.
1288 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1290 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1291 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1292 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1293 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1294 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1295 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1296 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1297 XML target descriptions.
1298 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1299 when inferior is running on an ISA 2.05 or later processor. Add
1300 special case to return offset for full 64-bit slot of FPSCR when
1303 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1305 * Makefile.in (SFILES, clean): Added sparc64 files.
1306 (reg-sparc64.o, reg-sparc64.c): New.
1307 * configure.srv (sparc*-*-linux*): New configuration.
1308 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1309 syscall arguments for SPARC.
1310 (regsets_store_inferior_registers): Likewise.
1311 * linux-sparc-low.c: New file.
1313 2008-10-21 Doug Evans <dje@google.com>
1315 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1316 (READLINE_DIR,READLINE_DEP): Delete.
1317 (INTERNAL_CFLAGS): Update.
1318 (LINTFLAGS): Update.
1320 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1322 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1323 whole argv from the last run, not just argv[0].
1325 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1327 * regcache.c (new_register_cache): Return NULL if the register
1328 cache size isn't known yet.
1329 (free_register_cache): Avoid dereferencing a NULL regcache.
1331 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1333 * configure.srv: Merge MIPS and MIPS64.
1335 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1337 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1339 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1341 * Makefile.in: Add required vsx dependencies.
1343 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1344 Declare init_registers_powerpc_vsx32l.
1345 Declare init_registers_powerpc_vsx64l.
1346 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1347 (ppc_arch_setup): Check for VSX in hwcap.
1348 (ppc_fill_vsxregset): New function.
1349 (ppc_store_vsxregset): New function.
1350 Add new VSX entry in regset_info target_regsets.
1352 * configure.srv: Add new VSX dependencies.
1354 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1356 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1357 (remote_open): Set or clear transport_is_reliable.
1358 (putpkt_binary): Don't expect acks in noack mode.
1359 (getpkt): Don't send ack/nac in noack mode.
1360 * server.c (handle_general_set): Handle QStartNoAckMode.
1361 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1363 (main): Reset noack_mode on every connection.
1364 * server.h (noack_mode): Declare.
1366 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1368 * Makefile.in (GDBREPLAY_OBS): New variable.
1369 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1371 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1372 Daniel Jacobowitz <dan@codesourcery.com>
1374 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1375 (usr_store_inferior_registers): Likewise.
1376 (regsets_store_inferior_registers): Likewise.
1378 2008-07-31 Rolf Jansen <rj@surtec.com>
1379 Pedro Alves <pedro@codesourcery.com>
1381 * configure.ac: Check for memmem declaration.
1382 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1383 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1384 (disable_packet_qfThreadInfo): Unconditionally compile.
1385 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1386 * configure, config.in: Regenerate.
1388 2008-07-28 Doug Kwan <dougkwan@google.com>
1390 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1391 (linux_write_memory): Remove declaration of errno.
1393 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1395 * linux-low.c (handle_extended_wait): Do not use "status"
1396 variable uninitialized.
1398 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1400 * server.c (handle_v_attach): Inhibit reporting dll changes.
1402 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1404 * remote-utils.c (prepare_resume_reply): If requested, don't
1405 output "thread:TID" in the T stop reply.
1407 * server.c (disable_packet_vCont, disable_packet_Tthread)
1408 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1409 (handle_query): If requested, disable support for qC, qfThreadInfo
1411 (handle_v_requests): If requested, disable support for vCont.
1412 (gdbserver_show_disableable): New.
1413 (main): Handle --disable-packet and --disable-packet=LIST.
1415 * server.h (disable_packet_vCont, disable_packet_Tthread)
1416 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1418 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1420 * server.c (gdbserver_usage): Mention --version.
1422 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1424 * Makefile.in (gdbreplay.o): New rule.
1426 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1428 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1429 message, not gdbserver.
1431 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1432 Nathan Sidwell <nathan@codesourcery.com>
1433 Joseph Myers <joseph@codesourcery.com>
1435 * acinclude.m4: Include ../../config/acx.m4.
1436 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1437 * configure, config.in: Regenerate.
1438 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1439 * server.c (gdbserver_version): Print PKGVERSION.
1440 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1441 (main): Adjust gdbserver_usage calls.
1442 * gdbreplay.c (version, host_name): Add declarations.
1443 (gdbreplay_version, gdbreplay_usage): New.
1444 (main): Accept --version and --help options.
1446 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1448 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1449 (arm_breakpoint_at): Handle Thumb.
1450 (the_low_target): Add comment.
1452 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1454 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1456 2008-05-09 Doug Evans <dje@google.com>
1458 * server.h (decode_search_memory_packet): Declare.
1459 * remote-utils.c (decode_search_memory_packet): New fn.
1460 * server.c (handle_search_memory_1): New fn.
1461 (handle_search_memory): New fn.
1462 (handle_query): Process qSearch:memory packets.
1464 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1466 * regcache.c (registers_length): Remove.
1467 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1468 full register packet.
1469 * regcache.h (registers_length): Remove prototype.
1470 * server.h (PBUFSIZ): Define to 16384.
1472 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1474 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1475 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1476 powerpc-64l.o, and powerpc-altivec64l.o.
1477 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1478 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1479 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1480 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1481 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1484 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1485 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1486 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1487 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1488 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1489 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1490 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1491 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1492 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1493 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1496 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1497 (init_registers_powerpc_32l): ... this new prototype.
1498 (init_registers_powerpc_32): Remove, replace by ...
1499 (init_registers_powerpc_altivec32l): ... this new prototype.
1500 (init_registers_powerpc_e500): Remove, replace by ...
1501 (init_registers_powerpc_e500l): ... this new prototype.
1502 (init_registers_ppc64): Remove, replace by ...
1503 (init_registers_powerpc_64l): ... this new prototype.
1504 (init_registers_powerpc_64): Remove, replace by ...
1505 (init_registers_powerpc_altivec64l): ... this new prototype.
1506 (ppc_num_regs): Set to 73.
1507 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1508 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1509 (ppc_cannot_store_register): Handle orig_r3 and trap.
1510 (ppc_arch_setup): Update init_registers_... calls.
1511 (ppc_fill_gregset): Handle orig_r3 and trap.
1513 * inferiors.c (clear_inferiors): Reset current_inferior.
1515 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1517 * acinclude.m4: Add override.m4.
1518 * configure: Regenerate.
1520 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1522 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1523 initial call to init_register_ppc64.
1525 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1527 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1528 powerpc*-*-linux* case.
1529 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1531 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1533 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1534 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1536 * linux-ppc-low.c: Include <elf.h>.
1537 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1538 (ppc_hwcap): New global variable.
1539 (ppc_regmap): Remove __SPE__ #ifdef sections.
1540 (ppc_regmap_e500): New global variable.
1541 (ppc_cannot_store_register): Update __SPE__ special case.
1542 (ppc_get_hwcap): New function.
1543 (ppc_arch_setup): Use it to determine whether inferior supports
1544 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1545 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1546 Do not access registers if target does not support AltiVec.
1547 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1548 Do not access registers if target does not support SPE.
1549 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1551 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1553 * linux-low.c (disabled_regsets, num_regsets): New.
1554 (use_regsets_p): Delete.
1555 (linux_wait_for_process): Clear disabled_regsets.
1556 (regsets_fetch_inferior_registers): Check and set it.
1557 (regsets_store_inferior_registers): Likewise.
1558 (linux_fetch_registers, linux_store_registers): Do not use
1560 (initialize_low): Allocate disabled_regsets.
1562 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1564 * Makefile.in (LIBOBJS): New.
1566 (memmem.o): New rule.
1567 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1568 * configure: Regenerated.
1570 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1572 * server.c (handle_query): Never return "unsupported" for
1573 qXfer:features:read queries.
1575 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1577 * server.c (get_features_xml): Fix inverted condition.
1578 (handle_query): Always support qXfer:feature:read.
1580 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1582 * server.c (wrapper_argv): New.
1583 (start_inferior): Handle wrapper_argv. If set, expect an extra
1585 (gdbserver_usage): Document --wrapper.
1586 (main): Parse --wrapper.
1588 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1590 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1591 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1592 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1593 (ppc_set_pc): Likewise.
1594 (ppc_arch_setup): New function.
1595 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1596 of collect_register.
1597 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1599 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1601 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1602 instead of linux-ppc64-low.o.
1603 * linux-ppc64-low.c: Remove file.
1604 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1605 (linux-ppc64-low.o): Remove rule.
1607 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1608 (init_registers_powerpc_64): Likewise.
1609 (ppc_regmap): Conditionally define depending on __powerpc64__.
1610 (ppc_cannot_store_register): Do not special-case "fpscr" when
1611 compiled on __powerpc64__.
1612 (ppc_collect_ptrace_register): New function.
1613 (ppc_supply_ptrace_register): New function.
1614 (ppc_breakpoint): Change type to "unsigned int".
1615 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1616 (the_low_target): Conditionally provide initializers for the
1617 arch_setup member depending on __powerpc64__. Install
1618 collect_ptrace_register and supply_ptrace_register members.
1620 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1622 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1623 * server.c (gdbserver_xmltarget): Define.
1624 (get_features_xml): Use it to replace "target.xml" and arch_string.
1626 * configure.srv: Remove srv_xmltarget. Add XML files that were
1627 mentioned there to srv_xmlfiles instead. Remove conditional tests
1628 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1629 srv_xmlfiles and srv_regobj to include all possible choices.
1630 * configure.ac (srv_xmltarget): Remove.
1631 (srv_xmlfiles): Do not add "target.xml".
1632 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1633 checks for supplementary target information.
1634 * configure: Regenerate.
1635 * Makefile.in (XML_TARGET): Remove.
1636 (target.xml): Remove rule.
1637 (clean): Do not clean up target.xml.
1638 (.PRECIOUS): Do not mention target.xml.
1640 * target.h (struct target_ops): Remove arch_string member.
1641 * linux-low.c (linux_arch_string): Remove.
1642 (linux_target_ops): Remove arch_string initializer.
1643 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1644 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1645 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1646 * spu-low.c (spu_arch_string): Remove.
1647 (spu_target_ops): Remove arch_string initializer.
1648 * win32-low.c (win32_arch_string): Remove.
1649 (win32_target_ops): Remove arch_string initializer.
1650 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1651 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1652 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1654 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1656 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1657 by collect_ptrace_register and supply_ptrace_register hooks.
1658 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1659 instead of checking for the_low_target.left_pad_xfer.
1660 (usr_store_inferior_registers): Use collect_ptrace_register callback
1661 instead of checking for the_low_target.left_pad_xfer.
1663 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1664 (s390_supply_ptrace_register): Likewise.
1665 (s390_fill_gregset): Call s390_collect_ptrace_register.
1666 (the_low_target): Update.
1668 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1669 (ppc_supply_ptrace_register): Likewise.
1670 (the_low_target): Update.
1672 * linux-i386-low.c (the_low_target): Update.
1673 * linux-x86-64-low.c (the_low_target): Update.
1675 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1677 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1678 reg-s390.o and reg-s390x.o.
1680 * linux-low.c (new_inferior): New global variable.
1681 (linux_create_inferior, linux_attach): Set it.
1682 (linux_wait_for_process): Call the_low_target.arch_setup after the
1683 target has stopped for the first time.
1684 (initialize_low): Do not call the_low_target.arch_setup.
1686 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1687 (s390_set_pc): Likewise.
1688 (s390_arch_setup): New function.
1689 (the_low_target): Use s390_arch_setup as arch_setup routine.
1691 * regcache.c (realloc_register_cache): New function.
1692 (set_register_cache): Call it for each existing regcache.
1694 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1696 * server.h (init_registers): Remove prototype.
1698 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1699 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1700 instead of init_registers ().
1701 * linux-arm-low.c (init_registers_arm): Add prototype.
1702 (init_registers_arm_with_iwmmxt): Likewise.
1703 (the_low_target): Add initializer for arch_setup field.
1704 * linux-cris-low.c (init_registers_cris): Add prototype.
1705 (the_low_target): Add initializer for arch_setup field.
1706 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1707 (the_low_target): Add initializer for arch_setup field.
1708 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1709 (the_low_target): Add initializer for arch_setup field.
1710 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1711 (the_low_target): Add initializer for arch_setup field.
1712 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1713 (the_low_target): Add initializer for arch_setup field.
1714 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1715 (the_low_target): Add initializer for arch_setup field.
1716 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1717 (init_registers_mips64_linux): Likewise.
1718 (the_low_target): Add initializer for arch_setup field.
1719 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1720 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1721 (the_low_target): Add initializer for arch_setup field.
1722 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1723 (init_registers_powerpc_64): Likewise.
1724 (the_low_target): Add initializer for arch_setup field.
1725 * linux-s390-low.c (init_registers_s390): Add prototype.
1726 (init_registers_s390x): Likewise.
1727 (the_low_target): Add initializer for arch_setup field.
1728 * linux-sh-low.c (init_registers_sh): Add prototype.
1729 (the_low_target): Add initializer for arch_setup field.
1730 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1731 (the_low_target): Add initializer for arch_setup field.
1732 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1733 (the_low_target): Add initializer for arch_setup field.
1735 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1736 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1737 instead of init_registers ().
1738 * win32-arm-low.c (init_registers_arm): Add prototype.
1739 (the_low_target): Add initializer for arch_setup field.
1740 * win32-i386-low.c (init_registers_i386): Add prototype.
1741 (the_low_target): Add initializer for arch_setup field.
1743 * spu-low.c (init_registers_spu): Add prototype.
1744 (initialize_low): Call initialie_registers_spu () instead of
1745 initialize_registers ().
1747 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1749 * server.c (handle_v_requests): When handling the vRun and vAttach
1750 packets, if already debugging a process, don't kill it. Return an
1753 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1755 * server.c (handle_query): Correct length check.
1757 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1759 * win32-low.c (do_initial_child_stuff): Add process handle
1760 parameter. Set current_process_handle and current_process_id from the
1761 parameters. Clear globals.
1762 (win32_create_inferior): Don't set current_process_handle and
1763 current_process_id here. Instead pass them on the call to
1764 do_initial_child_stuff.
1765 (win32_attach): Likewise.
1766 (win32_clear_inferiors): New.
1767 (win32_kill): Don't close the current process handle or the
1768 current thread handle here. Instead call win32_clear_inferiors.
1769 (win32_detach): Don't open a new handle to the process. Call
1770 win32_clear_inferiors.
1771 (win32_join): Don't rely on current_process_handle; open a new
1772 handle using the process id.
1773 (win32_wait): Call win32_clear_inferiors when the inferior process
1776 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1778 * server.c (monitor_show_help): Add "exit".
1780 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1782 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1783 (clean): Add reg-xtensa.c.
1784 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1785 * configure.srv (xtensa*-*-linux*) New target.
1786 * linux-xtensa-low.c: New.
1787 * xtensa-xtregs.c: New.
1789 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1791 * hostio.c: Don't include errno.h.
1792 (errno_to_fileio_errno): Move to hostio-errno.
1793 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1794 error number outputting to the target->hostio_last_error callback.
1795 (hostio_packet_error): Use FILEIO_EINVAL directly.
1796 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1797 calls to hostio_error.
1798 * hostio-errno.c: New.
1799 * server.h (hostio_last_error_from_errno): Declare.
1800 * target.h (target_ops): Add hostio_last_error member.
1801 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1802 as hostio_last_error handler.
1803 * spu-low.c (spu_target_ops): Likewise.
1804 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1805 (wince_hostio_last_error): New functions.
1806 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1807 as hostio_last_error handler.
1808 (win32_target_ops) [!_WIN32_WCE]: Register
1809 hostio_last_error_from_errno as hostio_last_error handler.
1810 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1811 (hostio-errno.o): New rule.
1812 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1813 * configure.srv (srv_hostio_err_objs): New variable. Default to
1815 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1816 * configure: Regenerate.
1818 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1820 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1821 (linux_kill, linux_detach): Clean up the process list.
1822 * remote-utils.c (remote_open): Improve port number parsing.
1823 (putpkt_binary, input_interrupt): Only send interrupts if the target
1825 * server.c (extended_protocol): Make static.
1826 (attached): Define earlier.
1827 (exit_requested, response_needed, program_argv): New variables.
1828 (target_running): New.
1829 (start_inferior): Clear attached here.
1830 (attach_inferior): Set attached here.
1831 (require_running): Define.
1832 (handle_query): Use require_running and target_running. Implement
1834 (handle_v_attach, handle_v_run): New.
1835 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1836 (gdbserver_usage): Update.
1837 (main): Redo argument parsing. Handle --debug and --multi. Handle
1838 --attach along with other options or after the port. Save
1839 program_argv. Support no initial program. Resynchronize
1840 communication with GDB after an error. Handle "monitor exit".
1841 Use require_running and target_running. Always allow the extended
1842 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1843 restart in extended mode.
1844 * README: Refer to the GDB manual. Update --attach usage.
1846 2007-12-20 Andreas Schwab <schwab@suse.de>
1848 * linux-low.c (STACK_SIZE): Define.
1849 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1850 (linux_test_for_tracefork): Likewise.
1852 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1854 * linux-low.c (linux_wait_for_event): Update messages. Do not
1855 reinsert auto-delete breakpoints.
1856 * mem-break.c (struct breakpoint): Change return type of handler to
1858 (set_breakpoint_at): Update handler type.
1859 (reinsert_breakpoint_handler): Return 1 instead of calling
1861 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1863 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1864 * mem-break.h (set_breakpoint_at): Update handler type.
1865 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1866 * win32-low.c (auto_delete_breakpoint): New.
1867 (get_child_debug_event): Use it.
1869 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1871 * configure.ac: Check for pread and pwrite.
1872 * hostio.c (handle_pread): Fall back to lseek and read.
1873 (handle_pwrite): Fall back to lseek and write.
1874 * config.in, configure: Regenerated.
1876 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1878 * server.c (myresume): Add own_buf argument.
1879 (main): Update calls.
1881 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1883 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1884 * remote-utils.c (remote_open): Do not call disable_async_io.
1885 (block_async_io): Delete.
1886 (unblock_async_io): Make static.
1887 (initialize_async_io): New.
1888 * server.c (handle_v_cont): Handle async I/O here.
1889 (myresume): Likewise. Move other common resume tasks here...
1890 (main): ... from here. Call initialize_async_io. Disable async
1891 I/O before the main loop.
1892 * server.h (initialize_async_io): Declare.
1893 (block_async_io, unblock_async_io): Delete prototypes.
1894 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1896 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1898 * remote-utils.c (readchar): Allow binary data in received messages.
1900 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1902 * win32-low.c (attaching): New global.
1903 (win32_create_inferior): Clear the `attaching' global.
1904 (win32_attach): Set the `attaching' global.
1905 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1906 attaching. Only set a breakpoint at the entry point if not
1909 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1911 * server.c (main): Don't report dll events on the initial
1912 connection on attaches.
1914 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1916 * server.c (main): Relax numerical bases supported for the pid of
1917 the --attach command line argument.
1919 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1921 * win32-low.c (win32_attach): Call OpenProcess before
1922 DebugActiveProcess, not after. Add last error output to error
1925 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1927 * win32-low.c (win32_get_thread_context)
1928 (win32_set_thread_context): New functions.
1929 (thread_rec): Use win32_get_thread_context.
1930 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1931 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1934 2007-12-03 Leo Zayas
1935 Pedro Alves <pedro_alves@portugalmail.pt>
1937 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1939 (child_add_thread): Minor cleanup.
1940 (child_continue): Resume artificially suspended threads before
1941 calling ContinueDebugEvent.
1942 (suspend_one_thread): New.
1943 (fake_breakpoint_event): New.
1944 (get_child_debug_event): Change return type to int. Check here if
1945 gdb sent an interrupt request. If a soft interrupt was requested,
1946 fake a breakpoint event. Return 0 if there is no event to handle,
1948 (win32_wait): Don't check here if gdb sent an interrupt request.
1949 Ensure there is a valid event to handle.
1950 (win32_request_interrupt): Add soft interruption method as last
1953 2007-12-03 Leo Zayas
1954 Pedro Alves <pedro_alves@portugalmail.pt>
1956 * win32-low.h (win32_thread_info): Add descriptions to the
1957 structure members. Replace `suspend_count' counter by a
1959 * win32-low.c (thread_rec): Update condition of when to get the
1960 context from the inferior. Rely on ContextFlags being set if it
1961 has already been retrieved. Only suspend the inferior thread if
1962 we haven't already. Warn if that fails.
1963 (continue_one_thread): s/suspend_count/suspended/. Only call
1964 ResumeThread once. Warn if that fails.
1966 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1968 * win32-low.c (win32_wait): Don't read from the inferior when it
1971 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1973 * Makefile.in (win32_low_h): New variable.
1974 (win32-low.o): Add dependency on $(win32_low_h).
1975 (win32-arm-low.o, win32-i386-low.o): New rules.
1977 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1979 * hostio.c: Correct copyright year.
1981 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1983 * Makefile.in (OBS): Add hostio.o.
1984 (hostio.o): New rule.
1985 * server.h (handle_vFile): Declare.
1986 * hostio.c: New file.
1987 * server.c (handle_v_requests): Take packet_len and new_packet_len
1988 for binary packets. Call handle_vFile.
1989 (main): Update call to handle_v_requests.
1991 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1993 * linux-low.c: Include <sched.h>.
1995 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1997 * linux-low.c (linux_tracefork_grandchild): New.
1998 (linux_tracefork_child): Use clone.
1999 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2001 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2003 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2005 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2007 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2009 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2011 * inferiors.c (change_inferior_id): Delete.
2012 (add_pid_to_list, pull_pid_from_list): New.
2013 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2014 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2015 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2016 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2017 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2018 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2019 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2020 (using_threads): Always set to 1.
2021 (handle_extended_wait): New.
2022 (add_process): Do not set TID.
2023 (linux_create_inferior): Set must_set_ptrace_flags.
2024 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2025 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2026 (linux_thread_alive): Rename TID argument to LWPID.
2027 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2028 (linux_wait_for_event): Do not use TID or check using_threads. Update
2029 call to dead_thread_notify. Call handle_extended_wait.
2030 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2031 (send_sigstop): Delete sigstop_sent.
2032 (wait_for_sigstop): Avoid TID.
2033 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2034 (linux_test_for_tracefork): New.
2035 (linux_lookup_signals): Use thread_db_active and
2036 linux_supports_tracefork_flag.
2037 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2038 * linux-low.h (get_process_thread): Avoid TID.
2039 (struct process_ifo): Move thread_known and tid to the end. Remove
2041 (linux_attach_lwp, thread_db_init): Update prototypes.
2042 * server.h (change_inferior_id): Delete prototype.
2043 (add_pid_to_list, pull_pid_from_list): New prototypes.
2044 * thread-db.c (thread_db_use_events): New.
2045 (find_first_thread): Rename to...
2046 (find_one_thread): ...this. Update callers and messages. Do not
2047 call fatal. Check thread_db_use_events. Do not call
2048 change_inferior_id or new_thread_notify.
2049 (maybe_attach_thread): Update. Do not call new_thread_notify.
2050 (thread_db_init): Set thread_db_use_events. Check use_events.
2051 * utils.c (fatal, warning): Correct message prefix.
2053 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2055 * Makefile.in (clean): Remove new files.
2056 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2057 (powerpc-64.o, powerpc-64.c): New rules.
2058 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2059 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2061 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2063 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2064 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2065 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2066 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2067 (target_regsets): Add AltiVec and SPE register sets.
2068 * configure.ac: Check for AltiVec and SPE.
2069 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2070 (ppc_fill_vrregset, ppc_store_vrregset): New.
2071 (target_regsets): Add AltiVec register set.
2072 * configure: Regenerated.
2074 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2076 * linux-low.c (O_LARGEFILE): Define.
2077 (linux_read_memory): Use /proc/PID/mem.
2078 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2079 * configure, config.in: Regenerated.
2081 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2083 * linux-low.c (linux_wait_for_event): Do not pass signals while
2086 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2088 * win32-low.c (create_process): New.
2089 (win32_create_inferior): Use create_process instead of
2090 CreateProcess. If create_process failed retry appending an ".exe"
2091 suffix. Store the GetLastError result immediatelly after
2092 create_process calls and use it on the call to error.
2094 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2096 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2098 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2100 * configure.ac: Switch license to GPLv3.
2102 2007-08-01 Michael Snyder <msnyder@access-company.com>
2104 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2106 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2108 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2110 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2111 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2112 CloseToolhelp32Snapshot.
2113 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2114 CloseToolhelp32Snapshot.
2116 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2118 * server.c (main): Check for inferior exit before main loop.
2120 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2122 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2123 instead of on tmp_desc.
2125 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2126 Daniel Jacobowitz <dan@codesourcery.com>
2128 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2129 (add_thread): Minor cleanups.
2130 (clear_inferiors): Move lower in the file. Clear the DLL
2132 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2133 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2134 (xml_escape_text): New.
2135 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2137 (handle_v_cont): Report errors.
2138 (gdbserver_version): Update.
2139 (main): Correct size of own_buf. Do not report initial DLL events.
2140 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2141 (unloaded_dll, xml_escape_text): New.
2142 * win32-low.c (enum target_waitkind): Update comments.
2143 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2144 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2145 (win32_EnumProcessModules, win32_GetModuleInformation)
2146 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2147 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2148 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2149 (win32_Module32First, win32_Module32Next, load_toolhelp)
2150 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2151 (get_child_debug_event): Handle DLL events.
2152 (win32_wait): Likewise.
2154 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2156 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2157 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2159 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2161 * win32-low.c (handle_output_debug_string): Ignore event if not
2164 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2166 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2168 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2170 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2172 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2174 * inferiors.c (change_inferior_id): Add comment.
2175 * linux-low.c (check_removed_breakpoint): Add an early
2176 prototype. Improve debug output.
2177 (linux_attach): Doc update.
2178 (linux_detach_one_process, linux_detach): Clean up before releasing
2180 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2181 * linux-low.h (struct process_info): Doc improvement.
2182 * mem-break.c (delete_all_breakpoints): New.
2183 * mem-break.h (delete_all_breakpoints): New prototype.
2184 * thread-db.c (find_first_thread): New.
2185 (thread_db_create_event): Call it instead of
2186 thread_db_find_new_threads. Clean up unused variables.
2187 (maybe_attach_thread): Remove first thread handling.
2188 (thread_db_find_new_threads): Use find_first_thread.
2189 (thread_db_get_tls_address): Likewise.
2191 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2193 * thread-db.c (thread_db_find_new_threads): Add prototype.
2194 (thread_db_create_event): Check for the main thread before adding
2196 (maybe_attach_thread): Only enable event reporting if TID == 0.
2197 (thread_db_get_tls_address): Check for new threads.
2199 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2201 * linux-low.c (linux_create_inferior): Try execv before execvp.
2202 * spu-low.c (spu_create_inferior): Likewise.
2204 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2206 * linux-low.c (linux_create_inferior): Change execv to execvp.
2207 * spu-low.c (spu_create_inferior): Likewies.
2209 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2211 * Makefile.in (clean): Clean new files instead of deleted ones.
2212 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2213 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2215 * configure.srv: Specify XML files and new regformats for MIPS and
2217 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2218 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2219 an entry for the restart register.
2220 (mips_cannot_fetch_register, mips_cannot_store_register)
2221 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2222 register names to match the XML descriptions.
2223 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2224 restart register instead of $0.
2226 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2227 Markus Deuling <deuling@de.ibm.com>
2229 * remote-utils.c (decode_xfer_write): New function.
2230 * server.h (decode_xfer_write): Add prototype.
2231 * server.c (handle_query): Add PACKET_LEN argument. Support
2232 qXfer:spu:read and qXfer:spu:write packets.
2233 (main): Pass packet_len to handle_query.
2234 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2235 * target.h (target_ops): Add qxfer_spu.
2237 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2239 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2240 accessing non-seekable spufs files.
2242 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2244 * server.c (handle_query): Add reply for qC packet.
2246 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2247 Leo Zayas <lerele@champenstudios@com>
2249 * server.h (check_remote_input_interrupt_request): New function.
2250 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2251 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2252 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2253 (check_remote_input_interrupt_request): New function.
2254 * server.h (check_remote_input_interrupt_request): Declare.
2255 * win32-low.c (winapi_DebugBreakProcess,
2256 winapi_GenerateConsoleCtrlEvent): New typedefs.
2257 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2259 (win32_wait): Check for remote interrupt request
2260 with check_remote_input_interrupt_request.
2261 (win32_request_interrupt): New function.
2262 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2264 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2266 * win32-low.c (debug_registers_changed,
2267 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2268 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2269 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2270 (thread_rec): Get context using the low target.
2271 (child_add_thread): Call thread_added on the low target,
2272 which does the same thing.
2274 (do_initial_child_stuff): Remove debug registers references.
2275 Set context using the low target. Resume threads after
2276 setting the contexts.
2277 (child_continue): Remove dead variable. Remove debug
2278 registers references.
2279 (child_fetch_inferior_registers): Go through the low target.
2280 (do_child_store_inferior_registers): Remove.
2281 (child_store_inferior_registers): Go through the low target.
2282 (win32_resume): Remove debug registers references.
2283 Set context using the low target.
2284 (handle_exception): Change return type to void. Don't record
2285 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2286 first chance exception.
2287 (get_child_debug_event): Change return type to void. Remove
2288 goto loop. Always return after waiting for debug event.
2289 (win32_wait): Convert to switch statement. Handle spurious
2292 * win32-i386-low.c (debug_registers_changed,
2293 debug_registers_used): New.
2294 (initial_stuff): Rename to ...
2295 (i386_initial_stuff): ... this. Clear debug registers
2297 (store_debug_registers): Delete.
2298 (i386_get_thread_context): New.
2299 (load_debug_registers): Delete.
2300 (i386_set_thread_context): New.
2301 (i386_thread_added): New.
2302 (single_step): Rename to ...
2303 (i386_single_step): ... this.
2304 (do_fetch_inferior_registers): Rename to ...
2305 (i386_fetch_inferior_register): ... this.
2306 (i386_store_inferior_register): New.
2307 (the_low_target): Adapt to new interface.
2309 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2310 (arm_get_thread_context): New.
2311 (arm_set_thread_context): New.
2313 (do_fetch_inferior_registers): Rename to ...
2314 (arm_fetch_inferior_register): ... this.
2315 (arm_store_inferior_register): New.
2316 (arm_wince_breakpoint): Reimplement as unsigned long.
2317 (arm_wince_breakpoint_len): Define.
2318 (the_low_target): Adapt to new interface.
2320 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2321 load_debug_registers. Add get_thread_context, set_thread_context,
2322 thread_added and store_inferior_register. Rename
2323 fetch_inferior_registers to fetch_inferior_register.
2324 (regptr): Remove declaration.
2326 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2328 * linux-low.c (linux_detach): Change return type to int. Return 0.
2329 * spu-low.c (spu_detach): Likewise.
2331 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2333 * target.h (target_ops): Change return type of detach to int.
2335 (join_inferior): New.
2336 * server.c (main): Don't skip detach support on mingw32.
2337 If the inferior doesn't support detaching return error.
2338 Call join_inferior instead of using waitpid.
2339 * linux-low.c (linux_join): New.
2340 (linux_target_op): Add linux_join.
2341 * spu-low.c (spu_join): New.
2342 (spu_target_ops): Add spu_join.
2343 * win32-low.c (win32_detach): Adapt to new interface.
2344 Reopen current_process_handle before detaching. Issue a child
2345 resume before detaching.
2347 (win32_target_op): Add win32_join.
2349 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2351 * win32-low.c (win32-attach): Fix return value.
2352 * target.h (target_ops): Describe ATTACH return values.
2354 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2356 * win32-low.c (GETPROCADDRESS): Define.
2357 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2358 (winapi_DebugSetProcessKillOnExit): Likewise.
2359 (win32_create_inferior): Force usage of ansi CreateProcessA.
2360 (win32_attach): Use GETPROCADDRESS.
2361 (win32_detach): Likewise.
2363 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2365 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2367 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2369 * win32-low.c: Commit leftover changes from 2007-03-29.
2371 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2373 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2374 fields short instead of int. Add explicit padding.
2375 (i387_cache_to_fsave): Remove unnecessary casts.
2376 (i387_fsave_to_cache): Doc fix.
2377 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2379 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2381 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2382 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2384 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2386 * configure.srv (arm*-*-mingw32ce*): Move near the other
2389 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2391 * configure.ac: Add errno checking.
2392 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2393 sys/file.h and malloc.h.
2394 (AC_CHECK_DECLS): Add perror.
2395 (srv_mingwce): Handle.
2396 * configure.srv (i[34567]86-*-cygwin*): Add
2397 win32-i386-low.o to srv_tgtobj.
2398 (i[34567]86-*-mingw*): Likewise.
2399 (arm*-*-mingw32ce*): Add case.
2400 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2401 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2402 [__MINGW32CE__] (strerror): New function.
2403 [__MINGW32CE__] (errno): Define to GetLastError.
2404 [__MINGW32CE__] (COUNTOF): New macro.
2405 (remote_open): Remove extra close call.
2406 * mem-break.c (delete_breakpoint_at): New function.
2407 * mem-break.h (delete_breakpoint_at): Declare.
2408 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2409 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2410 [USE_WIN32API] (read, write): Add char* casts.
2411 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2412 * server.h: Include wincecompat.h on Windows CE.
2413 [HAVE_ERRNO_H]: Check.
2414 (perror): Declare if not declared.
2415 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2416 (perror_with_name): Remove errno declaration.
2417 * wincecompat.h: New.
2418 * wincecompat.c: New.
2420 * win32-arm-low.c: New.
2421 * win32-i386-low.c: New.
2422 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2423 (OUTMSG2): Make it safe.
2425 (COUNTOF): New macro.
2426 (NUM_REGS): Get it from the low target.
2427 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2428 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2429 (thread_rec): Let low target handle debug registers.
2430 (child_add_thread): Likewise.
2431 (child_init_thread_list): Likewise.
2432 (continue_one_thread): Likewise.
2434 (do_child_fetch_inferior_registers): Move to ...
2435 * win32-i386-low.c: ... here, and rename to ...
2436 (do_fetch_inferior_registers): ... this.
2437 * win32-low.c (child_fetch_inferior_registers):
2438 Go through the low target.
2439 (do_child_store_inferior_registers): Use regptr.
2440 (strwinerror): New function.
2441 (win32_create_inferior): Handle Windows CE.
2442 Use strwinerror instead of strerror on Windows error
2443 codes. Add program to the error output.
2444 Don't close the main thread handle on Windows CE.
2445 (win32_attach): Use coredll.dll on Windows CE.
2446 (win32_kill): Close current process and current
2448 (win32_detach): Use coredll.dll on Windows CE.
2449 (win32_resume): Let low target handle debug registers, and
2451 (handle_exception): Add/Remove initial breakpoint. Avoid
2452 non-existant WSTOPSIG on Windows CE.
2453 (win32_read_inferior_memory): Cast to remove warning.
2454 (win32_arch_string): Go through the low target.
2455 (initialize_low): Call set_breakpoint_data with the low
2456 target's breakpoint.
2457 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2458 FOP_REGNUM, mappings): Move to ...
2459 * win32-i386-low.c: ... here.
2460 * win32-low.c (win32_thread_info): Move to ...
2461 * win32-low.h: ... here.
2462 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2463 win32-arm-low.c and wincecompat.c.
2464 (all:): Add $EXEEXT.
2465 (install-only:): Likewise.
2466 (gdbserver:): Likewise.
2467 (gdbreplay:): Likewise.
2468 * config.in: Regenerate.
2469 * configure: Regenerate.
2471 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2473 * win32-low.c: Rename typedef thread_info to
2474 win32_thread_info throughout.
2476 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2478 * win32-i386-low.c: Rename to ...
2479 * win32-low.c: ... this.
2480 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2481 * Makefile.in: Likewise.
2483 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2485 * remote-utils.c (monitor_output): Constify msg parameter.
2486 * server.h (monitor_output): Likewise.
2487 * win32-i386-low.c (handle_output_debug_string): New.
2488 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2489 handle_output_debug_string.
2490 (get_child_debug_event): Likewise.
2492 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2494 * server.c (main): Correct strtoul check.
2496 2007-03-27 Jon Ringle <jon@ringle.org>
2498 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2500 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2502 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2504 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2506 * terminal.h: Check HAVE_SGTTY_H.
2508 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2510 * remote-utils.c (remote_open): Print out the assigned port number.
2512 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2514 * remote-utils.c (monitor_output): New function.
2515 * server.c (debug_threads): Define here.
2516 (monitor_show_help): New function.
2517 (handle_query): Handle qRcmd.
2518 (main): Do not handle 'd' packet.
2519 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2520 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2523 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2525 * Makefile.in (EXEEXT): New.
2526 (clean): Use $(EXEEXT).
2528 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2530 * target.h (target_ops): Rename send_signal to request_interrupt,
2531 and remove enum target_signal parameter.
2532 * linux-low.c (linux_request_interrupt): Rename from
2533 linux_send_signal, and always send SIGINT.
2534 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2535 and always send SIGINT.
2536 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2538 (input_interrupt): Likewise.
2540 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2542 * server.c (get_features_xml): Check if target implemented
2544 * win32-i386-low.c (win32_arch_string): New.
2545 (win32_target_ops): Add win32_arch_string as arch_string member.
2547 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2549 * spu-low.c (spu_arch_string): New.
2550 (spu_target_ops): Add spu_arch_string.
2552 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2554 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2555 * configure.ac: Do not check for terminal.h.
2556 * configure, config.in: Regenerated.
2558 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2560 * Makefile.in (OBS): Add $(XML_BUILTIN).
2561 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2563 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2564 (arm-with-iwmmxt.c): New.
2565 * config.in, configure: Regenerate.
2566 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2567 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2568 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2569 (arm*-*-linux*): Add iWMMXt and regset support.
2570 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2571 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2572 (arm_store_wmmxregset, target_regsets): New.
2573 * server.c (get_features_xml): Take annex argument. Check builtin
2575 (handle_query): Handle multiple annexes.
2577 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2579 * remote-utils.c [USE_WIN32API] (read, write): Define.
2580 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2583 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2585 * linux-i386-low.c (the_low_target): Set arch_string.
2586 * linux-x86-64-low.c (the_low_target): Likewise.
2587 * linux-low.c (linux_arch_string): New.
2588 (linux_target_ops): Add it.
2589 * linux-low.h (struct linux_target_ops): Add arch_string.
2590 * server.c (write_qxfer_response): Use const void * for DATA.
2591 (get_features_xml): New.
2592 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2593 * target.h (struct target_ops): Add arch_string method.
2595 2007-01-03 Denis Pilat <denis.pilat@st.com>
2596 Daniel Jacobowitz <dan@codesourcery.com>
2598 * linux-low.c (linux_kill): Handle being called with no threads.
2599 * win32-i386-low.c (win32_kill): Likewise.
2600 (get_child_debug_event): Clear current_process_handle.
2602 2006-12-30 Denis PILAT <denis.pilat@st.com>
2603 Daniel Jacobowitz <dan@codesourcery.com>
2605 * remote-utils.c (remote_open): Check the type of specified
2606 serial port devices before opening them.
2607 * server.c (main): Kill the inferior if an error occurs during
2608 the first remote_open.
2610 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2612 * README: Update supported targets.
2614 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2616 * Makefile.in (clean): Remove reg-mips64.c.
2617 (reg-mips64.c, reg-mips64.o): New rules.
2618 * configure.srv: Handle mips64. Include regset support for mips.
2619 * linux-mips-low.c (union mips_register): New.
2620 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2621 (mips_breakpoint, mips_breakpoint_at): Use int.
2622 (mips_collect_register, mips_supply_register)
2623 (mips_collect_register_32bit, mips_supply_register_32bit)
2624 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2625 (mips_store_fpregset, target_regsets): New.
2626 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2628 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2630 * configure.srv: Add target "spu*-*-*".
2631 * Makefile.in (clean): Remove reg-spu.c.
2632 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2633 * spu-low.c: New file.
2635 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2637 * configure.ac: Correct td_thr_tls_get_addr test.
2638 * configure: Regenerated.
2640 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2642 * linux-low.c (linux_wait_for_event): Reformat. Use the
2644 * remote-utils.c (decode_address_to_semicolon): New.
2645 * server.c (pass_signals, handle_general_set): New.
2646 (handle_query): Mention QPassSignals for qSupported.
2647 (main): Call handle_general_set.
2648 * server.h (pass_signals, decode_address_to_semicolon): New.
2650 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2652 * server.c (handle_query): Correct error handling for read_auxv.
2654 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2656 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2657 and srv_linux_thread_db to yes.
2658 * linux-s390-low.c (s390_fill_gregset): New function.
2659 (target_regsets): Define data structure.
2661 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2663 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2664 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2665 * config.in, configure: Regenerated.
2666 * inferiors.c (gdb_id_to_thread): New function.
2667 (gdb_id_to_thread_id): Use it.
2668 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2669 * linux-low.h (struct process_info): Add th member.
2670 (thread_db_get_tls_address): New prototype.
2671 * remote-utils.c (decode_address): Make non-static.
2672 * server.c (handle_query): Handle qGetTLSAddr.
2673 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2674 * target.h (struct target_ops): Add get_tls_address.
2675 * thread-db.c (maybe_attach_thread): Save the thread handle.
2676 (thread_db_get_tls_address): New.
2678 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2680 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2681 (linux_resume_one_process): Take a siginfo_t *. Update all
2682 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2683 (struct pending_signals): Add a siginfo_t.
2684 (linux_wait_for_process): Always set last_status.
2685 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2686 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2687 * linux-low.h (struct process_info): Add last_status.
2689 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2691 * remote-utils.c (try_rle): New function.
2692 (putpkt_binary): Use it.
2694 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2696 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2697 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2698 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2699 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2700 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2703 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2705 * server.c (terminal_fd): New variable.
2706 (old_foreground_pgrp): Likewise.
2707 (restore_old_foreground_pgrp): New function.
2708 (start_inferior): Record the terminal file descriptor in terminal_fd
2709 and its original foreground group in old_foreground_pgrp. Register
2710 restore_old_foreground_pgrp with atexit().
2712 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2714 * server.c (handle_query): Correct qPart to qXfer.
2716 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2718 * configure.ac: Check for more headers which are missing on
2719 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2720 * configure.srv: Add Cygwin and mingw32.
2721 * remote-utils.c: Don't include headers unconditionally which
2722 are missing on mingw32. Include <winsock.h> for mingw32.
2723 (remote_open): Adjust for mingw32 support. Flush
2724 standard error after writing to it.
2725 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2726 (unblock_async_io, enable_async_io, disable_async_io)
2727 (readchar, getpkt): Update for Winsock support.
2728 (prepare_resume_reply): Expect a protocol signal number.
2729 * server.c: Disable <sys/wait.h> on mingw32.
2730 (start_inferior): Adjust for mingw32 support. Flush
2731 standard error after writing to it.
2732 (attach_inferior): Likewise. Use protocol signal
2734 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2736 * win32-i386-low.c: New file.
2737 * Makefile.in (XM_CLIBS): Set.
2738 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2739 (win32-i386-low.o): New dependency rule.
2740 * linux-low.c (linux_wait): Use target signal numbers.
2741 * target.h (struct target_ops): Doc fix.
2742 * server.h (target_signal_to_name): New prototype.
2743 * gdbreplay.c: Don't include headers unconditionally which
2744 are missing on mingw32. Include <winsock.h> for mingw32.
2745 (remote_close, remote_open): Adjust for Winsock support.
2746 * configure, config.in: Regenerated.
2748 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2750 * server.c (decode_xfer_read, write_qxfer_response): New.
2751 (handle_query): Take a packet length argument. Handle
2752 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2753 the qSupported response.
2754 (main): Update call to handle_query.
2756 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2758 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2759 (putpkt_binary): Renamed from putpkt and adjusted for binary
2761 (putpkt): New wrapper for putpkt_binary.
2762 (readchar): Don't mask off the high bit.
2763 (decode_X_packet): New function.
2764 * server.c (main): Call putpkt_binary if a handler sets the packet
2765 length. Save the length of the incoming packet. Handle 'X'.
2766 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2768 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2770 * server.c (handle_query): Handle qSupported.
2772 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2774 * remote-utils.c (all_symbols_looked_up): New variable.
2775 (look_up_one_symbol): Check it.
2776 * server.h (look_up_one_symbol): New declaration.
2777 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2779 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2781 * Makefile.in (linux-arm-low.o): Update dependencies.
2782 * linux-arm-low.c: Include "gdb_proc_service.h".
2783 (PTRACE_GET_THREAD_AREA): Define.
2784 (ps_get_thread_area): New function.
2786 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2788 * configure.srv (m68k*-*-uclinux*): New target.
2789 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2790 (linux_resume_one_process): Remove extraneous cast.
2791 (linux_read_offsets): New.
2792 (linux_target_op): Add linux_read_offsets on mmuless systems.
2793 * server.c (handle_query): Add qOffsets logic.
2794 * target.h (struct target_ops): Add read_offsets.
2796 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2798 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2799 (PTRACE_GET_THREAD_AREA): Define.
2800 (ps_get_thread_area): New function.
2801 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2802 (linux-x86-64-low.o): Update.
2804 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2806 * configure.ac: Remove checks for prfpregset_t.
2807 * gdb_proc_service.h: New file.
2808 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2809 new "gdb_proc_service.h".
2810 * proc-service.c: Likewise.
2811 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2812 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2813 * Makefile.in (gdb_proc_service_h): Updated.
2814 * configure, config.in: Regenerated.
2816 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2818 * remote-utils.c (prepare_resume_reply): Move declaration
2819 of gdb_id_from_wait to the top of the block.
2821 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2823 * linux-low.c (regsets_store_inferior_registers): Read the regset
2824 from the target before filling it.
2826 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2828 * server.c (attach_inferior): Return SIGTRAP for a successful
2831 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2833 * Makefile.in (OBS): Add version.o.
2834 (STAGESTUFF): Delete.
2835 (version.o): Add dependencies.
2836 (version.c): Replace rule.
2837 (clean): Remove version.c.
2838 * server.c (gdbserver_version): New.
2839 (gdbserver_usage): Use printf.
2840 (main): Handle --version and --help.
2841 * server.h (version, host_name): Add declarations.
2843 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2855 * linux-x86-64-low.c:
2858 * linux-ppc64-low.c:
2867 * linux-crisv32-low.c:
2879 * gdbserver.1: Add (C) after Copyright. Update the FSF
2882 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2884 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2885 (arm_breakpoint_at): Recognize both breakpoints.
2886 (the_low_target): Use the correct breakpoint instruction.
2888 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2890 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2891 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2892 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2893 (the_low_target): Update.
2895 2005-10-25 Andreas Schwab <schwab@suse.de>
2897 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2899 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2900 (ia64_num_regs): Reduce to 462.
2902 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2904 * acinclude.m4: Correct quoting.
2905 * aclocal.m4: Regenerated.
2907 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2908 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2909 (thread_db_init): Call thread_db_err_str.
2910 * configure.ac: Check for TD_VERSION.
2911 * config.in, configure: Regenerated.
2913 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2915 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2917 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2919 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2920 is not available. Define HAVE_PTRACE_GETREGS if it is.
2921 * config.in, configure: Regenerated.
2922 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2923 * linux-i386-low.c, linux-m68k-low.c: Update to use
2924 HAVE_PTRACE_GETREGS.
2925 * linux-low.c (regsets_fetch_inferior_registers)
2926 (regsets_store_inferior_registers): Only return 0 if we processed
2928 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2929 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2931 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2933 * inferiors.c (struct thread_info): Add gdb_id.
2934 (add_thread): Add gdb_id argument.
2935 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2936 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2937 calls to add_thread.
2938 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2939 * server.c (handle_query): Use thread_to_gdb_id.
2940 (handle_v_cont, main): Use gdb_id_to_thread_id.
2941 * server.h (add_thread): Update prototype.
2942 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2945 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2947 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2948 left-padded registers.
2949 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2950 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2952 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2954 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2955 * configure: Regenerate.
2956 * config.in: Regenerate.
2957 * server.h (NEED_DECLARATION_STRERROR):
2958 Replace with !HAVE_DECL_STRERROR.
2960 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2962 * linux-low.c (linux_wait, linux_send_signal): Don't test
2963 an unsigned long variable for > 0 if it could be MAX_ULONG.
2964 * server.c (myresume): Likewise.
2965 * target.c (set_desired_inferior): Likewise.
2967 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2969 * configure.ac: Simplify and improve check for socklen_t.
2970 * configure, config.in: Regenerate.
2972 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2974 * acconfig.h: Remove.
2975 * configure.ac: Add a test for socklen_t. Use three-argument
2976 AC_DEFINE throughout.
2977 * config.in: Regenerated using autoheader 2.59.
2978 * configure: Regenerated.
2980 * gdbreplay.c (socklen_t): Provide a default.
2981 (remote_open): Use socklen_t.
2982 * remote-utils.c (socklen_t): Provide a default.
2983 (remote_open): Use socklen_t.
2984 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2987 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2989 * linux-low.c (linux_read_memory, linux_write_memory)
2990 (linux_read_auxv): Likewise.
2991 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2992 (check_mem_write): Likewise.
2993 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2995 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2996 (registers_from_string, register_data): Likewise.
2997 * server.c (handle_query, main): Likewise.
2998 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2999 (decode_M_packet): Likewise.
3000 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3001 * target.h (struct target_ops): Update read_memory, write_memory,
3003 (read_inferior_memory, write_inferior_memory): Update.
3004 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3006 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3007 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3008 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3009 linux-s390-low.c, linux-sh-low.c: Update for changes in
3010 read_inferior_memory and the_low_target->breakpoint.
3012 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3014 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3015 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3016 * configure.srv: Add powerpc64-*-linux*.
3017 * linux-ppc64-low.c: New file.
3019 2005-05-23 Orjan Friberg <orjanf@axis.com>
3021 * linux-cris-low.c: New file with support for CRIS.
3022 * linux-crisv32-low.c: Ditto for CRISv32.
3023 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3024 (clean): Add reg-cris.c and reg-crisv32.c.
3025 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3026 reg-crisv32.o, and reg-crisv32.c to make rules.
3027 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3030 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3032 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3033 of sizeof (PTRACE_XFER_TYPE).
3034 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3036 2005-05-12 Orjan Friberg <orjanf@axis.com>
3038 * target.h (struct target_ops): Add insert_watchpoint,
3039 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3040 pointers for hardware watchpoint support.
3041 * linux-low.h (struct linux_target_ops): Ditto.
3042 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3043 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3044 to linux_target_ops.
3045 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3047 * server.c (main): Recognize 'Z' and 'z' packets.
3049 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3051 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3052 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3053 (the_low_target): Add new members.
3055 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3057 * proc-service.c (ps_lgetregs): Search all_processes instead of
3060 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3062 * server.c (start_inferior): Change return type to int.
3063 (attach_inferior): Change sigptr to int *.
3064 (handle_v_cont, handle_v_requests): Change signal to int *.
3065 (main): Change signal to int.
3067 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3069 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3070 * configure.srv: Add m32r*-*-linux*.
3071 * linux-m32r-low.c: New file.
3073 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3075 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3077 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3079 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3080 Take unsigned long arguments for PIDs.
3081 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3082 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3083 (wait_for_sigstop, linux_resume_one_process)
3084 (regsets_fetch_inferior_registers, linux_send_signal)
3085 (linux_read_auxv): Likewise. Update the types of variables holding
3086 PIDs. Update format string specifiers.
3087 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3088 * remote-utils.c (prepare_resume_reply): Likewise.
3089 * server.c (cont_thread, general_thread, step_thread)
3090 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3092 (handle_query): Update format specifiers.
3093 (handle_v_cont, main): Use strtoul for thread IDs.
3094 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3095 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3096 (general_thread, step_thread, thread_from_wait)
3097 (old_thread_from_wait): Update.
3098 * target.h (struct thread_resume): Use unsigned long for THREAD.
3099 (struct target_ops): Use unsigned long for arguments to attach and
3102 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3104 * acinclude.m4: Include bfd/bfd.m4 directly.
3105 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3106 <agriffis@toolchain.org>.
3107 * aclocal.m4, configure: Regenerated.
3109 2005-01-07 Andrew Cagney <cagney@gnu.org>
3111 * configure.ac: Rename configure.in, require autoconf 2.59.
3112 * configure: Re-generate.
3114 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3116 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3118 * aclocal.m4: Regenerated.
3119 * configure: Regenerated.
3121 2004-11-21 Andreas Schwab <schwab@suse.de>
3123 * linux-m68k-low.c (m68k_num_gregs): Define.
3124 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3125 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3126 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3127 (m68k_breakpoint_at): New. Add to the_low_target.
3129 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3130 srv_linux_thread_db to yes.
3132 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3134 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3135 (ARCH_SET_FS): Likewise.
3136 (ARCH_GET_FS): Likewise.
3137 (ARCH_GET_GS): Likewise.
3139 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3141 * linux-i386-low.c (ps_get_thread_area): New.
3142 * linux-x86-64-low.c (ps_get_thread_area): New.
3143 * linux-low.c: Include <sys/syscall.h>.
3144 (linux_kill_one_process): Don't kill the first thread here.
3145 (linux_kill): Kill the first thread here.
3146 (kill_lwp): New function.
3147 (send_sigstop, linux_send_signal): Use it.
3148 * proc-service.c: Clean up #ifdefs.
3149 (fpregset_info): Delete.
3150 (ps_lgetregs): Update and enable implementation.
3151 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3153 * remote-utils.c (struct sym_cache, symbol_cache): New.
3154 (input_interrupt): Print a clearer message.
3155 (async_io_enabled): New variable.
3156 (enable_async_io, disable_async_io): Use it. Update comments.
3157 (look_up_one_symbol): Use the symbol cache.
3158 * thread-db.c (thread_db_look_up_symbols): New function.
3159 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3161 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3163 * configure.in: Test for -rdynamic.
3164 * configure: Regenerated.
3165 * Makefile (INTERNAL_LDFLAGS): New.
3166 (gdbserver, gdbreplay): Use it.
3168 2004-09-02 Andrew Cagney <cagney@gnu.org>
3170 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3172 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3174 * linux-low.c (linux_wait): Clear all_processes list also.
3176 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3178 * linux-low.c: Include <errno.h>. Remove extern declaration of
3181 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3183 * gdbreplay.c, server.h, utils.c: Update copyright years.
3185 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3187 * server.c (main): Print child status or termination signal from
3188 variable 'signal', not 'sig'.
3190 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3192 * linux-low.c (linux_read_memory): Change return type to
3193 int. Check for and return error from ptrace().
3194 * target.c (read_inferior_memory): Change return type to int. Pass
3195 back return status from the_target->read_memory().
3196 * target.h (struct target_ops): Adapt *read_memory() prototype.
3198 (read_inferior_memory): Adapt prototype.
3199 * server.c (main): Return an error packet if
3200 read_inferior_memory() returns an error.
3202 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3204 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3205 Unify with other clean targets.
3207 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3209 * server.c (handle_v_cont): Call set_desired_inferior.
3211 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3213 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3217 * linux-low.c (linux_wait): Unblock async I/O.
3218 (linux_resume): Block and enable async I/O.
3219 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3220 * server.h (block_async_io, unblock_async_io): Add prototypes.
3222 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3224 * remote-utils.c (remote_open): Print a status notice after
3226 * server.c (attach_inferior): Print a status notice after
3229 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3231 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3233 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3235 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3237 * server.c, target.h: Update copyright years.
3239 2004-02-25 Roland McGrath <roland@redhat.com>
3241 * target.h (struct target_ops): New member `read_auxv'.
3242 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3243 * linux-low.c (linux_read_auxv): New function.
3244 (linux_target_ops): Initialize `read_auxv' member to that.
3246 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3248 Committed by Jim Blandy <jimb@redhat.com>.
3250 * linux-s390-low.c (s390_num_regs): Update.
3251 (s390_regmap): Remove control registers. Use __s390x__ predefine
3252 instead of GPR_SIZE to distiguish s390 and s390x targets.
3254 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3256 * linux-low.c: Update copyright year.
3257 (check_removed_breakpoint): Clear pending_is_breakpoint.
3258 (linux_set_resume_request, linux_queue_one_thread)
3259 (resume_status_pending_p): New functions.
3260 (linux_continue_one_thread): Use process->resume.
3261 (linux_resume): Only resume threads if there are no pending events.
3262 * linux-low.h (struct process_info): Add resume request
3265 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3267 * regcache.c (new_register_cache): Clear the allocated register
3268 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3270 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3272 * linux-low.c (linux_resume): Take a struct thread_resume *
3274 (linux_wait): Update call.
3275 (resume_ptr): New static variable.
3276 (linux_continue_one_thread): Renamed from
3277 linux_continue_one_process. Use resume_ptr.
3278 (linux_resume): Use linux_continue_one_thread.
3279 * server.c (handle_v_cont, handle_v_requests): New functions.
3280 (myresume): New function.
3281 (main): Handle 'v' case.
3282 * target.h (struct thread_resume): New type.
3283 (struct target_ops): Change argument of "resume" to struct
3285 (myresume): Delete macro.
3287 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3289 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3290 (uninstall): Support DESTDIR.
3292 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3294 * configure.srv: Add xscale*linux copy of arm*linux entry.
3296 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3298 * linux-arm-low.c (arm_reinsert_addr): New function.
3299 (the_low_target): Add arm_reinsert_addr.
3301 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3303 * mem-break.c: Remove whitespace at end of file.
3305 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3307 * configure.in: Check whether we need to prototype strerror.
3308 * server.h: Optionally prototype strerror.
3309 * gdbreplay.c (perror_with_name): Use strerror.
3310 * linux-low.c (linux_attach_lwp): Use strerror.
3311 * utils.c (perror_with_name): Use strerror.
3312 * config.in, configure: Regenerated.
3314 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3316 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3317 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3319 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3321 * Makefile.in (SFILES): Update.
3322 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3323 low-sun3.c: Remove files.
3325 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3327 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3328 (linux_detach_one_process, linux_detach): New functions.
3329 (linux_target_ops): Add linux_detach.
3330 * server.c (main): Handle 'D' packet.
3331 * target.h (struct target_ops): Add "detach" member.
3332 (detach_inferior): Define.
3334 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3336 From Kelley Cook <kelleycook@wideopenwest.com>:
3337 * configure.srv: Accept i[34567]86 variants.
3339 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3341 * linux-low.c (linux_wait_for_event): Correct comment typos.
3342 (linux_resume_one_process): Call check_removed_breakpoint.
3343 (linux_send_signal): New function.
3344 (linux_target_ops): Add linux_send_signal.
3345 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3347 * target.h (struct target_ops): Add send_signal.
3349 2003-05-29 Jim Blandy <jimb@redhat.com>
3351 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3352 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3353 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3354 away part of the register's value.
3356 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3358 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3359 (linux_wait_for_event, linux_init_signals): Likewise.
3361 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
3363 * configure.in: Check for stdlib.h.
3364 * configure: Regenerated.
3365 * config.in: Regenerated.
3367 2003-01-04 Andreas Schwab <schwab@suse.de>
3369 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3371 2003-01-02 Andrew Cagney <ac131313@redhat.com>
3373 * Makefile.in: Remove obsolete code.
3375 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3377 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3378 defined(PT_FPR0_HI).
3380 2002-11-17 Stuart Hughes <seh@zee2.com>
3382 * linux-arm-low.c (arm_num_regs): Increase.
3383 (arm_regmap): Include status register.
3385 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3387 * linux-low.c (register_addr): Remove incorrect -1 check.
3389 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3391 * linux-low.c (linux_create_inferior): Call setpgid. Return
3393 (unstopped_p, linux_signal_pid): Remove.
3394 (linux_target_ops): Remove linux_signal_pid.
3395 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3396 global instead of target method.
3397 * target.h (struct target_ops): Remove signal_pid. Update comment
3398 for create_inferior.
3399 * server.c (signal_pid): New variable.
3400 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3401 gdbserver. Set the child to be the foreground process group.
3402 (attach_inferior): Set signal_pid.
3404 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3406 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3408 2002-08-20 Jim Blandy <jimb@redhat.com>
3410 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3413 2002-08-01 Andrew Cagney <cagney@redhat.com>
3415 * Makefile.in: Make chill references obsolete.
3417 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3419 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3420 * configure: Regenerate.
3421 * config.in: Regenerate.
3423 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3425 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3426 (perror_with_name, remote_close, remote_open, expect, play): Static.
3428 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3430 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3431 byte offsets instead of an array of indexes.
3432 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3434 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3436 * regcache.c: Add comment.
3438 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3440 * thread-db.c: New file.
3441 * proc-service.c: New file.
3442 * acinclude.m4: New file.
3443 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3444 proc-service.o, and thread-db.o.
3445 (linux-low.o): Add USE_THREAD_DB.
3446 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3447 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3448 * aclocal.m4: Regenerated.
3449 * config.in: Regenerated.
3450 * configure: Regenerated.
3451 * configure.in: Check for proc_service.h, sys/procfs.h,
3452 thread_db.h, and linux/elf.h headrs.
3453 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3454 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3455 Check for -lthread_db and thread support.
3456 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3457 PowerPC, and SuperH.
3458 * i387-fp.c: Constify arguments.
3459 * i387-fp.h: Likewise.
3460 * inferiors.c: (struct thread_info): Renamed from
3461 `struct inferior_info'. Remove PID member. Use generic inferior
3462 list header. All uses updated.
3463 (inferiors, signal_pid): Removed.
3464 (all_threads): New variable.
3465 (get_thread): Define.
3466 (add_inferior_to_list): New function.
3467 (for_each_inferior): New function.
3468 (change_inferior_id): New function.
3469 (add_inferior): Removed.
3470 (remove_inferior): New function.
3471 (add_thread): New function.
3472 (free_one_thread): New function.
3473 (remove_thread): New function.
3474 (clear_inferiors): Use for_each_inferior and free_one_thread.
3475 (find_inferior): New function.
3476 (find_inferior_id): New function.
3477 (inferior_target_data): Update argument type.
3478 (set_inferior_target_data): Likewise.
3479 (inferior_regcache_data): Likewise.
3480 (set_inferior_regcache_data): Likewise.
3481 * linux-low.c (linux_bp_reinsert): Remove.
3482 (all_processes, stopping_threads, using_thrads)
3483 (struct pending_signals, debug_threads, pid_of): New.
3484 (inferior_pid): Replace with macro.
3485 (struct inferior_linux_data): Remove.
3486 (get_stop_pc, add_process): New functions.
3487 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3488 Use add_process and add_thread.
3489 (linux_attach_lwp): New function, based on old linux_attach. Use
3490 add_process and add_thread. Set stop_expected for new threads.
3491 (linux_attach): New function.
3492 (linux_kill_one_process): New function.
3493 (linux_kill): Kill all LWPs.
3494 (linux_thread_alive): Use find_inferior_id.
3495 (check_removed_breakpoints, status_pending_p): New functions.
3496 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3497 Update. Use WNOHANG. Wait for cloned processes also. Update process
3498 struct for the found process.
3499 (linux_wait_for_event): New function.
3500 (linux_wait): Use it. Support LWPs.
3501 (send_sigstop, wait_for_sigstop, stop_all_processes)
3502 (linux_resume_one_process, linux_continue_one_process): New functions.
3503 (linux_resume): Support LWPs.
3504 (REGISTER_RAW_SIZE): Remove.
3505 (fetch_register): Use register_size instead. Call supply_register.
3506 (usr_store_inferior_registers): Likewise. Call collect_register.
3508 (regsets_fetch_inferior_registers): Improve error message.
3509 (regsets_store_inferior_registers): Add debugging.
3510 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3511 (unstopped_p, linux_signal_pid): New functions.
3512 (linux_target_ops): Add linux_signal_pid.
3513 (linux_init_signals): New function.
3514 (initialize_low): Call it. Initialize using_threads.
3515 * regcache.c (inferior_regcache_data): Add valid
3517 (get_regcache): Fetch registers lazily. Add fetch argument
3518 and update all callers.
3519 (regcache_invalidate_one, regcache_invalidate): New
3521 (new_register_cache): Renamed from create_register_cache.
3522 Return the new regcache.
3523 (free_register_cache): Change argument to a void *.
3524 (registers_to_string, registers_from_string): Call get_regcache
3525 with fetch flag set.
3526 (register_data): Make static. Pass fetch flag to get_regcache.
3527 (supply_register): Call get_regcache with fetch flag clear.
3528 (collect_register): Call get_regcache with fetch flag set.
3529 (collect_register_as_string): New function.
3530 * regcache.h: Update.
3531 * remote-utils.c (putpkt): Flush after debug output and use
3533 Handle input interrupts while waiting for an ACK.
3534 (input_interrupt): Use signal_pid method.
3535 (getpkt): Flush after debug output and use stderr.
3536 (outreg): Use collect_register_as_string.
3537 (new_thread_notify, dead_thread_notify): New functions.
3538 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3540 (look_up_one_symbol): Flush after debug output.
3541 * server.c (step_thread, server_waiting): New variables.
3542 (start_inferior): Don't use signal_pid. Update call to mywait.
3543 (attach_inferior): Update call to mywait.
3544 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3545 (main): Don't fetch/store registers explicitly. Use
3546 set_desired_inferior. Support proposed ``Hs'' packet. Update
3549 (struct inferior_list, struct_inferior_list_entry): New.
3550 * target.c (set_desired_inferior): New.
3551 (write_inferior_memory): Constify.
3552 (mywait): New function.
3554 (struct target_ops): New signal_pid method.
3555 (mywait): Removed macro, added prototype.
3557 * linux-low.h (regset_func): Removed.
3558 (regset_fill_func, regset_store_func): New.
3559 (enum regset_type): New.
3560 (struct regset_info): Add type field. Use new operation types.
3561 (struct linux_target_ops): stop_pc renamed to get_pc.
3562 Add decr_pc_after_break and breakpoint_at.
3563 (get_process, get_thread_proess, get_process_thread)
3564 (strut process_info, all_processes, linux_attach_lwp)
3565 (thread_db_init): New.
3567 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3568 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3569 (the_low_target): Add new members.
3570 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3571 (i386_store_fpxregset): Constify.
3572 (target_regsets): Add new kind identifier.
3573 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3574 (i386_set_pc): Add debugging.
3575 (i386_breakpoint_at): New function.
3576 (the_low_target): Add new members.
3577 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3578 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3579 (mips_breakpoint_at): New.
3580 (the_low_target): Add new members.
3581 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3582 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3583 (the_low_target): Add new members.
3584 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3585 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3586 (the_low_target): Add new members.
3587 * linux-x86-64-low.c (target_regsets): Add new kind
3590 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3592 From Martin Pool <mbp@samba.org>:
3593 * server.c (gdbserver_usage): New function.
3596 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3598 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3601 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3603 * Makefile.in: Remove obsolete code.
3605 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3607 * linux-low.c (regsets_fetch_inferior_registers),
3608 (regsets_store_inferior_registers): Removed cast to int from
3610 * regcache.h: Added declaration of struct inferior_info.
3612 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3614 * inferiors.c (struct inferior_info): Add regcache_data.
3615 (add_inferior): Call create_register_cache.
3616 (clear_inferiors): Call free_register_cache.
3617 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3618 * regcache.c (struct inferior_regcache_data): New.
3619 (registers): Remove.
3620 (get_regcache): New function.
3621 (create_register_cache, free_register_cache): New functions.
3622 (set_register_cache): Don't initialize the register cache here.
3623 (registers_to_string, registers_from_string, register_data): Call
3625 * regcache.h: Add prototypes.
3626 * server.h: Likewise.
3628 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3630 * mem-break.c: New file.
3631 * mem-break.h: New file.
3632 * Makefile.in: Add mem-break.o rule; update server.h
3634 * inferiors.c (struct inferior_info): Add target_data
3636 (clear_inferiors): Free target_data member if set.
3637 (inferior_target_data, set_inferior_target_data): New functions.
3638 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3639 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3640 * linux-low.c (linux_bp_reinsert): New variable.
3641 (struct inferior_linux_data): New.
3642 (linux_create_inferior): Use set_inferior_target_data.
3643 (linux_attach): Likewise. Call add_inferior.
3644 (linux_wait_for_one_inferior): New function.
3645 (linux_wait): Call it.
3646 (linux_write_memory): Add const.
3647 (initialize_low): Call set_breakpoint_data.
3648 * linux-low.h (struct linux_target_ops): Add breakpoint
3650 * server.c (attach_inferior): Remove extra add_inferior
3652 * server.h: Include mem-break.h. Update inferior.c
3654 * target.c (read_inferior_memory)
3655 (write_inferior_memory): New functions.
3656 * target.h (read_inferior_memory)
3657 (write_inferior_memory): Change macros to prototypes.
3658 (struct target_ops): Update comments. Add const to write_memory
3661 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3663 * linux-low.c (usr_store_inferior_registers): Support
3664 registers which are allowed to fail to store.
3665 * linux-low.h (linux_target_ops): Likewise.
3666 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3667 (ppc_cannot_store_register): FPSCR may not be storable.
3669 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3671 * server.h: Include <string.h> if HAVE_STRING_H.
3672 * ChangeLog: Correct paths in last ChangeLog entry.
3674 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3676 * linux-low.h: Remove obsolete prototypes.
3677 (struct linux_target_ops): New.
3678 (extern the_low_target): New.
3679 * linux-low.c (num_regs, regmap): Remove declarations.
3680 (register_addr): Use the_low_target explicitly.
3681 (fetch_register): Likewise.
3682 (usr_fetch_inferior_registers): Likewise.
3683 (usr_store_inferior_registers): Likewise.
3684 * linux-arm-low.c (num_regs): Remove.
3685 (arm_num_regs): Define.
3686 (arm_regmap): Renamed from regmap, made static.
3687 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3689 (arm_cannot_store_register): Renamed from cannot_store_register,
3691 (the_low_target): New.
3692 * linux-i386-low.c (num_regs): Remove.
3693 (i386_num_regs): Define.
3694 (i386_regmap): Renamed from regmap, made static.
3695 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3697 (i386_cannot_store_register): Renamed from cannot_store_register,
3699 (the_low_target): New.
3700 * linux-ia64-low.c (num_regs): Remove.
3701 (ia64_num_regs): Define.
3702 (ia64_regmap): Renamed from regmap, made static.
3703 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3705 (ia64_cannot_store_register): Renamed from cannot_store_register,
3707 (the_low_target): New.
3708 * linux-m68k-low.c (num_regs): Remove.
3709 (m68k_num_regs): Define.
3710 (m68k_regmap): Renamed from regmap, made static.
3711 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3713 (m68k_cannot_store_register): Renamed from cannot_store_register,
3715 (the_low_target): New.
3716 * linux-mips-low.c (num_regs): Remove.
3717 (mips_num_regs): Define.
3718 (mips_regmap): Renamed from regmap, made static.
3719 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3721 (mips_cannot_store_register): Renamed from cannot_store_register,
3723 (the_low_target): New.
3724 * linux-ppc-low.c (num_regs): Remove.
3725 (ppc_num_regs): Define.
3726 (ppc_regmap): Renamed from regmap, made static.
3727 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3729 (ppc_cannot_store_register): Renamed from cannot_store_register,
3731 (the_low_target): New.
3732 * linux-s390-low.c (num_regs): Remove.
3733 (s390_num_regs): Define.
3734 (s390_regmap): Renamed from regmap, made static.
3735 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3737 (s390_cannot_store_register): Renamed from cannot_store_register,
3739 (the_low_target): New.
3740 * linux-sh-low.c (num_regs): Remove.
3741 (sh_num_regs): Define.
3742 (sh_regmap): Renamed from regmap, made static.
3743 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3745 (sh_cannot_store_register): Renamed from cannot_store_register,
3747 (the_low_target): New.
3748 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3749 (the_low_target): New.
3751 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3753 * Makefile.in: Add stamp-h target.
3754 * configure.in: Create stamp-h.
3755 * configure: Regenerated.
3757 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3759 * inferiors.c: New file.
3760 * target.c: New file.
3761 * target.h: New file.
3762 * Makefile.in: Add target.o and inferiors.o. Update
3764 * linux-low.c (inferior_pid): New static variable,
3765 moved from server.c.
3766 (linux_create_inferior): Renamed from create_inferior.
3767 Call add_inferior. Return 0 on success instead of a PID.
3768 (linux_attach): Renamed from myattach.
3769 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3770 (linux_thread_alive): Renamed from mythread_alive.
3771 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3773 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3774 (regsets_store_inferior_registers): Correct error message.
3775 Add missing ``return 0''.
3776 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3777 (linux_store_registers): Renamed from store_inferior_registers.
3778 (linux_read_memory): Renamed from read_inferior_memory.
3779 (linux_write_memory): Renamed from write_inferior_memory.
3780 (linux_target_ops): New structure.
3781 (initialize_low): Call set_target_ops ().
3782 * remote-utils.c (unhexify): New function.
3783 (hexify): New function.
3784 (input_interrupt): Send signals to ``signal_pid''.
3785 * server.c (inferior_pid): Remove.
3786 (start_inferior): Update create_inferior call.
3787 (attach_inferior): Call add_inferior.
3788 (handle_query): New function.
3789 (main): Call handle_query for `q' packets.
3790 * server.h: Include "target.h". Remove obsolete prototypes.
3791 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3793 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3795 * Makefile.in: Add WARN_CFLAGS. Update configury
3797 * configure.in: Check for <string.h>
3798 * configure: Regenerate.
3799 * config.in: Regenerate.
3800 * gdbreplay.c: Include needed system headers.
3801 (remote_open): Remove strchr prototype.
3802 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3803 * regcache.c (supply_register): Change buf argument to const void *.
3804 (supply_register_by_name): Likewise.
3805 (collect_register): Change buf argument to void *.
3806 (collect_register_by_name): Likewise.
3807 * regcache.h: Add missing prototypes.
3808 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3809 * server.c (handle_query): New function.
3810 (attached): New static variable, moved out of main.
3811 (main): Quiet longjmp clobber warnings.
3812 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3813 * utils.c (error): Remove NORETURN.