a9bbf3ad356cc0d02c6499f17de24cae104e0771
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2
3 Non-stop mode support.
4
5 * server.h (non_stop): Declare.
6 (gdb_client_data, handler_func): Declare.
7 (delete_file_handler, add_file_handler, start_event_loop):
8 Declare.
9 (handle_serial_event, handle_target_event, push_event)
10 (putpkt_notif): Declare.
11 * target.h (enum resume_kind): New.
12 (struct thread_resume): Replace `step' field by `kind' field.
13 (TARGET_WNOHANG): Define.
14 (struct target_ops) <wait>: Add `options' argument.
15 <supports_non_stop, async, start_non_stop>: New fields.
16 (target_supports_non_stop, target_async): New.
17 (start_non_stop): Declare.
18 (mywait): Add `options' argument.
19 * target.c (mywait): Add `options' argument. Print child exit
20 notifications here.
21 (start_non_stop): New.
22 * server.c (non_stop, own_buf, mem_buf): New globals.
23 (struct vstop_notif): New.
24 (notif_queue): New global.
25 (queue_stop_reply, push_event, discard_queued_stop_replies)
26 (send_next_stop_reply): New.
27 (start_inferior): Adjust to use resume_kind. Adjust to mywait
28 interface changes.
29 (attach_inferior): In non-stop mode, don't wait for the target
30 here.
31 (handle_general_set): Handle QNonStop.
32 (handle_query): When handling qC, return the current general
33 thread, instead of the first thread of the list.
34 (handle_query): If the backend supports non-stop mode, include
35 QNonStop+ in the qSupported query response.
36 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
37 and non-stop mode.
38 (handle_v_attach, handle_v_run): Handle non-stop mode.
39 (handle_v_stopped): New.
40 (handle_v_requests): Report support for vCont;t. Handle vStopped.
41 (myresume): Adjust to use resume_kind. Handle non-stop.
42 (queue_stop_reply_callback): New.
43 (handle_status): Handle non-stop mode.
44 (main): Clear non_stop flag on reconnection. Use the event-loop.
45 Refactor serial protocol handling from here ...
46 (process_serial_event): ... to this new function. When GDB
47 selects any thread, select one here. In non-stop mode, wait until
48 GDB acks all pending events before exiting.
49 (handle_serial_event, handle_target_event): New.
50 * remote-utils.c (remote_open): Install remote_desc in the event
51 loop.
52 (remote_close): Remove remote_desc from the event loop.
53 (putpkt_binary): Rename to...
54 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
55 (putpkt_binary): New as wrapper around putpkt_binary_1.
56 (putpkt_notif): New.
57 (prepare_resume_reply): In non-stop mode, don't change the
58 general_thread.
59 * event-loop.c: New.
60 * Makefile.in (OBJ): Add event-loop.o.
61 (event-loop.o): New rule.
62
63 * linux-low.h (pid_of): Moved here.
64 (lwpid_of): New.
65 (get_lwp_thread): Use lwpid_of.
66 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
67 * linux-low.c (pid_of): Delete.
68 (inferior_pid): Use lwpid_of.
69 (linux_event_pipe): New.
70 (target_is_async_p): New.
71 (delete_lwp): New.
72 (handle_extended_wait): Use lwpid_of.
73 (add_lwp): Don't set lwpid field.
74 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
75 (linux_kill_one_lwp): If killing a running lwp, stop it first.
76 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
77 (linux_detach_one_lwp): If detaching from a running lwp, stop it
78 first. Adjust to linux_wait_for_event interface changes. Use
79 lwpid_of.
80 (linux_detach): Don't delete the main lwp here.
81 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
82 (status_pending_p): Don't consider explicitly suspended lwps.
83 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
84 pointer. Add OPTIONS argument. Change return type to int. Use
85 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
86 (linux_wait_for_event): Take an integer pid instead of a lwp_info
87 pointer. Add status pointer argument. Return a pid instead of a
88 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
89 changes. In non-stop mode, don't switch to a random thread.
90 (linux_wait): Rename to...
91 (linux_wait_1): ... this. Add target_options argument, and handle
92 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
93 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
94 clean exit and signal exit code. Don't stop all threads in
95 non-stop mode. In all-stop mode, only stop all threads when
96 reporting a stop to GDB. Handle explicit thread stop requests.
97 (async_file_flush, async_file_mark): New.
98 (linux_wait): New.
99 (send_sigstop): Use lwpid_of.
100 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
101 interface changes. In non-stop mode, don't switch to a random
102 thread.
103 (linux_resume_one_lwp): Use lwpid_of.
104 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
105 (linux_resume_one_thread): ... this. Handle resume_stop. In
106 non-stop mode, don't look for pending flag in all threads.
107 (resume_status_pending_p): Don't consider explicitly suspended
108 threads.
109 (my_waitpid): Reimplement. Emulate __WALL.
110 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
111 Use lwpid_of.
112 (sigchld_handler, linux_supports_non_stop, linux_async)
113 (linux_start_non_stop): New.
114 (linux_target_ops): Register linux_supports_non_stop, linux_async
115 and linux_start_non_stop.
116 (initialize_low): Install SIGCHLD handler.
117 * thread-db.c (thread_db_create_event, find_one_thread)
118 (thread_db_get_tls_address): Use lwpid_of.
119 * win32-low.c (win32_detach): Adjust to use resume_kind.
120 (win32_wait): Add `options' argument.
121 * spu-low.c (spu_resume): Adjust to use resume_kind.
122 (spu_wait): Add `options' argument.
123
124 2009-04-01 Pedro Alves <pedro@codesourcery.com>
125
126 Decouple target code from remote protocol.
127
128 * target.h (enum target_waitkind): New.
129 (struct target_waitstatus): New.
130 (struct target_ops) <wait>: Return an unsigned long. Take a
131 target_waitstatus pointer instead of a char pointer.
132 (mywait): Likewise.
133 * target.c (mywait): Change prototype to return an unsigned long.
134 Take a target_waitstatus pointer instead of a char pointer. Adjust.
135 * server.h (thread_from_wait, old_thread_from_wait): Delete
136 declarations.
137 (prepare_resume_reply): Change prototype to take a
138 target_waitstatus.
139 * server.c (thread_from_wait, old_thread_from_wait): Delete.
140 (last_status, last_ptid): New.
141 (start_inferior): Remove "statusptr" argument. Adjust. Return a
142 pid instead of a signal.
143 (attach_inferior): Remove "status" and "signal" parameters.
144 Adjust.
145 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
146 not as an address.
147 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
148 (handle_v_requests, myresume): Remove "status" and "signal"
149 parameters. Adjust.
150 (handle_status): New.
151 (main): Delete local `status'. Adjust.
152 * remote-utils.c: Include target.h.
153 (prepare_resume_reply): Change prototype to take a
154 target_waitstatus. Adjust.
155
156 * linux-low.c (linux_wait): Adjust to new target_ops->wait
157 interface.
158 * spu-low.c (spu_wait): Adjust.
159 * win32-low.c (enum target_waitkind, struct target_waitstatus):
160 Delete.
161 (win32_wait): Adjust.
162
163 2009-04-01 Pedro Alves <pedro@codesourcery.com>
164
165 * target.h (struct thread_resume): Delete leave_stopped member.
166 (struct target_ops): Add a `n' argument to the `resume' callback.
167 * server.c (start_inferior): Adjust.
168 (handle_v_cont, myresume): Adjust.
169 * linux-low.c (check_removed_breakpoint): Adjust to resume
170 interface change, and to removed leave_stopped field.
171 (resume_ptr): Delete.
172 (struct thread_resume_array): New.
173 (linux_set_resume_request): Add new `arg' parameter. Adjust to
174 resume interface change.
175 (linux_continue_one_thread, linux_queue_one_thread)
176 (resume_status_pending_p): Check if the resume field is NULL
177 instead of checking the leave_stopped member.
178 (linux_resume): Adjust to the target resume interface change.
179 * spu-low.c (spu_resume): Adjust to the target resume interface
180 change.
181 * win32-low.c (win32_detach, win32_resume): Ditto.
182
183 2009-04-01 Pedro Alves <pedro@codesourcery.com>
184
185 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
186 flag.
187 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
188 pending.
189 (linux_continue_one_thread): Only preserve the stepping flag if
190 there's a pending breakpoint.
191
192 2009-03-31 Pedro Alves <pedro@codesourcery.com>
193
194 * server.c (main): After the inferior having exited, call
195 remote_close before exiting gdbserver.
196
197 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
198
199 Fix size of FPSCR in Power 7 processors.
200 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
201 (PPC_FEATURE_HAS_DFP): New #define.
202 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
203 size of the FPSCR.
204
205 2009-03-23 Pedro Alves <pedro@codesourcery.com>
206
207 * server.c (handle_query) Whitespace and formatting.
208
209 2009-03-22 Pedro Alves <pedro@codesourcery.com>
210
211 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
212 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
213 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
214 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
215 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
216 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
217 Makefile.in, configure.ac: Fix whitespace throughout.
218 * configure: Regenerate.
219
220 2009-03-22 Pedro Alves <pedro@codesourcery.com>
221
222 * inferiors.c (find_inferior): Make it safe for the callback
223 function to delete the currently iterated inferior.
224
225 2009-03-22 Pedro Alves <pedro@codesourcery.com>
226
227 * Makefile.in (linuw_low_h): Move higher.
228 (thread-db.o): Depend on $(linux_low_h).
229
230 2009-03-17 Pedro Alves <pedro@codesourcery.com>
231
232 Rename "process" to "lwp" throughout.
233
234 * linux-low.c (all_processes): Rename to...
235 (all_lwps): ... this.
236 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
237 (add_process): Rename to ...
238 (add_lwp): ... this. Adjust.
239 (linux_create_inferior): Adjust.
240 (linux_attach_lwp): Adjust.
241 (linux_attach): Adjust.
242 (linux_kill_one_process): Rename to ...
243 (linux_kill_one_lwp): ... this. Adjust.
244 (linux_kill): Adjust.
245 (linux_detach_one_process): Rename to ...
246 (linux_detach_one_lwp): ... this. Adjust.
247 (linux_detach): Adjust.
248 (check_removed_breakpoint): Adjust.
249 (status_pending_p): Adjust.
250 (linux_wait_for_process): Rename to ...
251 (linux_wait_for_lwp): ... this. Adjust.
252 (linux_wait_for_event): Adjust.
253 (send_sigstop): Adjust.
254 (wait_for_sigstop): Adjust.
255 (stop_all_processes): Rename to ...
256 (stop_all_lwps): ... this.
257 (linux_resume_one_process): Rename to ...
258 (linux_resume_one_lwp): ... this. Adjust.
259 (linux_set_resume_request, linux_continue_one_thread)
260 (linux_queue_one_thread, resume_status_pending_p)
261 (usr_store_inferior_registers, regsets_store_inferior_registers)
262 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
263 Adjust.
264 * linux-low.h (get_process): Rename to ...
265 (get_lwp): ... this. Adjust.
266 (get_thread_process): Rename to ...
267 (get_thread_lwp): ... this. Adjust.
268 (get_process_thread): Rename to ...
269 (get_lwp_thread): ... this. Adjust.
270 (struct process_info): Rename to ...
271 (struct lwp_info): ... this.
272 (all_processes): Rename to ...
273 (all_lwps): ... this.
274 * proc-service.c (ps_lgetregs): Adjust.
275 * thread-db.c (thread_db_create_event, find_one_thread)
276 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
277
278 2009-03-14 Pedro Alves <pedro@codesourcery.com>
279
280 * server.c (handle_query): Handle "qAttached".
281
282 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
283
284 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
285 GPLv3, update license URL.
286
287 2009-03-01 Doug Evans <dje@google.com>
288
289 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
290 (server_h): Add gdb_signals.h.
291 (signals.o): Update.
292 * server.h (target_signal_from_host,target_signal_to_host_p)
293 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
294
295 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
296
297 * remote-utils.c (getpkt): Also generate remote-debug
298 information if noack_mode is set.
299
300 2009-02-06 Pedro Alves <pedro@codesourcery.com>
301
302 * server.c (handle_query): Report qXfer:siginfo:read and
303 qXfer:siginfo:write as supported and handle them.
304 * target.h (struct target_ops) <qxfer_siginfo>: New field.
305 * linux-low.c (linux_xfer_siginfo): New.
306 (linux_target_ops): Set it.
307
308 2009-01-26 Pedro Alves <pedro@codesourcery.com>
309
310 * server.c (gdbserver_usage): Mention --remote-debug.
311 (main): Accept '--remote-debug' switch.
312
313 2009-01-18 Doug Evans <dje@google.com>
314
315 * regcache.c (new_register_cache): No need to check result of xcalloc.
316 * server.c (handle_search_memory): Back out calls to xmalloc,
317 result is checked and error is returned to user upon failure.
318 (handle_query): Ditto. Add more checks for result of malloc.
319 (handle_v_cont): Check result of malloc, report error back to
320 user upon failure.
321 (handle_v_run): Ditto. Call freeargv.
322 * server.h (freeargv): Declare.
323 * utils.c (freeargv): New fn.
324
325 2009-01-15 Doug Evans <dje@google.com>
326
327 * gdbreplay.c (perror_with_name): Make arg const char *.
328 * server.h (target_signal_to_name): Make return type const char *.
329 * thread-db.c (thread_db_err_str): Make return type const char *.
330 * utils.c (perror_with_name): Make arg const char *.
331
332 2009-01-14 Pedro Alves <pedro@codesourcery.com>
333
334 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
335 when handling a EXIT_PROCESS_DEBUG_EVENT.
336
337 2009-01-06 Joel Brobecker <brobecker@adacore.com>
338
339 * gdbreplay.c (gdbreplay_version): Update copyright year.
340 * server.c (gdbserver_version): Likewise.
341
342 2009-01-05 Doug Evans <dje@google.com>
343
344 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
345 (handle_extended_wait): Improve comment.
346
347 2008-12-13 Doug Evans <dje@google.com>
348
349 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
350 * server.h (ATTR_MALLOC): New macro.
351 (xmalloc,xcalloc,xstrdup): Declare.
352 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
353 * inferiors.c: Ditto.
354 * linux-low.c: Ditto.
355 * mem-break.c: Ditto.
356 * regcache.c: Ditto.
357 * remote-utils.c: Ditto.
358 * server.c: Ditto.
359 * target.c: Ditto.
360 * win32-low.c: Ditto.
361
362 2008-12-12 Doug Evans <dje@google.com>
363
364 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
365 in debugging printf.
366
367 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
368
369 2008-12-09 Doug Evans <dje@google.com>
370
371 * linux-low.h (struct process_info): Delete member tid, unused.
372 * thread-db.c (find_one_thread): Update.
373 (maybe_attach_thread): Update.
374
375 2008-12-02 Pedro Alves <pedro@codesourcery.com>
376
377 * target.h (struct target_ops): Add qxfer_osdata member.
378 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
379 and dirent.h.
380 (linux_qxfer_osdata): New functions.
381 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
382 callback.
383 * server.c (handle_query): Handle "qXfer:osdata:read:".
384 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
385 (buffer_xml_printf): New functions.
386 * server.h (struct buffer): New.
387 (buffer_grow_str, buffer_grow_str0): New macros.
388 (buffer_grow, buffer_free, buffer_init, buffer_finish)
389 (buffer_xml_printf): Declare.
390
391 2008-11-24 Doug Evans <dje@google.com>
392
393 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
394
395 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
396
397 * server.c (handle_v_run): Always use the supplied argument list.
398
399 2008-11-19 Bob Wilson <bob.wilson@acm.org>
400
401 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
402 (xtensa_regmap_table): Add entry for scompare1.
403
404 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
405
406 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
407 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
408 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
409 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
410 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
411 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
412 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
413 XML target descriptions.
414 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
415 when inferior is running on an ISA 2.05 or later processor. Add
416 special case to return offset for full 64-bit slot of FPSCR when
417 in 32-bits.
418
419 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
420
421 * Makefile.in (SFILES, clean): Added sparc64 files.
422 (reg-sparc64.o, reg-sparc64.c): New.
423 * configure.srv (sparc*-*-linux*): New configuration.
424 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
425 syscall arguments for SPARC.
426 (regsets_store_inferior_registers): Likewise.
427 * linux-sparc-low.c: New file.
428
429 2008-10-21 Doug Evans <dje@google.com>
430
431 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
432 (READLINE_DIR,READLINE_DEP): Delete.
433 (INTERNAL_CFLAGS): Update.
434 (LINTFLAGS): Update.
435
436 2008-10-10 Pedro Alves <pedro@codesourcery.com>
437
438 * server.c (handle_v_run): If GDB didn't specify an argv, use the
439 whole argv from the last run, not just argv[0].
440
441 2008-09-08 Pedro Alves <pedro@codesourcery.com>
442
443 * regcache.c (new_register_cache): Return NULL if the register
444 cache size isn't known yet.
445 (free_register_cache): Avoid dereferencing a NULL regcache.
446
447 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
448
449 * configure.srv: Merge MIPS and MIPS64.
450
451 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
452
453 * Makefile.in (uninstall): Apply $(EXEEXT) too.
454
455 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
456
457 * Makefile.in: Add required vsx dependencies.
458
459 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
460 Declare init_registers_powerpc_vsx32l.
461 Declare init_registers_powerpc_vsx64l.
462 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
463 (ppc_arch_setup): Check for VSX in hwcap.
464 (ppc_fill_vsxregset): New function.
465 (ppc_store_vsxregset): New function.
466 Add new VSX entry in regset_info target_regsets.
467
468 * configure.srv: Add new VSX dependencies.
469
470 2008-08-12 Pedro Alves <pedro@codesourcery.com>
471
472 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
473 (remote_open): Set or clear transport_is_reliable.
474 (putpkt_binary): Don't expect acks in noack mode.
475 (getpkt): Don't send ack/nac in noack mode.
476 * server.c (handle_general_set): Handle QStartNoAckMode.
477 (handle_query): If connected by tcp pass QStartNoAckMode+ in
478 qSupported.
479 (main): Reset noack_mode on every connection.
480 * server.h (noack_mode): Declare.
481
482 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
483
484 * Makefile.in (GDBREPLAY_OBS): New variable.
485 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
486
487 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
488 Daniel Jacobowitz <dan@codesourcery.com>
489
490 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
491 (usr_store_inferior_registers): Likewise.
492 (regsets_store_inferior_registers): Likewise.
493
494 2008-07-31 Rolf Jansen <rj@surtec.com>
495 Pedro Alves <pedro@codesourcery.com>
496
497 * configure.ac: Check for memmem declaration.
498 * server.c [HAVE_MALLOC_H]: Include malloc.h.
499 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
500 (disable_packet_qfThreadInfo): Unconditionally compile.
501 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
502 * configure, config.in: Regenerate.
503
504 2008-07-28 Doug Kwan <dougkwan@google.com>
505
506 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
507 (linux_write_memory): Remove declaration of errno.
508
509 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
510
511 * linux-low.c (handle_extended_wait): Do not use "status"
512 variable uninitialized.
513
514 2008-07-07 Pedro Alves <pedro@codesourcery.com>
515
516 * server.c (handle_v_attach): Inhibit reporting dll changes.
517
518 2008-06-27 Pedro Alves <pedro@codesourcery.com>
519
520 * remote-utils.c (prepare_resume_reply): If requested, don't
521 output "thread:TID" in the T stop reply.
522
523 * server.c (disable_packet_vCont, disable_packet_Tthread)
524 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
525 (handle_query): If requested, disable support for qC, qfThreadInfo
526 and qsThreadInfo.
527 (handle_v_requests): If requested, disable support for vCont.
528 (gdbserver_show_disableable): New.
529 (main): Handle --disable-packet and --disable-packet=LIST.
530
531 * server.h (disable_packet_vCont, disable_packet_Tthread)
532 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
533
534 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
535
536 * server.c (gdbserver_usage): Mention --version.
537
538 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
539
540 * Makefile.in (gdbreplay.o): New rule.
541
542 2008-06-06 Joseph Myers <joseph@codesourcery.com>
543
544 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
545 message, not gdbserver.
546
547 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
548 Nathan Sidwell <nathan@codesourcery.com>
549 Joseph Myers <joseph@codesourcery.com>
550
551 * acinclude.m4: Include ../../config/acx.m4.
552 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
553 * configure, config.in: Regenerate.
554 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
555 * server.c (gdbserver_version): Print PKGVERSION.
556 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
557 (main): Adjust gdbserver_usage calls.
558 * gdbreplay.c (version, host_name): Add declarations.
559 (gdbreplay_version, gdbreplay_usage): New.
560 (main): Accept --version and --help options.
561
562 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
563
564 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
565 (arm_breakpoint_at): Handle Thumb.
566 (the_low_target): Add comment.
567
568 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
569
570 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
571
572 2008-05-09 Doug Evans <dje@google.com>
573
574 * server.h (decode_search_memory_packet): Declare.
575 * remote-utils.c (decode_search_memory_packet): New fn.
576 * server.c (handle_search_memory_1): New fn.
577 (handle_search_memory): New fn.
578 (handle_query): Process qSearch:memory packets.
579
580 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
581
582 * regcache.c (registers_length): Remove.
583 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
584 full register packet.
585 * regcache.h (registers_length): Remove prototype.
586 * server.h (PBUFSIZ): Define to 16384.
587
588 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
589
590 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
591 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
592 powerpc-64l.o, and powerpc-altivec64l.o.
593 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
594 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
595 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
596 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
597 rs6000/power-linux.xml, and rs6000/power64-linux.xml
598 to srv_xmlfiles.
599
600 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
601 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
602 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
603 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
604 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
605 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
606 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
607 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
608 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
609 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
610 (clean): Update.
611
612 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
613 (init_registers_powerpc_32l): ... this new prototype.
614 (init_registers_powerpc_32): Remove, replace by ...
615 (init_registers_powerpc_altivec32l): ... this new prototype.
616 (init_registers_powerpc_e500): Remove, replace by ...
617 (init_registers_powerpc_e500l): ... this new prototype.
618 (init_registers_ppc64): Remove, replace by ...
619 (init_registers_powerpc_64l): ... this new prototype.
620 (init_registers_powerpc_64): Remove, replace by ...
621 (init_registers_powerpc_altivec64l): ... this new prototype.
622 (ppc_num_regs): Set to 73.
623 (PT_ORIG_R3, PT_TRAP): Define if necessary.
624 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
625 (ppc_cannot_store_register): Handle orig_r3 and trap.
626 (ppc_arch_setup): Update init_registers_... calls.
627 (ppc_fill_gregset): Handle orig_r3 and trap.
628
629 * inferiors.c (clear_inferiors): Reset current_inferior.
630
631 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
632
633 * acinclude.m4: Add override.m4.
634 * configure: Regenerate.
635
636 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
637
638 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
639 initial call to init_register_ppc64.
640
641 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
642
643 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
644 powerpc*-*-linux* case.
645 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
646
647 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
648
649 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
650 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
651 from reg_xmlfiles.
652 * linux-ppc-low.c: Include <elf.h>.
653 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
654 (ppc_hwcap): New global variable.
655 (ppc_regmap): Remove __SPE__ #ifdef sections.
656 (ppc_regmap_e500): New global variable.
657 (ppc_cannot_store_register): Update __SPE__ special case.
658 (ppc_get_hwcap): New function.
659 (ppc_arch_setup): Use it to determine whether inferior supports
660 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
661 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
662 Do not access registers if target does not support AltiVec.
663 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
664 Do not access registers if target does not support SPE.
665 (target_regsets): Unconditionally include AltiVec and SPE regsets.
666
667 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
668
669 * linux-low.c (disabled_regsets, num_regsets): New.
670 (use_regsets_p): Delete.
671 (linux_wait_for_process): Clear disabled_regsets.
672 (regsets_fetch_inferior_registers): Check and set it.
673 (regsets_store_inferior_registers): Likewise.
674 (linux_fetch_registers, linux_store_registers): Do not use
675 use_regsets_p.
676 (initialize_low): Allocate disabled_regsets.
677
678 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
679
680 * Makefile.in (LIBOBJS): New.
681 (OBS): Use LIBOBJS.
682 (memmem.o): New rule.
683 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
684 * configure: Regenerated.
685
686 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
687
688 * server.c (handle_query): Never return "unsupported" for
689 qXfer:features:read queries.
690
691 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
692
693 * server.c (get_features_xml): Fix inverted condition.
694 (handle_query): Always support qXfer:feature:read.
695
696 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
697
698 * server.c (wrapper_argv): New.
699 (start_inferior): Handle wrapper_argv. If set, expect an extra
700 trap.
701 (gdbserver_usage): Document --wrapper.
702 (main): Parse --wrapper.
703
704 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
705
706 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
707 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
708 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
709 (ppc_set_pc): Likewise.
710 (ppc_arch_setup): New function.
711 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
712 of collect_register.
713 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
714
715 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
716
717 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
718 instead of linux-ppc64-low.o.
719 * linux-ppc64-low.c: Remove file.
720 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
721 (linux-ppc64-low.o): Remove rule.
722
723 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
724 (init_registers_powerpc_64): Likewise.
725 (ppc_regmap): Conditionally define depending on __powerpc64__.
726 (ppc_cannot_store_register): Do not special-case "fpscr" when
727 compiled on __powerpc64__.
728 (ppc_collect_ptrace_register): New function.
729 (ppc_supply_ptrace_register): New function.
730 (ppc_breakpoint): Change type to "unsigned int".
731 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
732 (the_low_target): Conditionally provide initializers for the
733 arch_setup member depending on __powerpc64__. Install
734 collect_ptrace_register and supply_ptrace_register members.
735
736 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
737
738 * regcache.h (gdbserver_xmltarget): Add extern declaration.
739 * server.c (gdbserver_xmltarget): Define.
740 (get_features_xml): Use it to replace "target.xml" and arch_string.
741
742 * configure.srv: Remove srv_xmltarget. Add XML files that were
743 mentioned there to srv_xmlfiles instead. Remove conditional tests
744 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
745 srv_xmlfiles and srv_regobj to include all possible choices.
746 * configure.ac (srv_xmltarget): Remove.
747 (srv_xmlfiles): Do not add "target.xml".
748 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
749 checks for supplementary target information.
750 * configure: Regenerate.
751 * Makefile.in (XML_TARGET): Remove.
752 (target.xml): Remove rule.
753 (clean): Do not clean up target.xml.
754 (.PRECIOUS): Do not mention target.xml.
755
756 * target.h (struct target_ops): Remove arch_string member.
757 * linux-low.c (linux_arch_string): Remove.
758 (linux_target_ops): Remove arch_string initializer.
759 * linux-low.h (struct linux_target_ops): Remove arch_string member.
760 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
761 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
762 * spu-low.c (spu_arch_string): Remove.
763 (spu_target_ops): Remove arch_string initializer.
764 * win32-low.c (win32_arch_string): Remove.
765 (win32_target_ops): Remove arch_string initializer.
766 * win32-low.h (struct win32_target_ops): Remove arch_string member.
767 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
768 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
769
770 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
771
772 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
773 by collect_ptrace_register and supply_ptrace_register hooks.
774 * linux-low.c (fetch_register): Use supply_ptrace_register callback
775 instead of checking for the_low_target.left_pad_xfer.
776 (usr_store_inferior_registers): Use collect_ptrace_register callback
777 instead of checking for the_low_target.left_pad_xfer.
778
779 * linux-s390-low.c (s390_collect_ptrace_register): New function.
780 (s390_supply_ptrace_register): Likewise.
781 (s390_fill_gregset): Call s390_collect_ptrace_register.
782 (the_low_target): Update.
783
784 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
785 (ppc_supply_ptrace_register): Likewise.
786 (the_low_target): Update.
787
788 * linux-i386-low.c (the_low_target): Update.
789 * linux-x86-64-low.c (the_low_target): Update.
790
791 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
792
793 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
794 reg-s390.o and reg-s390x.o.
795
796 * linux-low.c (new_inferior): New global variable.
797 (linux_create_inferior, linux_attach): Set it.
798 (linux_wait_for_process): Call the_low_target.arch_setup after the
799 target has stopped for the first time.
800 (initialize_low): Do not call the_low_target.arch_setup.
801
802 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
803 (s390_set_pc): Likewise.
804 (s390_arch_setup): New function.
805 (the_low_target): Use s390_arch_setup as arch_setup routine.
806
807 * regcache.c (realloc_register_cache): New function.
808 (set_register_cache): Call it for each existing regcache.
809
810 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
811
812 * server.h (init_registers): Remove prototype.
813
814 * linux-low.h (struct linux_target_ops): Add arch_setup field.
815 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
816 instead of init_registers ().
817 * linux-arm-low.c (init_registers_arm): Add prototype.
818 (init_registers_arm_with_iwmmxt): Likewise.
819 (the_low_target): Add initializer for arch_setup field.
820 * linux-cris-low.c (init_registers_cris): Add prototype.
821 (the_low_target): Add initializer for arch_setup field.
822 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
823 (the_low_target): Add initializer for arch_setup field.
824 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
825 (the_low_target): Add initializer for arch_setup field.
826 * linux-ia64-low.c (init_registers_ia64): Add prototype.
827 (the_low_target): Add initializer for arch_setup field.
828 * linux-m32r-low.c (init_registers_m32r): Add prototype.
829 (the_low_target): Add initializer for arch_setup field.
830 * linux-m68k-low.c (init_registers_m68k): Add prototype.
831 (the_low_target): Add initializer for arch_setup field.
832 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
833 (init_registers_mips64_linux): Likewise.
834 (the_low_target): Add initializer for arch_setup field.
835 * linux-ppc-low.c (init_registers_ppc): Add prototype.
836 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
837 (the_low_target): Add initializer for arch_setup field.
838 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
839 (init_registers_powerpc_64): Likewise.
840 (the_low_target): Add initializer for arch_setup field.
841 * linux-s390-low.c (init_registers_s390): Add prototype.
842 (init_registers_s390x): Likewise.
843 (the_low_target): Add initializer for arch_setup field.
844 * linux-sh-low.c (init_registers_sh): Add prototype.
845 (the_low_target): Add initializer for arch_setup field.
846 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
847 (the_low_target): Add initializer for arch_setup field.
848 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
849 (the_low_target): Add initializer for arch_setup field.
850
851 * win32-low.h (struct win32_target_ops): Add arch_setup field.
852 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
853 instead of init_registers ().
854 * win32-arm-low.c (init_registers_arm): Add prototype.
855 (the_low_target): Add initializer for arch_setup field.
856 * win32-i386-low.c (init_registers_i386): Add prototype.
857 (the_low_target): Add initializer for arch_setup field.
858
859 * spu-low.c (init_registers_spu): Add prototype.
860 (initialize_low): Call initialie_registers_spu () instead of
861 initialize_registers ().
862
863 2008-02-19 Pedro Alves <pedro@codesourcery.com>
864
865 * server.c (handle_v_requests): When handling the vRun and vAttach
866 packets, if already debugging a process, don't kill it. Return an
867 error instead.
868
869 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
870
871 * server.c (handle_query): Correct length check.
872
873 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
874
875 * win32-low.c (do_initial_child_stuff): Add process handle
876 parameter. Set current_process_handle and current_process_id from the
877 parameters. Clear globals.
878 (win32_create_inferior): Don't set current_process_handle and
879 current_process_id here. Instead pass them on the call to
880 do_initial_child_stuff.
881 (win32_attach): Likewise.
882 (win32_clear_inferiors): New.
883 (win32_kill): Don't close the current process handle or the
884 current thread handle here. Instead call win32_clear_inferiors.
885 (win32_detach): Don't open a new handle to the process. Call
886 win32_clear_inferiors.
887 (win32_join): Don't rely on current_process_handle; open a new
888 handle using the process id.
889 (win32_wait): Call win32_clear_inferiors when the inferior process
890 has exited.
891
892 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
893
894 * server.c (monitor_show_help): Add "exit".
895
896 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
897
898 * Makefile.in (SFILES): Add linux-xtensa-low.c.
899 (clean): Add reg-xtensa.c.
900 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
901 * configure.srv (xtensa*-*-linux*) New target.
902 * linux-xtensa-low.c: New.
903 * xtensa-xtregs.c: New.
904
905 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
906
907 * hostio.c: Don't include errno.h.
908 (errno_to_fileio_errno): Move to hostio-errno.
909 * hostio.c: (hostio_error): Remove the error parameter. Defer the
910 error number outputting to the target->hostio_last_error callback.
911 (hostio_packet_error): Use FILEIO_EINVAL directly.
912 (handle_open, handle_pread, hostio_error, handle_unlink): Update
913 calls to hostio_error.
914 * hostio-errno.c: New.
915 * server.h (hostio_last_error_from_errno): Declare.
916 * target.h (target_ops): Add hostio_last_error member.
917 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
918 as hostio_last_error handler.
919 * spu-low.c (spu_target_ops): Likewise.
920 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
921 (wince_hostio_last_error): New functions.
922 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
923 as hostio_last_error handler.
924 (win32_target_ops) [!_WIN32_WCE]: Register
925 hostio_last_error_from_errno as hostio_last_error handler.
926 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
927 (hostio-errno.o): New rule.
928 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
929 * configure.srv (srv_hostio_err_objs): New variable. Default to
930 hostio-errno.o.
931 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
932 * configure: Regenerate.
933
934 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
935
936 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
937 (linux_kill, linux_detach): Clean up the process list.
938 * remote-utils.c (remote_open): Improve port number parsing.
939 (putpkt_binary, input_interrupt): Only send interrupts if the target
940 is running.
941 * server.c (extended_protocol): Make static.
942 (attached): Define earlier.
943 (exit_requested, response_needed, program_argv): New variables.
944 (target_running): New.
945 (start_inferior): Clear attached here.
946 (attach_inferior): Set attached here.
947 (require_running): Define.
948 (handle_query): Use require_running and target_running. Implement
949 "monitor exit".
950 (handle_v_attach, handle_v_run): New.
951 (handle_v_requests): Use require_running. Handle vAttach and vRun.
952 (gdbserver_usage): Update.
953 (main): Redo argument parsing. Handle --debug and --multi. Handle
954 --attach along with other options or after the port. Save
955 program_argv. Support no initial program. Resynchronize
956 communication with GDB after an error. Handle "monitor exit".
957 Use require_running and target_running. Always allow the extended
958 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
959 restart in extended mode.
960 * README: Refer to the GDB manual. Update --attach usage.
961
962 2007-12-20 Andreas Schwab <schwab@suse.de>
963
964 * linux-low.c (STACK_SIZE): Define.
965 (linux_tracefork_child): Use it. Use __clone2 on ia64.
966 (linux_test_for_tracefork): Likewise.
967
968 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
969
970 * linux-low.c (linux_wait_for_event): Update messages. Do not
971 reinsert auto-delete breakpoints.
972 * mem-break.c (struct breakpoint): Change return type of handler to
973 int.
974 (set_breakpoint_at): Update handler type.
975 (reinsert_breakpoint_handler): Return 1 instead of calling
976 delete_breakpoint.
977 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
978 setting a new one.
979 (check_breakpoints): Delete auto-delete breakpoints and return 2.
980 * mem-break.h (set_breakpoint_at): Update handler type.
981 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
982 * win32-low.c (auto_delete_breakpoint): New.
983 (get_child_debug_event): Use it.
984
985 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
986
987 * configure.ac: Check for pread and pwrite.
988 * hostio.c (handle_pread): Fall back to lseek and read.
989 (handle_pwrite): Fall back to lseek and write.
990 * config.in, configure: Regenerated.
991
992 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
993
994 * server.c (myresume): Add own_buf argument.
995 (main): Update calls.
996
997 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
998
999 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1000 * remote-utils.c (remote_open): Do not call disable_async_io.
1001 (block_async_io): Delete.
1002 (unblock_async_io): Make static.
1003 (initialize_async_io): New.
1004 * server.c (handle_v_cont): Handle async I/O here.
1005 (myresume): Likewise. Move other common resume tasks here...
1006 (main): ... from here. Call initialize_async_io. Disable async
1007 I/O before the main loop.
1008 * server.h (initialize_async_io): Declare.
1009 (block_async_io, unblock_async_io): Delete prototypes.
1010 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1011
1012 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1013
1014 * remote-utils.c (readchar): Allow binary data in received messages.
1015
1016 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1017
1018 * win32-low.c (attaching): New global.
1019 (win32_create_inferior): Clear the `attaching' global.
1020 (win32_attach): Set the `attaching' global.
1021 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1022 attaching. Only set a breakpoint at the entry point if not
1023 attaching.
1024
1025 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1026
1027 * server.c (main): Don't report dll events on the initial
1028 connection on attaches.
1029
1030 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1031
1032 * server.c (main): Relax numerical bases supported for the pid of
1033 the --attach command line argument.
1034
1035 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1036
1037 * win32-low.c (win32_attach): Call OpenProcess before
1038 DebugActiveProcess, not after. Add last error output to error
1039 call.
1040
1041 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1042
1043 * win32-low.c (win32_get_thread_context)
1044 (win32_set_thread_context): New functions.
1045 (thread_rec): Use win32_get_thread_context.
1046 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1047 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1048 field.
1049
1050 2007-12-03 Leo Zayas
1051 Pedro Alves <pedro_alves@portugalmail.pt>
1052
1053 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1054 global variables.
1055 (child_add_thread): Minor cleanup.
1056 (child_continue): Resume artificially suspended threads before
1057 calling ContinueDebugEvent.
1058 (suspend_one_thread): New.
1059 (fake_breakpoint_event): New.
1060 (get_child_debug_event): Change return type to int. Check here if
1061 gdb sent an interrupt request. If a soft interrupt was requested,
1062 fake a breakpoint event. Return 0 if there is no event to handle,
1063 and 1 otherwise.
1064 (win32_wait): Don't check here if gdb sent an interrupt request.
1065 Ensure there is a valid event to handle.
1066 (win32_request_interrupt): Add soft interruption method as last
1067 resort.
1068
1069 2007-12-03 Leo Zayas
1070 Pedro Alves <pedro_alves@portugalmail.pt>
1071
1072 * win32-low.h (win32_thread_info): Add descriptions to the
1073 structure members. Replace `suspend_count' counter by a
1074 `suspended' flag.
1075 * win32-low.c (thread_rec): Update condition of when to get the
1076 context from the inferior. Rely on ContextFlags being set if it
1077 has already been retrieved. Only suspend the inferior thread if
1078 we haven't already. Warn if that fails.
1079 (continue_one_thread): s/suspend_count/suspended/. Only call
1080 ResumeThread once. Warn if that fails.
1081
1082 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1083
1084 * win32-low.c (win32_wait): Don't read from the inferior when it
1085 has already exited.
1086
1087 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1088
1089 * Makefile.in (win32_low_h): New variable.
1090 (win32-low.o): Add dependency on $(win32_low_h).
1091 (win32-arm-low.o, win32-i386-low.o): New rules.
1092
1093 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1094
1095 * hostio.c: Correct copyright year.
1096
1097 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1098
1099 * Makefile.in (OBS): Add hostio.o.
1100 (hostio.o): New rule.
1101 * server.h (handle_vFile): Declare.
1102 * hostio.c: New file.
1103 * server.c (handle_v_requests): Take packet_len and new_packet_len
1104 for binary packets. Call handle_vFile.
1105 (main): Update call to handle_v_requests.
1106
1107 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1108
1109 * linux-low.c: Include <sched.h>.
1110
1111 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1112
1113 * linux-low.c (linux_tracefork_grandchild): New.
1114 (linux_tracefork_child): Use clone.
1115 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1116
1117 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1118
1119 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1120
1121 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1122
1123 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1124
1125 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1126
1127 * inferiors.c (change_inferior_id): Delete.
1128 (add_pid_to_list, pull_pid_from_list): New.
1129 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1130 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1131 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1132 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1133 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1134 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1135 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1136 (using_threads): Always set to 1.
1137 (handle_extended_wait): New.
1138 (add_process): Do not set TID.
1139 (linux_create_inferior): Set must_set_ptrace_flags.
1140 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1141 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1142 (linux_thread_alive): Rename TID argument to LWPID.
1143 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1144 (linux_wait_for_event): Do not use TID or check using_threads. Update
1145 call to dead_thread_notify. Call handle_extended_wait.
1146 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1147 (send_sigstop): Delete sigstop_sent.
1148 (wait_for_sigstop): Avoid TID.
1149 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1150 (linux_test_for_tracefork): New.
1151 (linux_lookup_signals): Use thread_db_active and
1152 linux_supports_tracefork_flag.
1153 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1154 * linux-low.h (get_process_thread): Avoid TID.
1155 (struct process_ifo): Move thread_known and tid to the end. Remove
1156 sigstop_sent.
1157 (linux_attach_lwp, thread_db_init): Update prototypes.
1158 * server.h (change_inferior_id): Delete prototype.
1159 (add_pid_to_list, pull_pid_from_list): New prototypes.
1160 * thread-db.c (thread_db_use_events): New.
1161 (find_first_thread): Rename to...
1162 (find_one_thread): ...this. Update callers and messages. Do not
1163 call fatal. Check thread_db_use_events. Do not call
1164 change_inferior_id or new_thread_notify.
1165 (maybe_attach_thread): Update. Do not call new_thread_notify.
1166 (thread_db_init): Set thread_db_use_events. Check use_events.
1167 * utils.c (fatal, warning): Correct message prefix.
1168
1169 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1170
1171 * Makefile.in (clean): Remove new files.
1172 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1173 (powerpc-64.o, powerpc-64.c): New rules.
1174 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1175 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1176 with SPE.
1177 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1178 SPE targets.
1179 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1180 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1181 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1182 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1183 (target_regsets): Add AltiVec and SPE register sets.
1184 * configure.ac: Check for AltiVec and SPE.
1185 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1186 (ppc_fill_vrregset, ppc_store_vrregset): New.
1187 (target_regsets): Add AltiVec register set.
1188 * configure: Regenerated.
1189
1190 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1191
1192 * linux-low.c (O_LARGEFILE): Define.
1193 (linux_read_memory): Use /proc/PID/mem.
1194 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1195 * configure, config.in: Regenerated.
1196
1197 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1198
1199 * linux-low.c (linux_wait_for_event): Do not pass signals while
1200 single-stepping.
1201
1202 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1203
1204 * win32-low.c (create_process): New.
1205 (win32_create_inferior): Use create_process instead of
1206 CreateProcess. If create_process failed retry appending an ".exe"
1207 suffix. Store the GetLastError result immediatelly after
1208 create_process calls and use it on the call to error.
1209
1210 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1211
1212 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1213
1214 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1215
1216 * configure.ac: Switch license to GPLv3.
1217
1218 2007-08-01 Michael Snyder <msnyder@access-company.com>
1219
1220 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1221
1222 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1223
1224 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1225 typedef.
1226 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1227 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1228 CloseToolhelp32Snapshot.
1229 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1230 CloseToolhelp32Snapshot.
1231
1232 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1233
1234 * server.c (main): Check for inferior exit before main loop.
1235
1236 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1237
1238 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1239 instead of on tmp_desc.
1240
1241 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1242 Daniel Jacobowitz <dan@codesourcery.com>
1243
1244 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1245 (add_thread): Minor cleanups.
1246 (clear_inferiors): Move lower in the file. Clear the DLL
1247 list.
1248 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1249 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1250 (xml_escape_text): New.
1251 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1252 for qSupported.
1253 (handle_v_cont): Report errors.
1254 (gdbserver_version): Update.
1255 (main): Correct size of own_buf. Do not report initial DLL events.
1256 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1257 (unloaded_dll, xml_escape_text): New.
1258 * win32-low.c (enum target_waitkind): Update comments.
1259 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1260 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1261 (win32_EnumProcessModules, win32_GetModuleInformation)
1262 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1263 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1264 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1265 (win32_Module32First, win32_Module32Next, load_toolhelp)
1266 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1267 (get_child_debug_event): Handle DLL events.
1268 (win32_wait): Likewise.
1269
1270 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1271
1272 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1273 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1274
1275 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1276
1277 * win32-low.c (handle_output_debug_string): Ignore event if not
1278 waiting.
1279
1280 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1281
1282 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1283
1284 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1285
1286 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1287
1288 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1289
1290 * inferiors.c (change_inferior_id): Add comment.
1291 * linux-low.c (check_removed_breakpoint): Add an early
1292 prototype. Improve debug output.
1293 (linux_attach): Doc update.
1294 (linux_detach_one_process, linux_detach): Clean up before releasing
1295 each process.
1296 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1297 * linux-low.h (struct process_info): Doc improvement.
1298 * mem-break.c (delete_all_breakpoints): New.
1299 * mem-break.h (delete_all_breakpoints): New prototype.
1300 * thread-db.c (find_first_thread): New.
1301 (thread_db_create_event): Call it instead of
1302 thread_db_find_new_threads. Clean up unused variables.
1303 (maybe_attach_thread): Remove first thread handling.
1304 (thread_db_find_new_threads): Use find_first_thread.
1305 (thread_db_get_tls_address): Likewise.
1306
1307 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1308
1309 * thread-db.c (thread_db_find_new_threads): Add prototype.
1310 (thread_db_create_event): Check for the main thread before adding
1311 a new thread.
1312 (maybe_attach_thread): Only enable event reporting if TID == 0.
1313 (thread_db_get_tls_address): Check for new threads.
1314
1315 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1316
1317 * linux-low.c (linux_create_inferior): Try execv before execvp.
1318 * spu-low.c (spu_create_inferior): Likewise.
1319
1320 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1321
1322 * linux-low.c (linux_create_inferior): Change execv to execvp.
1323 * spu-low.c (spu_create_inferior): Likewies.
1324
1325 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1326
1327 * Makefile.in (clean): Clean new files instead of deleted ones.
1328 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1329 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1330 rules.
1331 * configure.srv: Specify XML files and new regformats for MIPS and
1332 MIPS64 GNU/Linux.
1333 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1334 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1335 an entry for the restart register.
1336 (mips_cannot_fetch_register, mips_cannot_store_register)
1337 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1338 register names to match the XML descriptions.
1339 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1340 restart register instead of $0.
1341
1342 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1343 Markus Deuling <deuling@de.ibm.com>
1344
1345 * remote-utils.c (decode_xfer_write): New function.
1346 * server.h (decode_xfer_write): Add prototype.
1347 * server.c (handle_query): Add PACKET_LEN argument. Support
1348 qXfer:spu:read and qXfer:spu:write packets.
1349 (main): Pass packet_len to handle_query.
1350 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1351 * target.h (target_ops): Add qxfer_spu.
1352
1353 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1354
1355 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1356 accessing non-seekable spufs files.
1357
1358 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1359
1360 * server.c (handle_query): Add reply for qC packet.
1361
1362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1363 Leo Zayas <lerele@champenstudios@com>
1364
1365 * server.h (check_remote_input_interrupt_request): New function.
1366 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1367 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1368 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1369 (check_remote_input_interrupt_request): New function.
1370 * server.h (check_remote_input_interrupt_request): Declare.
1371 * win32-low.c (winapi_DebugBreakProcess,
1372 winapi_GenerateConsoleCtrlEvent): New typedefs.
1373 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1374 to 250 ms.
1375 (win32_wait): Check for remote interrupt request
1376 with check_remote_input_interrupt_request.
1377 (win32_request_interrupt): New function.
1378 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1379
1380 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1381
1382 * win32-low.c (debug_registers_changed,
1383 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1384 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1385 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1386 (thread_rec): Get context using the low target.
1387 (child_add_thread): Call thread_added on the low target,
1388 which does the same thing.
1389 (regptr): Delete.
1390 (do_initial_child_stuff): Remove debug registers references.
1391 Set context using the low target. Resume threads after
1392 setting the contexts.
1393 (child_continue): Remove dead variable. Remove debug
1394 registers references.
1395 (child_fetch_inferior_registers): Go through the low target.
1396 (do_child_store_inferior_registers): Remove.
1397 (child_store_inferior_registers): Go through the low target.
1398 (win32_resume): Remove debug registers references.
1399 Set context using the low target.
1400 (handle_exception): Change return type to void. Don't record
1401 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1402 first chance exception.
1403 (get_child_debug_event): Change return type to void. Remove
1404 goto loop. Always return after waiting for debug event.
1405 (win32_wait): Convert to switch statement. Handle spurious
1406 events.
1407
1408 * win32-i386-low.c (debug_registers_changed,
1409 debug_registers_used): New.
1410 (initial_stuff): Rename to ...
1411 (i386_initial_stuff): ... this. Clear debug registers
1412 state variables.
1413 (store_debug_registers): Delete.
1414 (i386_get_thread_context): New.
1415 (load_debug_registers): Delete.
1416 (i386_set_thread_context): New.
1417 (i386_thread_added): New.
1418 (single_step): Rename to ...
1419 (i386_single_step): ... this.
1420 (do_fetch_inferior_registers): Rename to ...
1421 (i386_fetch_inferior_register): ... this.
1422 (i386_store_inferior_register): New.
1423 (the_low_target): Adapt to new interface.
1424
1425 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1426 (arm_get_thread_context): New.
1427 (arm_set_thread_context): New.
1428 (regptr): New.
1429 (do_fetch_inferior_registers): Rename to ...
1430 (arm_fetch_inferior_register): ... this.
1431 (arm_store_inferior_register): New.
1432 (arm_wince_breakpoint): Reimplement as unsigned long.
1433 (arm_wince_breakpoint_len): Define.
1434 (the_low_target): Adapt to new interface.
1435
1436 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1437 load_debug_registers. Add get_thread_context, set_thread_context,
1438 thread_added and store_inferior_register. Rename
1439 fetch_inferior_registers to fetch_inferior_register.
1440 (regptr): Remove declaration.
1441
1442 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1443
1444 * linux-low.c (linux_detach): Change return type to int. Return 0.
1445 * spu-low.c (spu_detach): Likewise.
1446
1447 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1448
1449 * target.h (target_ops): Change return type of detach to int.
1450 Add join.
1451 (join_inferior): New.
1452 * server.c (main): Don't skip detach support on mingw32.
1453 If the inferior doesn't support detaching return error.
1454 Call join_inferior instead of using waitpid.
1455 * linux-low.c (linux_join): New.
1456 (linux_target_op): Add linux_join.
1457 * spu-low.c (spu_join): New.
1458 (spu_target_ops): Add spu_join.
1459 * win32-low.c (win32_detach): Adapt to new interface.
1460 Reopen current_process_handle before detaching. Issue a child
1461 resume before detaching.
1462 (win32_join): New.
1463 (win32_target_op): Add win32_join.
1464
1465 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1466
1467 * win32-low.c (win32-attach): Fix return value.
1468 * target.h (target_ops): Describe ATTACH return values.
1469
1470 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1471
1472 * win32-low.c (GETPROCADDRESS): Define.
1473 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1474 (winapi_DebugSetProcessKillOnExit): Likewise.
1475 (win32_create_inferior): Force usage of ansi CreateProcessA.
1476 (win32_attach): Use GETPROCADDRESS.
1477 (win32_detach): Likewise.
1478
1479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1480
1481 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1482
1483 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1484
1485 * win32-low.c: Commit leftover changes from 2007-03-29.
1486
1487 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1488
1489 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1490 fields short instead of int. Add explicit padding.
1491 (i387_cache_to_fsave): Remove unnecessary casts.
1492 (i387_fsave_to_cache): Doc fix.
1493 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1494
1495 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1496
1497 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1498 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1499
1500 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1501
1502 * configure.srv (arm*-*-mingw32ce*): Move near the other
1503 arm targets.
1504
1505 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1506
1507 * configure.ac: Add errno checking.
1508 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1509 sys/file.h and malloc.h.
1510 (AC_CHECK_DECLS): Add perror.
1511 (srv_mingwce): Handle.
1512 * configure.srv (i[34567]86-*-cygwin*): Add
1513 win32-i386-low.o to srv_tgtobj.
1514 (i[34567]86-*-mingw*): Likewise.
1515 (arm*-*-mingw32ce*): Add case.
1516 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1517 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1518 [__MINGW32CE__] (strerror): New function.
1519 [__MINGW32CE__] (errno): Define to GetLastError.
1520 [__MINGW32CE__] (COUNTOF): New macro.
1521 (remote_open): Remove extra close call.
1522 * mem-break.c (delete_breakpoint_at): New function.
1523 * mem-break.h (delete_breakpoint_at): Declare.
1524 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1525 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1526 [USE_WIN32API] (read, write): Add char* casts.
1527 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1528 * server.h: Include wincecompat.h on Windows CE.
1529 [HAVE_ERRNO_H]: Check.
1530 (perror): Declare if not declared.
1531 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1532 (perror_with_name): Remove errno declaration.
1533 * wincecompat.h: New.
1534 * wincecompat.c: New.
1535 * win32-low.h: New.
1536 * win32-arm-low.c: New.
1537 * win32-i386-low.c: New.
1538 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1539 (OUTMSG2): Make it safe.
1540 (_T): New macro.
1541 (COUNTOF): New macro.
1542 (NUM_REGS): Get it from the low target.
1543 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1544 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1545 (thread_rec): Let low target handle debug registers.
1546 (child_add_thread): Likewise.
1547 (child_init_thread_list): Likewise.
1548 (continue_one_thread): Likewise.
1549 (regptr): New.
1550 (do_child_fetch_inferior_registers): Move to ...
1551 * win32-i386-low.c: ... here, and rename to ...
1552 (do_fetch_inferior_registers): ... this.
1553 * win32-low.c (child_fetch_inferior_registers):
1554 Go through the low target.
1555 (do_child_store_inferior_registers): Use regptr.
1556 (strwinerror): New function.
1557 (win32_create_inferior): Handle Windows CE.
1558 Use strwinerror instead of strerror on Windows error
1559 codes. Add program to the error output.
1560 Don't close the main thread handle on Windows CE.
1561 (win32_attach): Use coredll.dll on Windows CE.
1562 (win32_kill): Close current process and current
1563 thread handles.
1564 (win32_detach): Use coredll.dll on Windows CE.
1565 (win32_resume): Let low target handle debug registers, and
1566 step request.
1567 (handle_exception): Add/Remove initial breakpoint. Avoid
1568 non-existant WSTOPSIG on Windows CE.
1569 (win32_read_inferior_memory): Cast to remove warning.
1570 (win32_arch_string): Go through the low target.
1571 (initialize_low): Call set_breakpoint_data with the low
1572 target's breakpoint.
1573 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1574 FOP_REGNUM, mappings): Move to ...
1575 * win32-i386-low.c: ... here.
1576 * win32-low.c (win32_thread_info): Move to ...
1577 * win32-low.h: ... here.
1578 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1579 win32-arm-low.c and wincecompat.c.
1580 (all:): Add $EXEEXT.
1581 (install-only:): Likewise.
1582 (gdbserver:): Likewise.
1583 (gdbreplay:): Likewise.
1584 * config.in: Regenerate.
1585 * configure: Regenerate.
1586
1587 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1588
1589 * win32-low.c: Rename typedef thread_info to
1590 win32_thread_info throughout.
1591
1592 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1593
1594 * win32-i386-low.c: Rename to ...
1595 * win32-low.c: ... this.
1596 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1597 * Makefile.in: Likewise.
1598
1599 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1600
1601 * remote-utils.c (monitor_output): Constify msg parameter.
1602 * server.h (monitor_output): Likewise.
1603 * win32-i386-low.c (handle_output_debug_string): New.
1604 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1605 handle_output_debug_string.
1606 (get_child_debug_event): Likewise.
1607
1608 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1609
1610 * server.c (main): Correct strtoul check.
1611
1612 2007-03-27 Jon Ringle <jon@ringle.org>
1613
1614 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1615
1616 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1617
1618 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1619
1620 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1621
1622 * terminal.h: Check HAVE_SGTTY_H.
1623
1624 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1625
1626 * remote-utils.c (remote_open): Print out the assigned port number.
1627
1628 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1629
1630 * remote-utils.c (monitor_output): New function.
1631 * server.c (debug_threads): Define here.
1632 (monitor_show_help): New function.
1633 (handle_query): Handle qRcmd.
1634 (main): Do not handle 'd' packet.
1635 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1636 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1637 of debug_threads.
1638
1639 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1640
1641 * Makefile.in (EXEEXT): New.
1642 (clean): Use $(EXEEXT).
1643
1644 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1645
1646 * target.h (target_ops): Rename send_signal to request_interrupt,
1647 and remove enum target_signal parameter.
1648 * linux-low.c (linux_request_interrupt): Rename from
1649 linux_send_signal, and always send SIGINT.
1650 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1651 and always send SIGINT.
1652 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1653 of send_signal.
1654 (input_interrupt): Likewise.
1655
1656 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1657
1658 * server.c (get_features_xml): Check if target implemented
1659 arch_string.
1660 * win32-i386-low.c (win32_arch_string): New.
1661 (win32_target_ops): Add win32_arch_string as arch_string member.
1662
1663 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1664
1665 * spu-low.c (spu_arch_string): New.
1666 (spu_target_ops): Add spu_arch_string.
1667
1668 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1669
1670 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1671 * configure.ac: Do not check for terminal.h.
1672 * configure, config.in: Regenerated.
1673
1674 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1675
1676 * Makefile.in (OBS): Add $(XML_BUILTIN).
1677 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1678 (clean): Update.
1679 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1680 (arm-with-iwmmxt.c): New.
1681 * config.in, configure: Regenerate.
1682 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1683 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1684 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1685 (arm*-*-linux*): Add iWMMXt and regset support.
1686 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1687 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1688 (arm_store_wmmxregset, target_regsets): New.
1689 * server.c (get_features_xml): Take annex argument. Check builtin
1690 XML documents.
1691 (handle_query): Handle multiple annexes.
1692
1693 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1694
1695 * remote-utils.c [USE_WIN32API] (read, write): Define.
1696 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1697 write.
1698
1699 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1700
1701 * linux-i386-low.c (the_low_target): Set arch_string.
1702 * linux-x86-64-low.c (the_low_target): Likewise.
1703 * linux-low.c (linux_arch_string): New.
1704 (linux_target_ops): Add it.
1705 * linux-low.h (struct linux_target_ops): Add arch_string.
1706 * server.c (write_qxfer_response): Use const void * for DATA.
1707 (get_features_xml): New.
1708 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1709 * target.h (struct target_ops): Add arch_string method.
1710
1711 2007-01-03 Denis Pilat <denis.pilat@st.com>
1712 Daniel Jacobowitz <dan@codesourcery.com>
1713
1714 * linux-low.c (linux_kill): Handle being called with no threads.
1715 * win32-i386-low.c (win32_kill): Likewise.
1716 (get_child_debug_event): Clear current_process_handle.
1717
1718 2006-12-30 Denis PILAT <denis.pilat@st.com>
1719 Daniel Jacobowitz <dan@codesourcery.com>
1720
1721 * remote-utils.c (remote_open): Check the type of specified
1722 serial port devices before opening them.
1723 * server.c (main): Kill the inferior if an error occurs during
1724 the first remote_open.
1725
1726 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1727
1728 * README: Update supported targets.
1729
1730 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1731
1732 * Makefile.in (clean): Remove reg-mips64.c.
1733 (reg-mips64.c, reg-mips64.o): New rules.
1734 * configure.srv: Handle mips64. Include regset support for mips.
1735 * linux-mips-low.c (union mips_register): New.
1736 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1737 (mips_breakpoint, mips_breakpoint_at): Use int.
1738 (mips_collect_register, mips_supply_register)
1739 (mips_collect_register_32bit, mips_supply_register_32bit)
1740 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1741 (mips_store_fpregset, target_regsets): New.
1742 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1743
1744 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1745
1746 * configure.srv: Add target "spu*-*-*".
1747 * Makefile.in (clean): Remove reg-spu.c.
1748 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1749 * spu-low.c: New file.
1750
1751 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1752
1753 * configure.ac: Correct td_thr_tls_get_addr test.
1754 * configure: Regenerated.
1755
1756 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1757
1758 * linux-low.c (linux_wait_for_event): Reformat. Use the
1759 pass_signals array.
1760 * remote-utils.c (decode_address_to_semicolon): New.
1761 * server.c (pass_signals, handle_general_set): New.
1762 (handle_query): Mention QPassSignals for qSupported.
1763 (main): Call handle_general_set.
1764 * server.h (pass_signals, decode_address_to_semicolon): New.
1765
1766 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1767
1768 * server.c (handle_query): Correct error handling for read_auxv.
1769
1770 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1771
1772 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1773 and srv_linux_thread_db to yes.
1774 * linux-s390-low.c (s390_fill_gregset): New function.
1775 (target_regsets): Define data structure.
1776
1777 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1778
1779 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1780 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1781 * config.in, configure: Regenerated.
1782 * inferiors.c (gdb_id_to_thread): New function.
1783 (gdb_id_to_thread_id): Use it.
1784 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1785 * linux-low.h (struct process_info): Add th member.
1786 (thread_db_get_tls_address): New prototype.
1787 * remote-utils.c (decode_address): Make non-static.
1788 * server.c (handle_query): Handle qGetTLSAddr.
1789 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1790 * target.h (struct target_ops): Add get_tls_address.
1791 * thread-db.c (maybe_attach_thread): Save the thread handle.
1792 (thread_db_get_tls_address): New.
1793
1794 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1795
1796 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1797 (linux_resume_one_process): Take a siginfo_t *. Update all
1798 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1799 (struct pending_signals): Add a siginfo_t.
1800 (linux_wait_for_process): Always set last_status.
1801 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1802 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1803 * linux-low.h (struct process_info): Add last_status.
1804
1805 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1806
1807 * remote-utils.c (try_rle): New function.
1808 (putpkt_binary): Use it.
1809
1810 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1811
1812 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1813 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1814 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1815 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1816 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1817 point registers.
1818
1819 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1820
1821 * server.c (terminal_fd): New variable.
1822 (old_foreground_pgrp): Likewise.
1823 (restore_old_foreground_pgrp): New function.
1824 (start_inferior): Record the terminal file descriptor in terminal_fd
1825 and its original foreground group in old_foreground_pgrp. Register
1826 restore_old_foreground_pgrp with atexit().
1827
1828 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1829
1830 * server.c (handle_query): Correct qPart to qXfer.
1831
1832 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1833
1834 * configure.ac: Check for more headers which are missing on
1835 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1836 * configure.srv: Add Cygwin and mingw32.
1837 * remote-utils.c: Don't include headers unconditionally which
1838 are missing on mingw32. Include <winsock.h> for mingw32.
1839 (remote_open): Adjust for mingw32 support. Flush
1840 standard error after writing to it.
1841 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1842 (unblock_async_io, enable_async_io, disable_async_io)
1843 (readchar, getpkt): Update for Winsock support.
1844 (prepare_resume_reply): Expect a protocol signal number.
1845 * server.c: Disable <sys/wait.h> on mingw32.
1846 (start_inferior): Adjust for mingw32 support. Flush
1847 standard error after writing to it.
1848 (attach_inferior): Likewise. Use protocol signal
1849 numbers.
1850 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1851 and names.
1852 * win32-i386-low.c: New file.
1853 * Makefile.in (XM_CLIBS): Set.
1854 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1855 (win32-i386-low.o): New dependency rule.
1856 * linux-low.c (linux_wait): Use target signal numbers.
1857 * target.h (struct target_ops): Doc fix.
1858 * server.h (target_signal_to_name): New prototype.
1859 * gdbreplay.c: Don't include headers unconditionally which
1860 are missing on mingw32. Include <winsock.h> for mingw32.
1861 (remote_close, remote_open): Adjust for Winsock support.
1862 * configure, config.in: Regenerated.
1863
1864 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1865
1866 * server.c (decode_xfer_read, write_qxfer_response): New.
1867 (handle_query): Take a packet length argument. Handle
1868 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1869 the qSupported response.
1870 (main): Update call to handle_query.
1871
1872 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1873
1874 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1875 (putpkt_binary): Renamed from putpkt and adjusted for binary
1876 data.
1877 (putpkt): New wrapper for putpkt_binary.
1878 (readchar): Don't mask off the high bit.
1879 (decode_X_packet): New function.
1880 * server.c (main): Call putpkt_binary if a handler sets the packet
1881 length. Save the length of the incoming packet. Handle 'X'.
1882 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1883
1884 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1885
1886 * server.c (handle_query): Handle qSupported.
1887
1888 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1889
1890 * remote-utils.c (all_symbols_looked_up): New variable.
1891 (look_up_one_symbol): Check it.
1892 * server.h (look_up_one_symbol): New declaration.
1893 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1894
1895 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1896
1897 * Makefile.in (linux-arm-low.o): Update dependencies.
1898 * linux-arm-low.c: Include "gdb_proc_service.h".
1899 (PTRACE_GET_THREAD_AREA): Define.
1900 (ps_get_thread_area): New function.
1901
1902 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1903
1904 * configure.srv (m68k*-*-uclinux*): New target.
1905 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1906 (linux_resume_one_process): Remove extraneous cast.
1907 (linux_read_offsets): New.
1908 (linux_target_op): Add linux_read_offsets on mmuless systems.
1909 * server.c (handle_query): Add qOffsets logic.
1910 * target.h (struct target_ops): Add read_offsets.
1911
1912 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1913
1914 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1915 (PTRACE_GET_THREAD_AREA): Define.
1916 (ps_get_thread_area): New function.
1917 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1918 (linux-x86-64-low.o): Update.
1919
1920 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1921
1922 * configure.ac: Remove checks for prfpregset_t.
1923 * gdb_proc_service.h: New file.
1924 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1925 new "gdb_proc_service.h".
1926 * proc-service.c: Likewise.
1927 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1928 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1929 * Makefile.in (gdb_proc_service_h): Updated.
1930 * configure, config.in: Regenerated.
1931
1932 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1933
1934 * remote-utils.c (prepare_resume_reply): Move declaration
1935 of gdb_id_from_wait to the top of the block.
1936
1937 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1938
1939 * linux-low.c (regsets_store_inferior_registers): Read the regset
1940 from the target before filling it.
1941
1942 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1943
1944 * server.c (attach_inferior): Return SIGTRAP for a successful
1945 attach.
1946
1947 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1948
1949 * Makefile.in (OBS): Add version.o.
1950 (STAGESTUFF): Delete.
1951 (version.o): Add dependencies.
1952 (version.c): Replace rule.
1953 (clean): Remove version.c.
1954 * server.c (gdbserver_version): New.
1955 (gdbserver_usage): Use printf.
1956 (main): Handle --version and --help.
1957 * server.h (version, host_name): Add declarations.
1958
1959 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1960
1961 * linux-arm-low.c:
1962 * linux-arm-low.c:
1963 * inferiors.c:
1964 * i387-fp.h:
1965 * i387-fp.c:
1966 * gdbreplay.c:
1967 * regcache.c:
1968 * proc-service.c:
1969 * mem-break.h:
1970 * mem-break.c:
1971 * linux-x86-64-low.c:
1972 * linux-sh-low.c:
1973 * linux-s390-low.c:
1974 * linux-ppc64-low.c:
1975 * linux-ppc-low.c:
1976 * linux-mips-low.c:
1977 * linux-m68k-low.c:
1978 * linux-m32r-low.c:
1979 * linux-low.h:
1980 * linux-low.c:
1981 * linux-ia64-low.c:
1982 * linux-i386-low.c:
1983 * linux-crisv32-low.c:
1984 * thread-db.c:
1985 * terminal.h:
1986 * target.h:
1987 * target.c:
1988 * server.h:
1989 * server.c:
1990 * remote-utils.c:
1991 * regcache.h:
1992 * utils.c:
1993 * Makefile.in:
1994 * configure.ac:
1995 * gdbserver.1: Add (C) after Copyright. Update the FSF
1996 address.
1997
1998 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1999
2000 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2001 (arm_breakpoint_at): Recognize both breakpoints.
2002 (the_low_target): Use the correct breakpoint instruction.
2003
2004 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2005
2006 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2007 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2008 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2009 (the_low_target): Update.
2010
2011 2005-10-25 Andreas Schwab <schwab@suse.de>
2012
2013 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2014
2015 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2016 (ia64_num_regs): Reduce to 462.
2017
2018 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2019
2020 * acinclude.m4: Correct quoting.
2021 * aclocal.m4: Regenerated.
2022
2023 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2024 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2025 (thread_db_init): Call thread_db_err_str.
2026 * configure.ac: Check for TD_VERSION.
2027 * config.in, configure: Regenerated.
2028
2029 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2030
2031 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2032
2033 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2034
2035 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2036 is not available. Define HAVE_PTRACE_GETREGS if it is.
2037 * config.in, configure: Regenerated.
2038 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2039 * linux-i386-low.c, linux-m68k-low.c: Update to use
2040 HAVE_PTRACE_GETREGS.
2041 * linux-low.c (regsets_fetch_inferior_registers)
2042 (regsets_store_inferior_registers): Only return 0 if we processed
2043 GENERAL_REGS.
2044 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2045 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2046
2047 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2048
2049 * inferiors.c (struct thread_info): Add gdb_id.
2050 (add_thread): Add gdb_id argument.
2051 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2052 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2053 calls to add_thread.
2054 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2055 * server.c (handle_query): Use thread_to_gdb_id.
2056 (handle_v_cont, main): Use gdb_id_to_thread_id.
2057 * server.h (add_thread): Update prototype.
2058 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2059 prototypes.
2060
2061 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2062
2063 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2064 left-padded registers.
2065 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2066 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2067
2068 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2069
2070 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2071 * configure: Regenerate.
2072 * config.in: Regenerate.
2073 * server.h (NEED_DECLARATION_STRERROR):
2074 Replace with !HAVE_DECL_STRERROR.
2075
2076 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2077
2078 * linux-low.c (linux_wait, linux_send_signal): Don't test
2079 an unsigned long variable for > 0 if it could be MAX_ULONG.
2080 * server.c (myresume): Likewise.
2081 * target.c (set_desired_inferior): Likewise.
2082
2083 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2084
2085 * configure.ac: Simplify and improve check for socklen_t.
2086 * configure, config.in: Regenerate.
2087
2088 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2089
2090 * acconfig.h: Remove.
2091 * configure.ac: Add a test for socklen_t. Use three-argument
2092 AC_DEFINE throughout.
2093 * config.in: Regenerated using autoheader 2.59.
2094 * configure: Regenerated.
2095
2096 * gdbreplay.c (socklen_t): Provide a default.
2097 (remote_open): Use socklen_t.
2098 * remote-utils.c (socklen_t): Provide a default.
2099 (remote_open): Use socklen_t.
2100 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2101 unsigned char.
2102
2103 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2104 char for buffers.
2105 * linux-low.c (linux_read_memory, linux_write_memory)
2106 (linux_read_auxv): Likewise.
2107 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2108 (check_mem_write): Likewise.
2109 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2110 Likewise.
2111 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2112 (registers_from_string, register_data): Likewise.
2113 * server.c (handle_query, main): Likewise.
2114 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2115 (decode_M_packet): Likewise.
2116 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2117 * target.h (struct target_ops): Update read_memory, write_memory,
2118 and read_auxv.
2119 (read_inferior_memory, write_inferior_memory): Update.
2120 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2121 to unsigned char *.
2122 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2123 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2124 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2125 linux-s390-low.c, linux-sh-low.c: Update for changes in
2126 read_inferior_memory and the_low_target->breakpoint.
2127
2128 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2129
2130 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2131 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2132 * configure.srv: Add powerpc64-*-linux*.
2133 * linux-ppc64-low.c: New file.
2134
2135 2005-05-23 Orjan Friberg <orjanf@axis.com>
2136
2137 * linux-cris-low.c: New file with support for CRIS.
2138 * linux-crisv32-low.c: Ditto for CRISv32.
2139 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2140 (clean): Add reg-cris.c and reg-crisv32.c.
2141 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2142 reg-crisv32.o, and reg-crisv32.c to make rules.
2143 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2144 recognized targets.
2145
2146 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2147
2148 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2149 of sizeof (PTRACE_XFER_TYPE).
2150 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2151
2152 2005-05-12 Orjan Friberg <orjanf@axis.com>
2153
2154 * target.h (struct target_ops): Add insert_watchpoint,
2155 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2156 pointers for hardware watchpoint support.
2157 * linux-low.h (struct linux_target_ops): Ditto.
2158 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2159 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2160 to linux_target_ops.
2161 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2162 reply packet.
2163 * server.c (main): Recognize 'Z' and 'z' packets.
2164
2165 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2166
2167 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2168 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2169 (the_low_target): Add new members.
2170
2171 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2172
2173 * proc-service.c (ps_lgetregs): Search all_processes instead of
2174 all_threads.
2175
2176 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2177
2178 * server.c (start_inferior): Change return type to int.
2179 (attach_inferior): Change sigptr to int *.
2180 (handle_v_cont, handle_v_requests): Change signal to int *.
2181 (main): Change signal to int.
2182
2183 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2184
2185 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2186 * configure.srv: Add m32r*-*-linux*.
2187 * linux-m32r-low.c: New file.
2188
2189 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2190
2191 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2192
2193 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2194
2195 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2196 Take unsigned long arguments for PIDs.
2197 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2198 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2199 (wait_for_sigstop, linux_resume_one_process)
2200 (regsets_fetch_inferior_registers, linux_send_signal)
2201 (linux_read_auxv): Likewise. Update the types of variables holding
2202 PIDs. Update format string specifiers.
2203 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2204 * remote-utils.c (prepare_resume_reply): Likewise.
2205 * server.c (cont_thread, general_thread, step_thread)
2206 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2207 unsigned long.
2208 (handle_query): Update format specifiers.
2209 (handle_v_cont, main): Use strtoul for thread IDs.
2210 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2211 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2212 (general_thread, step_thread, thread_from_wait)
2213 (old_thread_from_wait): Update.
2214 * target.h (struct thread_resume): Use unsigned long for THREAD.
2215 (struct target_ops): Use unsigned long for arguments to attach and
2216 thread_alive.
2217
2218 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2219
2220 * acinclude.m4: Include bfd/bfd.m4 directly.
2221 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2222 <agriffis@toolchain.org>.
2223 * aclocal.m4, configure: Regenerated.
2224
2225 2005-01-07 Andrew Cagney <cagney@gnu.org>
2226
2227 * configure.ac: Rename configure.in, require autoconf 2.59.
2228 * configure: Re-generate.
2229
2230 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2231
2232 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2233 LIBS when finished.
2234 * aclocal.m4: Regenerated.
2235 * configure: Regenerated.
2236
2237 2004-11-21 Andreas Schwab <schwab@suse.de>
2238
2239 * linux-m68k-low.c (m68k_num_gregs): Define.
2240 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2241 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2242 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2243 (m68k_breakpoint_at): New. Add to the_low_target.
2244
2245 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2246 srv_linux_thread_db to yes.
2247
2248 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2249
2250 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2251 (ARCH_SET_FS): Likewise.
2252 (ARCH_GET_FS): Likewise.
2253 (ARCH_GET_GS): Likewise.
2254
2255 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2256
2257 * linux-i386-low.c (ps_get_thread_area): New.
2258 * linux-x86-64-low.c (ps_get_thread_area): New.
2259 * linux-low.c: Include <sys/syscall.h>.
2260 (linux_kill_one_process): Don't kill the first thread here.
2261 (linux_kill): Kill the first thread here.
2262 (kill_lwp): New function.
2263 (send_sigstop, linux_send_signal): Use it.
2264 * proc-service.c: Clean up #ifdefs.
2265 (fpregset_info): Delete.
2266 (ps_lgetregs): Update and enable implementation.
2267 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2268 implementations.
2269 * remote-utils.c (struct sym_cache, symbol_cache): New.
2270 (input_interrupt): Print a clearer message.
2271 (async_io_enabled): New variable.
2272 (enable_async_io, disable_async_io): Use it. Update comments.
2273 (look_up_one_symbol): Use the symbol cache.
2274 * thread-db.c (thread_db_look_up_symbols): New function.
2275 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2276
2277 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2278
2279 * configure.in: Test for -rdynamic.
2280 * configure: Regenerated.
2281 * Makefile (INTERNAL_LDFLAGS): New.
2282 (gdbserver, gdbreplay): Use it.
2283
2284 2004-09-02 Andrew Cagney <cagney@gnu.org>
2285
2286 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2287
2288 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2289
2290 * linux-low.c (linux_wait): Clear all_processes list also.
2291
2292 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2293
2294 * linux-low.c: Include <errno.h>. Remove extern declaration of
2295 errno.
2296
2297 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2298
2299 * gdbreplay.c, server.h, utils.c: Update copyright years.
2300
2301 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2302
2303 * server.c (main): Print child status or termination signal from
2304 variable 'signal', not 'sig'.
2305
2306 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2307
2308 * linux-low.c (linux_read_memory): Change return type to
2309 int. Check for and return error from ptrace().
2310 * target.c (read_inferior_memory): Change return type to int. Pass
2311 back return status from the_target->read_memory().
2312 * target.h (struct target_ops): Adapt *read_memory() prototype.
2313 Update comment.
2314 (read_inferior_memory): Adapt prototype.
2315 * server.c (main): Return an error packet if
2316 read_inferior_memory() returns an error.
2317
2318 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2319
2320 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2321 Unify with other clean targets.
2322
2323 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2324
2325 * server.c (handle_v_cont): Call set_desired_inferior.
2326
2327 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2328
2329 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2330
2331 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2332
2333 * linux-low.c (linux_wait): Unblock async I/O.
2334 (linux_resume): Block and enable async I/O.
2335 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2336 * server.h (block_async_io, unblock_async_io): Add prototypes.
2337
2338 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2339
2340 * remote-utils.c (remote_open): Print a status notice after
2341 opening a TCP port.
2342 * server.c (attach_inferior): Print a status notice after
2343 attaching.
2344
2345 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2346
2347 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2348
2349 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2350
2351 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2352 error packet.
2353 * server.c, target.h: Update copyright years.
2354
2355 2004-02-25 Roland McGrath <roland@redhat.com>
2356
2357 * target.h (struct target_ops): New member `read_auxv'.
2358 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2359 * linux-low.c (linux_read_auxv): New function.
2360 (linux_target_ops): Initialize `read_auxv' member to that.
2361
2362 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2363
2364 Committed by Jim Blandy <jimb@redhat.com>.
2365
2366 * linux-s390-low.c (s390_num_regs): Update.
2367 (s390_regmap): Remove control registers. Use __s390x__ predefine
2368 instead of GPR_SIZE to distiguish s390 and s390x targets.
2369
2370 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2371
2372 * linux-low.c: Update copyright year.
2373 (check_removed_breakpoint): Clear pending_is_breakpoint.
2374 (linux_set_resume_request, linux_queue_one_thread)
2375 (resume_status_pending_p): New functions.
2376 (linux_continue_one_thread): Use process->resume.
2377 (linux_resume): Only resume threads if there are no pending events.
2378 * linux-low.h (struct process_info): Add resume request
2379 pointer.
2380
2381 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2382
2383 * regcache.c (new_register_cache): Clear the allocated register
2384 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2385
2386 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2387
2388 * linux-low.c (linux_resume): Take a struct thread_resume *
2389 argument.
2390 (linux_wait): Update call.
2391 (resume_ptr): New static variable.
2392 (linux_continue_one_thread): Renamed from
2393 linux_continue_one_process. Use resume_ptr.
2394 (linux_resume): Use linux_continue_one_thread.
2395 * server.c (handle_v_cont, handle_v_requests): New functions.
2396 (myresume): New function.
2397 (main): Handle 'v' case.
2398 * target.h (struct thread_resume): New type.
2399 (struct target_ops): Change argument of "resume" to struct
2400 thread_resume *.
2401 (myresume): Delete macro.
2402
2403 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2404
2405 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2406 (uninstall): Support DESTDIR.
2407
2408 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2409
2410 * configure.srv: Add xscale*linux copy of arm*linux entry.
2411
2412 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2413
2414 * linux-arm-low.c (arm_reinsert_addr): New function.
2415 (the_low_target): Add arm_reinsert_addr.
2416
2417 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2418
2419 * mem-break.c: Remove whitespace at end of file.
2420
2421 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2422
2423 * configure.in: Check whether we need to prototype strerror.
2424 * server.h: Optionally prototype strerror.
2425 * gdbreplay.c (perror_with_name): Use strerror.
2426 * linux-low.c (linux_attach_lwp): Use strerror.
2427 * utils.c (perror_with_name): Use strerror.
2428 * config.in, configure: Regenerated.
2429
2430 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2431
2432 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2433 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2434
2435 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2436
2437 * Makefile.in (SFILES): Update.
2438 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2439 low-sun3.c: Remove files.
2440
2441 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2442
2443 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2444 (linux_detach_one_process, linux_detach): New functions.
2445 (linux_target_ops): Add linux_detach.
2446 * server.c (main): Handle 'D' packet.
2447 * target.h (struct target_ops): Add "detach" member.
2448 (detach_inferior): Define.
2449
2450 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2451
2452 From Kelley Cook <kelleycook@wideopenwest.com>:
2453 * configure.srv: Accept i[34567]86 variants.
2454
2455 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2456
2457 * linux-low.c (linux_wait_for_event): Correct comment typos.
2458 (linux_resume_one_process): Call check_removed_breakpoint.
2459 (linux_send_signal): New function.
2460 (linux_target_ops): Add linux_send_signal.
2461 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2462 of kill.
2463 * target.h (struct target_ops): Add send_signal.
2464
2465 2003-05-29 Jim Blandy <jimb@redhat.com>
2466
2467 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2468 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2469 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2470 away part of the register's value.
2471
2472 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2473
2474 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2475 (linux_wait_for_event, linux_init_signals): Likewise.
2476
2477 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2478
2479 * configure.in: Check for stdlib.h.
2480 * configure: Regenerated.
2481 * config.in: Regenerated.
2482
2483 2003-01-04 Andreas Schwab <schwab@suse.de>
2484
2485 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2486
2487 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2488
2489 * Makefile.in: Remove obsolete code.
2490
2491 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2492
2493 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2494 defined(PT_FPR0_HI).
2495
2496 2002-11-17 Stuart Hughes <seh@zee2.com>
2497
2498 * linux-arm-low.c (arm_num_regs): Increase.
2499 (arm_regmap): Include status register.
2500
2501 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2502
2503 * linux-low.c (register_addr): Remove incorrect -1 check.
2504
2505 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2506
2507 * linux-low.c (linux_create_inferior): Call setpgid. Return
2508 the new PID.
2509 (unstopped_p, linux_signal_pid): Remove.
2510 (linux_target_ops): Remove linux_signal_pid.
2511 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2512 global instead of target method.
2513 * target.h (struct target_ops): Remove signal_pid. Update comment
2514 for create_inferior.
2515 * server.c (signal_pid): New variable.
2516 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2517 gdbserver. Set the child to be the foreground process group.
2518 (attach_inferior): Set signal_pid.
2519
2520 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2521
2522 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2523
2524 2002-08-20 Jim Blandy <jimb@redhat.com>
2525
2526 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2527 default for this.
2528
2529 2002-08-01 Andrew Cagney <cagney@redhat.com>
2530
2531 * Makefile.in: Make chill references obsolete.
2532
2533 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2534
2535 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2536 * configure: Regenerate.
2537 * config.in: Regenerate.
2538
2539 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2540
2541 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2542 (perror_with_name, remote_close, remote_open, expect, play): Static.
2543
2544 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2545
2546 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2547 byte offsets instead of an array of indexes.
2548 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2549
2550 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2551
2552 * regcache.c: Add comment.
2553
2554 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2555
2556 * thread-db.c: New file.
2557 * proc-service.c: New file.
2558 * acinclude.m4: New file.
2559 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2560 proc-service.o, and thread-db.o.
2561 (linux-low.o): Add USE_THREAD_DB.
2562 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2563 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2564 * aclocal.m4: Regenerated.
2565 * config.in: Regenerated.
2566 * configure: Regenerated.
2567 * configure.in: Check for proc_service.h, sys/procfs.h,
2568 thread_db.h, and linux/elf.h headrs.
2569 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2570 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2571 Check for -lthread_db and thread support.
2572 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2573 PowerPC, and SuperH.
2574 * i387-fp.c: Constify arguments.
2575 * i387-fp.h: Likewise.
2576 * inferiors.c: (struct thread_info): Renamed from
2577 `struct inferior_info'. Remove PID member. Use generic inferior
2578 list header. All uses updated.
2579 (inferiors, signal_pid): Removed.
2580 (all_threads): New variable.
2581 (get_thread): Define.
2582 (add_inferior_to_list): New function.
2583 (for_each_inferior): New function.
2584 (change_inferior_id): New function.
2585 (add_inferior): Removed.
2586 (remove_inferior): New function.
2587 (add_thread): New function.
2588 (free_one_thread): New function.
2589 (remove_thread): New function.
2590 (clear_inferiors): Use for_each_inferior and free_one_thread.
2591 (find_inferior): New function.
2592 (find_inferior_id): New function.
2593 (inferior_target_data): Update argument type.
2594 (set_inferior_target_data): Likewise.
2595 (inferior_regcache_data): Likewise.
2596 (set_inferior_regcache_data): Likewise.
2597 * linux-low.c (linux_bp_reinsert): Remove.
2598 (all_processes, stopping_threads, using_thrads)
2599 (struct pending_signals, debug_threads, pid_of): New.
2600 (inferior_pid): Replace with macro.
2601 (struct inferior_linux_data): Remove.
2602 (get_stop_pc, add_process): New functions.
2603 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2604 Use add_process and add_thread.
2605 (linux_attach_lwp): New function, based on old linux_attach. Use
2606 add_process and add_thread. Set stop_expected for new threads.
2607 (linux_attach): New function.
2608 (linux_kill_one_process): New function.
2609 (linux_kill): Kill all LWPs.
2610 (linux_thread_alive): Use find_inferior_id.
2611 (check_removed_breakpoints, status_pending_p): New functions.
2612 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2613 Update. Use WNOHANG. Wait for cloned processes also. Update process
2614 struct for the found process.
2615 (linux_wait_for_event): New function.
2616 (linux_wait): Use it. Support LWPs.
2617 (send_sigstop, wait_for_sigstop, stop_all_processes)
2618 (linux_resume_one_process, linux_continue_one_process): New functions.
2619 (linux_resume): Support LWPs.
2620 (REGISTER_RAW_SIZE): Remove.
2621 (fetch_register): Use register_size instead. Call supply_register.
2622 (usr_store_inferior_registers): Likewise. Call collect_register.
2623 Fix recursive case.
2624 (regsets_fetch_inferior_registers): Improve error message.
2625 (regsets_store_inferior_registers): Add debugging.
2626 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2627 (unstopped_p, linux_signal_pid): New functions.
2628 (linux_target_ops): Add linux_signal_pid.
2629 (linux_init_signals): New function.
2630 (initialize_low): Call it. Initialize using_threads.
2631 * regcache.c (inferior_regcache_data): Add valid
2632 flag.
2633 (get_regcache): Fetch registers lazily. Add fetch argument
2634 and update all callers.
2635 (regcache_invalidate_one, regcache_invalidate): New
2636 functions.
2637 (new_register_cache): Renamed from create_register_cache.
2638 Return the new regcache.
2639 (free_register_cache): Change argument to a void *.
2640 (registers_to_string, registers_from_string): Call get_regcache
2641 with fetch flag set.
2642 (register_data): Make static. Pass fetch flag to get_regcache.
2643 (supply_register): Call get_regcache with fetch flag clear.
2644 (collect_register): Call get_regcache with fetch flag set.
2645 (collect_register_as_string): New function.
2646 * regcache.h: Update.
2647 * remote-utils.c (putpkt): Flush after debug output and use
2648 stderr.
2649 Handle input interrupts while waiting for an ACK.
2650 (input_interrupt): Use signal_pid method.
2651 (getpkt): Flush after debug output and use stderr.
2652 (outreg): Use collect_register_as_string.
2653 (new_thread_notify, dead_thread_notify): New functions.
2654 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2655 and general_thread.
2656 (look_up_one_symbol): Flush after debug output.
2657 * server.c (step_thread, server_waiting): New variables.
2658 (start_inferior): Don't use signal_pid. Update call to mywait.
2659 (attach_inferior): Update call to mywait.
2660 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2661 (main): Don't fetch/store registers explicitly. Use
2662 set_desired_inferior. Support proposed ``Hs'' packet. Update
2663 calls to mywait.
2664 * server.h: Update.
2665 (struct inferior_list, struct_inferior_list_entry): New.
2666 * target.c (set_desired_inferior): New.
2667 (write_inferior_memory): Constify.
2668 (mywait): New function.
2669 * target.h: Update.
2670 (struct target_ops): New signal_pid method.
2671 (mywait): Removed macro, added prototype.
2672
2673 * linux-low.h (regset_func): Removed.
2674 (regset_fill_func, regset_store_func): New.
2675 (enum regset_type): New.
2676 (struct regset_info): Add type field. Use new operation types.
2677 (struct linux_target_ops): stop_pc renamed to get_pc.
2678 Add decr_pc_after_break and breakpoint_at.
2679 (get_process, get_thread_proess, get_process_thread)
2680 (strut process_info, all_processes, linux_attach_lwp)
2681 (thread_db_init): New.
2682
2683 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2684 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2685 (the_low_target): Add new members.
2686 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2687 (i386_store_fpxregset): Constify.
2688 (target_regsets): Add new kind identifier.
2689 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2690 (i386_set_pc): Add debugging.
2691 (i386_breakpoint_at): New function.
2692 (the_low_target): Add new members.
2693 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2694 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2695 (mips_breakpoint_at): New.
2696 (the_low_target): Add new members.
2697 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2698 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2699 (the_low_target): Add new members.
2700 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2701 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2702 (the_low_target): Add new members.
2703 * linux-x86-64-low.c (target_regsets): Add new kind
2704 identifier.
2705
2706 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2707
2708 From Martin Pool <mbp@samba.org>:
2709 * server.c (gdbserver_usage): New function.
2710 (main): Call it.
2711
2712 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2713
2714 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2715 stop_at -> stop_pc.
2716
2717 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2718
2719 * Makefile.in: Remove obsolete code.
2720
2721 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2722
2723 * linux-low.c (regsets_fetch_inferior_registers),
2724 (regsets_store_inferior_registers): Removed cast to int from
2725 ptrace() calls.
2726 * regcache.h: Added declaration of struct inferior_info.
2727
2728 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2729
2730 * inferiors.c (struct inferior_info): Add regcache_data.
2731 (add_inferior): Call create_register_cache.
2732 (clear_inferiors): Call free_register_cache.
2733 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2734 * regcache.c (struct inferior_regcache_data): New.
2735 (registers): Remove.
2736 (get_regcache): New function.
2737 (create_register_cache, free_register_cache): New functions.
2738 (set_register_cache): Don't initialize the register cache here.
2739 (registers_to_string, registers_from_string, register_data): Call
2740 get_regcache.
2741 * regcache.h: Add prototypes.
2742 * server.h: Likewise.
2743
2744 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2745
2746 * mem-break.c: New file.
2747 * mem-break.h: New file.
2748 * Makefile.in: Add mem-break.o rule; update server.h
2749 dependencies.
2750 * inferiors.c (struct inferior_info): Add target_data
2751 member.
2752 (clear_inferiors): Free target_data member if set.
2753 (inferior_target_data, set_inferior_target_data): New functions.
2754 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2755 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2756 * linux-low.c (linux_bp_reinsert): New variable.
2757 (struct inferior_linux_data): New.
2758 (linux_create_inferior): Use set_inferior_target_data.
2759 (linux_attach): Likewise. Call add_inferior.
2760 (linux_wait_for_one_inferior): New function.
2761 (linux_wait): Call it.
2762 (linux_write_memory): Add const.
2763 (initialize_low): Call set_breakpoint_data.
2764 * linux-low.h (struct linux_target_ops): Add breakpoint
2765 handling members.
2766 * server.c (attach_inferior): Remove extra add_inferior
2767 call.
2768 * server.h: Include mem-break.h. Update inferior.c
2769 prototypes.
2770 * target.c (read_inferior_memory)
2771 (write_inferior_memory): New functions.
2772 * target.h (read_inferior_memory)
2773 (write_inferior_memory): Change macros to prototypes.
2774 (struct target_ops): Update comments. Add const to write_memory
2775 definition.
2776
2777 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2778
2779 * linux-low.c (usr_store_inferior_registers): Support
2780 registers which are allowed to fail to store.
2781 * linux-low.h (linux_target_ops): Likewise.
2782 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2783 (ppc_cannot_store_register): FPSCR may not be storable.
2784
2785 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2786
2787 * server.h: Include <string.h> if HAVE_STRING_H.
2788 * ChangeLog: Correct paths in last ChangeLog entry.
2789
2790 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2791
2792 * linux-low.h: Remove obsolete prototypes.
2793 (struct linux_target_ops): New.
2794 (extern the_low_target): New.
2795 * linux-low.c (num_regs, regmap): Remove declarations.
2796 (register_addr): Use the_low_target explicitly.
2797 (fetch_register): Likewise.
2798 (usr_fetch_inferior_registers): Likewise.
2799 (usr_store_inferior_registers): Likewise.
2800 * linux-arm-low.c (num_regs): Remove.
2801 (arm_num_regs): Define.
2802 (arm_regmap): Renamed from regmap, made static.
2803 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2804 made static.
2805 (arm_cannot_store_register): Renamed from cannot_store_register,
2806 made static.
2807 (the_low_target): New.
2808 * linux-i386-low.c (num_regs): Remove.
2809 (i386_num_regs): Define.
2810 (i386_regmap): Renamed from regmap, made static.
2811 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2812 made static.
2813 (i386_cannot_store_register): Renamed from cannot_store_register,
2814 made static.
2815 (the_low_target): New.
2816 * linux-ia64-low.c (num_regs): Remove.
2817 (ia64_num_regs): Define.
2818 (ia64_regmap): Renamed from regmap, made static.
2819 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2820 made static.
2821 (ia64_cannot_store_register): Renamed from cannot_store_register,
2822 made static.
2823 (the_low_target): New.
2824 * linux-m68k-low.c (num_regs): Remove.
2825 (m68k_num_regs): Define.
2826 (m68k_regmap): Renamed from regmap, made static.
2827 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2828 made static.
2829 (m68k_cannot_store_register): Renamed from cannot_store_register,
2830 made static.
2831 (the_low_target): New.
2832 * linux-mips-low.c (num_regs): Remove.
2833 (mips_num_regs): Define.
2834 (mips_regmap): Renamed from regmap, made static.
2835 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2836 made static.
2837 (mips_cannot_store_register): Renamed from cannot_store_register,
2838 made static.
2839 (the_low_target): New.
2840 * linux-ppc-low.c (num_regs): Remove.
2841 (ppc_num_regs): Define.
2842 (ppc_regmap): Renamed from regmap, made static.
2843 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2844 made static.
2845 (ppc_cannot_store_register): Renamed from cannot_store_register,
2846 made static.
2847 (the_low_target): New.
2848 * linux-s390-low.c (num_regs): Remove.
2849 (s390_num_regs): Define.
2850 (s390_regmap): Renamed from regmap, made static.
2851 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2852 made static.
2853 (s390_cannot_store_register): Renamed from cannot_store_register,
2854 made static.
2855 (the_low_target): New.
2856 * linux-sh-low.c (num_regs): Remove.
2857 (sh_num_regs): Define.
2858 (sh_regmap): Renamed from regmap, made static.
2859 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2860 made static.
2861 (sh_cannot_store_register): Renamed from cannot_store_register,
2862 made static.
2863 (the_low_target): New.
2864 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2865 (the_low_target): New.
2866
2867 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2868
2869 * Makefile.in: Add stamp-h target.
2870 * configure.in: Create stamp-h.
2871 * configure: Regenerated.
2872
2873 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2874
2875 * inferiors.c: New file.
2876 * target.c: New file.
2877 * target.h: New file.
2878 * Makefile.in: Add target.o and inferiors.o. Update
2879 dependencies.
2880 * linux-low.c (inferior_pid): New static variable,
2881 moved from server.c.
2882 (linux_create_inferior): Renamed from create_inferior.
2883 Call add_inferior. Return 0 on success instead of a PID.
2884 (linux_attach): Renamed from myattach.
2885 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2886 (linux_thread_alive): Renamed from mythread_alive.
2887 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2888 child dies.
2889 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2890 (regsets_store_inferior_registers): Correct error message.
2891 Add missing ``return 0''.
2892 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2893 (linux_store_registers): Renamed from store_inferior_registers.
2894 (linux_read_memory): Renamed from read_inferior_memory.
2895 (linux_write_memory): Renamed from write_inferior_memory.
2896 (linux_target_ops): New structure.
2897 (initialize_low): Call set_target_ops ().
2898 * remote-utils.c (unhexify): New function.
2899 (hexify): New function.
2900 (input_interrupt): Send signals to ``signal_pid''.
2901 * server.c (inferior_pid): Remove.
2902 (start_inferior): Update create_inferior call.
2903 (attach_inferior): Call add_inferior.
2904 (handle_query): New function.
2905 (main): Call handle_query for `q' packets.
2906 * server.h: Include "target.h". Remove obsolete prototypes.
2907 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2908
2909 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2910
2911 * Makefile.in: Add WARN_CFLAGS. Update configury
2912 dependencies.
2913 * configure.in: Check for <string.h>
2914 * configure: Regenerate.
2915 * config.in: Regenerate.
2916 * gdbreplay.c: Include needed system headers.
2917 (remote_open): Remove strchr prototype.
2918 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2919 * regcache.c (supply_register): Change buf argument to const void *.
2920 (supply_register_by_name): Likewise.
2921 (collect_register): Change buf argument to void *.
2922 (collect_register_by_name): Likewise.
2923 * regcache.h: Add missing prototypes.
2924 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2925 * server.c (handle_query): New function.
2926 (attached): New static variable, moved out of main.
2927 (main): Quiet longjmp clobber warnings.
2928 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2929 * utils.c (error): Remove NORETURN.
2930 (fatal): Likewise.
This page took 0.095437 seconds and 4 git commands to generate.