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