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