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