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