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