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