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