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