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