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