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