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