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