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