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