]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
6bf5e0ba
PA
12010-03-24 Pedro Alves <pedro@codesourcery.com>
2
3 * linux-low.c (status_pending_p_callback): Fix comment.
4 (linux_wait_for_event_1): Move most of the internal breakpoint
5 handling from here...
6 (linux_wait_1): ... to here.
7 (count_events_callback): New.
8 (select_singlestep_lwp_callback): New.
9 (select_event_lwp_callback): New.
10 (cancel_breakpoints_callback): New.
11 (select_event_lwp): New.
12 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13 priority to all LWPs that have had events that should be reported
14 to the client. Cancel breakpoints when about to reporting the
15 event to the client, not while stopping lwps. No longer cancel
16 finished single-steps here.
17 (cancel_finished_single_step): Delete.
18 (cancel_finished_single_steps): Delete.
19
414a389f
PA
202010-03-24 Pedro Alves <pedro@codesourcery.com>
21
22 * mem-break.c (enum bkpt_type): New.
23 (struct breakpoint): New field `type'.
24 (set_breakpoint_at): Change return type to struct breakpoint
25 pointer. Set type to `other_breakpoint' by default.
26 (delete_breakpoint): Rewrite, supporting more than one breakpoint
27 in the breakpoint list.
28 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
29 (reinsert_breakpoint): Rename to ...
30 (reinsert_raw_breakpoint): ... this.
31 (reinsert_breakpoints_at): Adjust.
32 * mem-break.h (struct breakpoint): Declare.
33 (set_breakpoint_at): Change return type to struct breakpoint
34 pointer.
35
2280c721
PA
362010-03-24 Pedro Alves <pedro@codesourcery.com>
37
38 * server.c (handle_query): Assign, not compare.
39
d50171e4
PA
402010-03-24 Pedro Alves <pedro@codesourcery.com>
41
42 Teach linux gdbserver to step-over-breakpoints.
43
44 * linux-low.c (can_hardware_single_step): New.
45 (supports_breakpoints): New.
46 (handle_extended_wait): If stopping threads, read the stop pc of
47 the new cloned LWP.
48 (get_pc): New.
49 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
50 low target doesn't support retrieving the PC.
51 (add_lwp): Set last_resume_kind to resume_continue.
52 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
53 (linux_attach): Don't clear stop_expected. Set the lwp's
54 last_resume_kind to resume_stop.
55 (linux_detach_one_lwp): Don't check for removed breakpoints.
56 (check_removed_breakpoint): Delete.
57 (status_pending_p): Rename to ...
58 (status_pending_p_callback): ... this. Don't check for removed
59 breakpoints. Don't consider threads that are stopped from GDB's
60 perspective.
61 (linux_wait_for_lwp): Always read the stop_pc here.
62 (cancel_breakpoint): New.
63 (step_over_bkpt): New global.
64 (linux_wait_for_event_1): Implement stepping over breakpoints.
65 (gdb_wants_lwp_stopped): New.
66 (gdb_wants_all_stopped): New.
67 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
68 single-step traps here. Store the thread's last reported target
69 wait status.
70 (send_sigstop): Don't clear stop_expected. Always set it,
71 instead.
72 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
73 (cancel_finished_single_step): New.
74 (cancel_finished_single_steps): New.
75 (wait_for_sigstop): Don't cancel finished single-step traps here.
76 (linux_resume_one_lwp): Don't check for removed breakpoints.
77 Don't set `step' on non-hardware step archs.
78 (linux_set_resume_request): Ignore resume_stop requests if already
79 stopping or stopped. Set the lwp's last_resume_kind.
80 (resume_status_pending_p): Don't check for removed breakpoints.
81 (need_step_over_p): New.
82 (start_step_over): New.
83 (finish_step_over): New.
84 (linux_resume_one_thread): Always queue a sigstop for resume_stop
85 requests. Clear the thread's last reported target waitstatus.
86 Don't use the `suspended' flag. Don't consider pending breakpoints.
87 (linux_resume): Start a step-over if necessary.
88 (proceed_one_lwp): New.
89 (proceed_all_lwps): New.
90 (unstop_all_lwps): New.
91 * linux-low.h (struct lwp_info): Rewrite comment for the
92 `suspended' flag. Add the `stop_pc' field. Delete the
93 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
94 Add `'last_resume_kind' and `need_step_over' fields.
95 * inferiors.c (struct thread_info): Delete, moved elsewhere.
96 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
97 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
98 (set_raw_breakpoint_at): New.
99 (set_breakpoint_at): Rewrite to use it.
100 (reinsert_breakpoint_handler): Delete.
101 (set_reinsert_breakpoint): New.
102 (reinsert_breakpoint_by_bp): Delete.
103 (delete_reinsert_breakpoints): New.
104 (uninsert_breakpoint): Rewrite.
105 (uninsert_breakpoints_at): New.
106 (reinsert_breakpoint): Rewrite.
107 (reinsert_breakpoints_at): New.
108 (check_breakpoints): Rewrite.
109 (breakpoint_here): New.
110 (breakpoint_inserted_here): New.
111 (check_mem_read): Adjust.
112 * mem-break.h (breakpoints_supported, breakpoint_here)
113 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
114 (reinsert_breakpoint_by_bp): Delete declaration.
115 (delete_reinsert_breakpoints): Declare.
116 (reinsert_breakpoint): Delete declaration.
117 (reinsert_breakpoints_at): Declare.
118 (uninsert_breakpoint): Delete declaration.
119 (uninsert_breakpoints_at): Declare.
120 (check_breakpoints): Adjust prototype.
121 * server.h: Adjust include order.
122 (struct thread_info): Declare here. Add a `last_status' field.
123
30ba68cb
MS
1242010-03-23 Michael Snyder <msnyder@vmware.com>
125
126 * server.c (crc32): New function.
127 (handle_query): Add handling for 'qCRC:' request.
128
b9a881c2
PA
1292010-03-23 Pedro Alves <pedro@codesourcery.com>
130
131 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
132 lwp had been stopped by a watchpoint.
133
e92d13d5
PA
1342010-03-16 Pedro Alves <pedro@codesourcery.com>
135
136 * server.h (internal_error): Declare.
137 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
138 * utils.c (internal_error): New function.
139
64daa791
AS
1402010-03-15 Andreas Schwab <schwab@redhat.com>
141
142 * configure.srv: Fix typo setting srv_regobj.
143
f52cd8cd
PA
1442010-03-15 Pedro Alves <pedro@codesourcery.com>
145
146 * linux-low.c (fetch_register): Avoid passing a non string literal
147 format to `error'.
148 (usr_store_inferior_registers): Ditto.
149
93ae6fdc
PA
1502010-03-14 Pedro Alves <pedro@codesourcery.com>
151
152 * linux-low.c (linux_write_memory): Bail out early if peeking
153 memory failed.
154
c3adc08c
PA
1552010-03-14 Pedro Alves <pedro@codesourcery.com>
156
157 * linux-low.h (struct lwp_info): New fields
158 `stopped_by_watchpoint' and `stopped_data_address'.
159 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
160 here, and cache them in the lwp object.
161 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
162 directly.
163 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
164 field.
165 (linux_stopped_by_watchpoint): Rewrite.
166 (linux_stopped_data_address): Rewrite.
167
bce522a2
PA
1682010-03-06 Simo Melenius <simo.melenius@iki.fi>
169
170 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
171 switching the current inferior, not before.
172
90884b2b
L
1732010-03-01 H.J. Lu <hongjiu.lu@intel.com>
174
175 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
176 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
177 i386-linux.c and amd64-linux.c.
178 (reg-i386.o): Removed.
179 (reg-i386.c): Likewise.
180 (reg-i386-linux.o): Likewise.
181 (reg-i386-linux.c): Likewise.
182 (reg-x86-64.o): Likewise.
183 (reg-x86-64.c): Likewise.
184 (reg-x86-64-linux.o): Likewise.
185 (reg-x86-64-linux.c): Likewise.
186 (i386.o): New.
187 (i386.c): Likewise.
188 (i386-linux.o): Likewise.
189 (i386-linux.c): Likewise.
190 (amd64.o): Likewise.
191 (amd64.c): Likewise.
192 (amd64-linux.o): Likewise.
193 (amd64-linux.c): Likewise.
194
195 * configure.srv (srv_i386_regobj): New.
196 (srv_i386_linux_regobj): Likewise.
197 (srv_amd64_regobj): Likewise.
198 (srv_amd64_linux_regobj): Likewise.
199 (srv_i386_32bit_xmlfiles): Likewise.
200 (srv_i386_64bit_xmlfiles): Likewise.
201 (srv_i386_xmlfiles): Likewise.
202 (srv_amd64_xmlfiles): Likewise.
203 (srv_i386_linux_xmlfiles): Likewise.
204 (srv_amd64_linux_xmlfiles): Likewise.
205 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
206 srv_xmlfiles to $srv_i386_xmlfiles.
207 (i[34567]86-*-mingw32ce*): Likewise.
208 (i[34567]86-*-mingw*): Likewise.
209 (i[34567]86-*-nto*): Likewise.
210 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
211 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
212 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
213 (x86_64-*-linux*): Likewise.
214
215 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
216 (init_registers_amd64_linux): New.
217 (x86_arch_setup): Replace init_registers_x86_64_linux with
218 init_registers_amd64_linux.
219
193f13e6
MK
2202010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
221
222 * configure.ac: Check for libdl. If it is not available link against
223 static libthread_db.
224 * configure: Regenerate.
225
85d721b8
PA
2262010-02-22 Pedro Alves <pedro@codesourcery.com>
227
228 PR9605
229
230 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
231 handing a read watchpoint.
232 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
233
6076632b
DE
2342010-02-12 Doug Evans <dje@google.com>
235
236 * linux-low.c (linux_supports_tracefork_flag): Document.
237 (linux_look_up_symbols): Add comment.
238
3327ccf7
L
2392010-02-03 H.J. Lu <hongjiu.lu@intel.com>
240
241 * regcache.c (supply_register): Clear regcache if buf is NULL.
242
0718675c 2432010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 244 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
245
246 * inferiors.c (find_inferior): Add function documentation.
247 (unloaded_dll): Handle the case where the unloaded dll has not
248 been previously registered in the dll list.
249
177321bd
DJ
2502010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
251
252 * linux-arm-low.c (thumb_breakpoint_len): Delete.
253 (thumb2_breakpoint): New.
254 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
255
2b009048
DJ
2562010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
257
258 * linux-low.c (get_stop_pc): Check for SIGTRAP.
259 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
260 breakpoints.
261
3be029c7
PA
2622010-01-21 Pedro Alves <pedro@codesourcery.com>
263
264 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
265
18f5de3b
JK
2662010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
267
268 * linux-s390-low.c (s390_collect_ptrace_register)
269 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
270
3743bb4f
DE
2712010-01-21 Doug Evans <dje@google.com>
272
14ce3065
DE
273 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
274 (PTRACE_ARG4_TYPE): New macro.
275 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
276 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
277 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
278 (usr_store_inferior_registers): Ditto.
279 (linux_read_memory, linux_write_memory): Ditto.
280 (linux_test_for_tracefork): Ditto.
281
3743bb4f
DE
282 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
283 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
284
8b315be5
PA
2852010-01-21 Pedro Alves <pedro@codesourcery.com>
286
287 * proc-service.c (ps_lgetregs): Don't refetch registers from the
288 target.
289
85492558
PA
2902010-01-21 Pedro Alves <pedro@codesourcery.com>
291
292 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
293 prototype to take a regcache. Adjust.
294
442ea881
PA
2952010-01-20 Pedro Alves <pedro@codesourcery.com>
296
297 * regcache.h (struct thread_info): Forward declare.
298 (struct regcache): New.
299 (new_register_cache): Adjust prototype.
300 (get_thread_regcache): Declare.
301 (free_register_cache): Adjust prototype.
302 (registers_to_string, registers_from_string): Ditto.
303 (supply_register, supply_register_by_name, collect_register)
304 (collect_register_as_string, collect_register_by_name): Ditto.
305 * regcache.c (struct inferior_regcache_data): Delete.
306 (get_regcache): Rename to ...
307 (get_thread_regcache): ... this. Adjust. Switch inferior before
308 fetching registers.
309 (regcache_invalidate_one): Adjust.
310 (regcache_invalidate): Fix prototype.
311 (new_register_cache): Return the new register cache.
312 (free_register_cache): Change prototype.
313 (realloc_register_cache): Adjust.
314 (registers_to_string): Change prototype to take a regcache. Adjust.
315 (registers_from_string): Ditto.
316 (register_data): Ditto.
317 (supply_register): Ditto.
318 (supply_register_by_name): Ditto.
319 (collect_register): Ditto.
320 (collect_register_as_string): Ditto.
321 (collect_register_by_name): Ditto.
322 * server.c (process_serial_event): Adjust.
323 * linux-low.h (regset_fill_func, regset_store_func): Change
324 prototype.
325 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
326 Change prototype.
327 * linux-low.c (get_stop_pc): Adjust.
328 (check_removed_breakpoint): Adjust.
329 (linux_wait_for_event): Adjust.
330 (linux_resume_one_lwp): Adjust.
331 (fetch_register): Add regcache parameter. Adjust.
332 (usr_store_inferior_registers): Ditto.
333 (regsets_fetch_inferior_registers): Ditto.
334 (regsets_store_inferior_registers): Ditto.
335 (linux_fetch_registers, linux_store_registers): Ditto.
336 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
337 regcache. Adjust.
338 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
339 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
340 prototype to take a regcache.
341 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
342 * remote-utils.c (convert_ascii_to_int, outreg)
343 (prepare_resume_reply): Change prototype to take a regcache.
344 Adjust.
345 * target.h (struct target_ops) <fetch_registers, store_registers>:
346 Change prototype to take a regcache.
347 (fetch_inferior_registers, store_inferior_registers): Change
348 prototype to take a regcache. Adjust.
349 * proc-service.c (ps_lgetregs): Adjust.
350 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
351 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
352 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
353 take a regcache. Adjust.
354 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
355 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
356 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
357 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
358 * linux-cris-low.c (cris_get_pc, cris_set_pc)
359 (cris_cannot_fetch_register):
360 (cris_breakpoint_at): Change prototype to take a regcache.
361 Adjust.
362 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
363 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
364 to take a regcache. Adjust.
365 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
366 Adjust.
367 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
368 take a regcache. Adjust.
369 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
370 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
371 (m68k_set_pc): Change prototype to take a regcache. Adjust.
372 * linux-mips-low.c (mips_get_pc):
373 (mips_set_pc): Change prototype to take a regcache. Adjust.
374 (mips_reinsert_addr): Adjust.
375 (mips_collect_register): Change prototype to take a regcache.
376 Adjust.
377 (mips_supply_register):
378 (mips_collect_register_32bit, mips_supply_register_32bit)
379 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
380 (mips_store_fpregset): Ditto.
381 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
382 Ditto.
383 (parse_spufs_run): Adjust.
384 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
385 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
386 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
387 take a regcache. Adjust.
388 * linux-s390-low.c (s390_collect_ptrace_register)
389 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
390 (s390_set_pc): Change prototype to take a regcache. Adjust.
391 (s390_arch_setup): Adjust.
392 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
393 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
394 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
395 (sparc_fill_gregset, sparc_store_gregset_from_stack)
396 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
397 regcache. Adjust.
398 (sparc_breakpoint_at): Adjust.
399 * linux-xtensa-low.c (xtensa_fill_gregset):
400 (xtensa_store_gregset):
401 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
402 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
403 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
404 prototype to take a regcache. Adjust.
405 * win32-arm-low.c (arm_fetch_inferior_register)
406 (arm_store_inferior_register): Change prototype to take a
407 regcache. Adjust.
408 * win32-i386-low.c (i386_fetch_inferior_register)
409 (i386_store_inferior_register): Change prototype to take a
410 regcache. Adjust.
411 * win32-low.c (child_fetch_inferior_registers)
412 (child_store_inferior_registers): Change prototype to take a
413 regcache. Adjust.
414 (win32_wait): Adjust.
415 (win32_fetch_inferior_registers): Change prototype to take a
416 regcache. Adjust.
417 (win32_store_inferior_registers): Adjust.
418 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
419 store_inferior_register>: Change prototype to take a regcache.
420
60c3d7b0
DE
4212010-01-20 Doug Evans <dje@google.com>
422
423 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
424 #ifdef.
425 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 426 (W_STOPCODE): Provide definition if missing.
60c3d7b0 427
dc146f7c
VP
4282010-01-13 Vladimir Prus <vladimir@codesourcery.com>
429
430 * linux-low.c (linux_core_of_thread): New.
431 (compare_ints, show_process, list_threads): New.
432 (linux_qxfer_osdata): Report threads and cores.
433 (linux_target_op): Register linux_core_of_thread.
434 * remote-utils.c (prepare_resume_reply): Report the core.
435 (buffer_xml_printf): Support %d specifier.
436 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
437 New.
438 (handle_query): Handle qXfer:threads. Announce availability
439 thereof.
440 * target.h (struct target_ops): New field core_of_thread.
441
7803799a
UW
4422010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
443
444 * Makefile.in (clean): Remove new generated files.
445 (reg-s390.o, reg-s390.c): Remove rules.
446 (reg-s390x.o, reg-s390x.c): Likewise.
447 (s390-linux32.o, s390-linux32.c): Add rules.
448 (s390-linux64.o, s390-linux64.c): Likewise.
449 (s390x-linux64.o, s390x-linux64.c): Likewise.
450 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
451 * linux-s390-low.c: Include <elf.h>.
452 (HWCAP_S390_HIGH_GPRS): Define if undefined.
453 (init_registers_s390): Remove prototype.
454 (init_registers_s390x): Likewise.
455 (init_registers_s390_linux32): Add prototype.
456 (init_registers_s390_linux64): Likewise.
457 (init_registers_s390x_linux64): Likewise.
458 (s390_num_regs_3264): New define.
459 (s390_regmap_3264): New global variable.
460 (s390_cannot_fetch_register): Remove obsolete check.
461 (s390_cannot_store_register): Likewise.
462 (s390_collect_ptrace_register): Handle upper/lower register halves.
463 (s390_supply_ptrace_register): Likewise.
464 (s390_fill_gregset): Update to register number changes.
465 (s390_get_hwcap): New routine.
466 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
467 Install appropriate regmap and register set.
468
6e7ffa39
JB
4692010-01-01 Joel Brobecker <brobecker@adacore.com>
470
471 * server.c (gdbserver_version): Update copyright year to 2010.
472 * gdbreplay.c (gdbreplay_version): Likewise.
473
957f3f49
DE
4742009-12-28 Doug Evans <dje@google.com>
475
476 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
477 elf/external.h. Include <elf.h> instead but only if necessary.
478
ca5c370d
PA
4792009-12-28 Pedro Alves <pedro@codesourcery.com>
480
481 * linux-low.c (linux_remove_process): Remove `detaching'
482 parameter. Don't release/detach from thread_db here.
483 (linux_kill): Release/detach from thread_db here, ...
484 (linux_detach): ... and here, before actually detaching.
485 (linux_wait_1): ... and here, when a process exits.
486 * thread-db.c (any_thread_of): New.
487 (thread_db_free): Switch the current inferior to a thread of the
488 passed in process.
489
4ee62156
DE
4902009-12-21 Doug Evans <dje@google.com>
491
d90e6a88
DE
492 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
493
c5f62d5f
DE
494 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
495 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
496 warning ifndef __NR_tkill. Move setting of errno there too.
497 Delete unnecessary resetting of errno after syscall.
498 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
499
10e86dd7
DE
500 * configure.ac: Check for dladdr.
501 * config.in: Regenerate.
502 * configure: Regenerate.
503 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
504 (try_thread_db_load): Update.
505
4ee62156
DE
506 * linux-low.c (my_waitpid): Delete unnecessary prototype.
507
00f515da
DE
5082009-12-18 Doug Evans <dje@google.com>
509
e9464885
DE
510 * event-loop.c: Include unistd.h if it exists.
511
07d4f67e
DE
512 * linux-low.c (my_waitpid): Move definition away from being in
513 between linux_tracefork_child/linux_test_for_tracefork.
514
00f515da
DE
515 * gdb_proc_service.h (psaddr_t): Fix type.
516 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
517 signature to match glibc.
518
1de1badb
DE
5192009-12-16 Doug Evans <dje@google.com>
520
521 * linux-low.c (linux_read_memory): Fix argument to read.
522
aeeb81d1
PA
5232009-11-26 Pedro Alves <pedro@codesourcery.com>
524
525 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
526 events, don't leave current_inferior pointing at null.
527
10357975
PA
5282009-11-26 Pedro Alves <pedro@codesourcery.com>
529
530 * win32-low.c (LOG): Delete.
531 (OUTMSG): Output to stderr.
532 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
533 on compile time LOG macro.
534 (win32_wait): Fix debug output.
535
cf6e3471
PA
5362009-11-26 Pedro Alves <pedro@codesourcery.com>
537
538 * win32-low.c (win32_add_one_solib): If the dll name is
539 "ntdll.dll", prepend the system directory to the dll path.
540
0c85e18e
MK
5412009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
542
543 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
544
9ac544ce 5452009-11-17 Nathan Sidwell <nathan@codesourcery.com>
0c85e18e 546 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
547
548 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
549 * configure.ac: Check for __mcoldfire__ and set
550 gdb_cv_m68k_is_coldfire.
551 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
552 reg-cf.o and reg-m68k.o.
553 * configure: Regenerated.
554
fd7dd3e6
PA
5552009-11-16 Pedro Alves <pedro@codesourcery.com>
556
557 * linux-low.c (linux_remove_process): Add `detaching' parameter.
558 Pass it to thread_db_free.
559 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
560 proper `detaching' argument to linux_remove_process.
561 * linux-low.h (thread_db_free): Add `detaching' parameter.
562 * thread-db.c (thread_db_init): Pass false as `detaching' argument
563 to thread_db_free.
564 (thread_db_free): Add `detaching' parameter. Only
565 call td_ta_clear_event if detaching from process.
566
75aa492e
MK
5672009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
568
569 * thread-db.c (thread_db_free): Fix typo.
570
21e1bee4
PP
5712009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
572
573 PR gdb/10838
574 * thread-db.c (thread_db_free): Call td_ta_clear_event.
575
8838b45e
NS
5762009-11-03 Nathan Sidwell <nathan@codesourcery.com>
577
578 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
579 with an i686 compiler.
580 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
581 needed.
582 * configure: Rebuilt.
583
8a35fb51
SL
5842009-10-29 Sandra Loosemore <sandra@codesourcery.com>
585
586 PR gdb/10783
587
588 * server.c (handle_search_memory_1): Correct read_addr initialization
589 in loop for searching subsequent chunks.
590
96f15937
PP
5912009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
592
593 * configure.ac: New --with-libthread-db option.
594 * thread-db.c: Allow direct dependence on libthread_db.
595 (thread_db_free): Adjust.
596 * config.in: Regenerate.
597 * configure: Likewise.
598
5f7d1694
PP
5992009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
600
601 PR gdb/10757
602 * thread-db.c (attach_thread): New function.
603 (maybe_attach_thread): Return success/failure.
604 (find_new_threads_callback): Adjust.
605 (thread_db_find_new_threads): Loop until no new threads.
606
88e3b899
PA
6072009-10-13 Pedro Alves <pedro@codesourcery.com>
608
609 * proc-service.c (ps_lgetregs): Formatting.
610
cdbfd419
PP
6112009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
612
613 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
614 * configure.ac: Adjust.
615 * linux-low.h (struct process_info_private): Move members to struct
616 thread_db.
617 (thread_db_free, thread_db_handle_monitor_command): New prototype.
618 * linux-low.c (linux_remove_process): Adjust.
619 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
620 * server.c (handle_query): Move code ...
621 (handle_monitor_command): ... here. New function.
622 * target.h (struct target_ops): New member.
623 * thread-db.c (struct thread_db): New.
624 (libthread_db_search_path): New variable.
625 (thread_db_create_event, thread_db_enable_reporting)
626 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
627 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
628 (try_thread_db_load_1, dladdr_to_soname): New functions.
629 (try_thread_db_load, thread_db_load_search): New functions.
630 (thread_db_init): Search for libthread_db.
631 (thread_db_free): New function.
632 (thread_db_handle_monitor_command): Likewise.
633 * config.in: Regenerate.
634 * configure: Regenerate.
635
4168d2d6
UW
6362009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
637
638 * spu-low.c (spu_kill): Wait for inferior to terminate.
639 Call clear_inferiors.
640 (spu_detach): Call clear_inferiors.
641
81ecdfbb
RW
6422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
643
644 * aclocal.m4: Regenerate.
645 * config.in: Likewise.
646 * configure: Likewise.
647
0b9ff2c0
UW
6482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
649
650 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
651 (parse_spufs_run): New function.
652 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
653 (ppc_breakpoint_at): Handle SPU breakpoints.
654
efcbbd14
UW
6552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
656
657 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
658 (SPUFS_MAGIC): Define.
659 (spu_enumerate_spu_ids): New function.
660 (linux_qxfer_spu): New function.
661 (linux_target_ops): Install linux_qxfer_spu.
662
f4d9bade
UW
6632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
664
665 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
666 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
667 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
668 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
669 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
670 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
671 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
672 (init_registers_powerpc_cell32l): Add prototype.
673 (init_registers_powerpc_cell64l): Likewise.
674 (ppc_arch_setup): Detect Cell/B.E. architecture.
675
96e946ca
RW
6762009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
677
678 * Makefile.in (datarootdir): New variable.
679
58d6951d
DJ
6802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
681
682 * linux-low.c (linux_write_memory): Update debugging output.
683 * Makefile.in (clean): Add new descriptions.
684 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
685 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
686 * configure.srv: Add new files for arm*-*-linux*.
687 * linux-arm-low.c: Add new declarations.
688 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
689 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
690 (HWCAP_VFPv3D16): New.
691 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
692 instead of __IWMMXT__.
693 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
694 (arm_arch_setup): New.
695 (target_regsets): Remove #ifdef. Add VFP regset.
696 (the_low_target): Use arm_arch_setup.
697
12b42a12
DJ
6982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
699
700 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
701 the main thread again.
702
ac8c974e
AR
7032009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
704
705 Adding Neutrino gdbserver.
706 * configure: Regenerated.
707 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
708 * configure.srv (i[34567]86-*-nto*): New target.
709 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
710 * remote-utils.c [__QNX__]: Include sys/iomgr.h
711 (nto_comctrl) [__QNX__]: New function.
712 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
713
4424e0c3 7142009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
715
716 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
717 srv_tgtobj.
718
912cf4ba
PA
7192009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
720 Pedro Alves <pedro@codesourcery.com>
721
722 * win32-i386-low.c (i386_get_thread_context): Handle systems that
723 don't support CONTEXT_EXTENDED_REGISTERS.
724 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
725 (the_low_target): Install them.
726 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
727 failing with ERROR_PIPE_NOT_CONNECTED.
728
aa5ca48f
DE
7292009-06-30 Doug Evans <dje@google.com>
730 Pierre Muller <muller@ics.u-strasbg.fr>
731
732 Add h/w watchpoint support to x86-linux, win32-i386.
733 * Makefile.in (SFILES): Add i386-low.c
734 (i386_low_h): Define.
735 (i386-low.o): Add dependencies.
736 (linux-x86-low.o): Add i386-low.h dependency.
737 (win32-i386-low.o): Ditto.
738 * i386-low.c: New file.
739 * i386-low.h: New file.
740 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
741 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
742 * linux-low.c (linux_add_process): Initialize arch_private.
743 (linux_remove_process): Free arch_private.
744 (add_lwp): Initialize arch_private.
745 (delete_lwp): Free arch_private.
746 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
747 provided.
748 * linux-low.h (process_info_private): New member arch_private.
749 (lwp_info): New member arch_private.
750 (linux_target_ops): New members new_process, new_thread,
751 prepare_to_resume.
752 (ptid_of): New macro.
753 * linux-x86-low.c: Include stddef.h, i386-low.h.
754 (arch_process_info): New struct.
755 (arch_lwp_info): New struct.
756 (x86_linux_dr_get, x86_linux_dr_set): New functions.
757 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
758 (i386_dr_low_get_status): New function.
759 (x86_insert_point, x86_remove_point): New functions.
760 (x86_stopped_by_watchpoint): New function.
761 (x86_stopped_data_address): New function.
762 (x86_linux_new_process, x86_linux_new_thread): New functions.
763 (x86_linux_prepare_to_resume): New function.
764 (the_low_target): Add entries for insert_point, remove_point,
765 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
766 prepare_to_resume.
767 * server.c (debug_hw_points): New global.
768 (monitor_show_help): Document set debug-hw-points.
769 (handle_query): Process "set debug-hw-points".
770 * server.h (debug_hw_points): Declare.
771 (paddress): Declare.
772 * utils.c (NUMCELLS, CELLSIZE): New macros.
773 (get_sell, xsnprintf, paddress): New functions.
774 * win32-arm-low.c (the_low_target): Add entries for insert_point,
775 remove_point, stopped_by_watchpoint, stopped_data_address.
776 * win32-i386-low.c: Include i386-low.h.
777 (debug_reg_state): Replaces dr.
778 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
779 (i386_dr_low_get_status): New function.
780 (i386_insert_point, i386_remove_point): New functions.
781 (i386_stopped_by_watchpoint): New function.
782 (i386_stopped_data_address): New function.
783 (i386_initial_stuff): Update.
784 (get_thread_context,set_thread_context,i386_thread_added): Update.
785 (the_low_target): Add entries for insert_point,
786 remove_point, stopped_by_watchpoint, stopped_data_address.
787 * win32-low.c (win32_insert_watchpoint): New function.
788 (win32_remove_watchpoint): New function.
789 (win32_stopped_by_watchpoint): New function.
790 (win32_stopped_data_address): New function.
791 (win32_target_ops): Add entries for insert_watchpoint,
792 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
793 * win32-low.h (win32_target_ops): New members insert_point,
794 remove_point, stopped_by_watchpoint, stopped_data_address.
795
d993e290
PA
7962009-06-25 Pedro Alves <pedro@codesourcery.com>
797
798 * server.c (process_serial_event): Re-return unsupported, not
799 error, if the type isn't recognized. Re-allow supporting only
800 insert or remove packets. Also call require_running for
801 breakpoints. Add missing break statement to default case. Tidy.
802 * target.h (struct target_ops): Rename insert_watchpoint to
803 insert_point, and remove_watchpoint to remove_point.
804
805 * linux-low.h (struct linux_target_ops): Likewise.
806 * linux-low.c (linux_insert_watchpoint): Rename to ...
807 (linux_insert_point): ... this. Adjust.
808 (linux_remove_watchpoint): Rename to ...
809 (linux_remove_point): ... this. Adjust.
810 (linux_target_ops): Adjust.
811 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
812 (cris_insert_point): ... this.
813 (cris_remove_watchpoint): Rename to ...
814 (cris_remove_point): ... this.
815 (the_low_target): Adjust.
816
0f54c268
PM
8172009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
818
819 * server.c (handle_v_kill): Pass signal_pid to
820 kill_inferior if multi_process is zero.
821
c6314022
AR
8222009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
823
824 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
825 * target.h (target_ops): Comment for *_watchpoint to make it clear
826 the functions can get types '0' and '1'.
827
4463ce24
AR
8282009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
829
830 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
831 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
832 * regcache.c (get_regcache): Likewise.
833 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
834 * win32-low.c (child_fetch_inferior_registers): Remove check for
835 regno 0.
836
cf8fd78b
PA
8372009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
838 Pedro Alves <pedro@codesourcery.com>
839
840 * target.h (struct target_ops) <supports_multi_process>: New
841 callback.
842 (target_supports_multi_process): New.
843 * server.c (handle_query): Even if GDB reports support, only
844 enable multi-process if the target also supports it. Report
845 multi-process support only if the target backend supports it.
846 * linux-low.c (linux_supports_multi_process): New function.
847 (linux_target_ops): Install it as target_supports_multi_process
848 callback.
849
47c0c975
DE
8502009-05-24 Doug Evans <dje@google.com>
851
e09875d4
DE
852 Global renaming of find_thread_pid to find_thread_ptid.
853 * server.h (find_thread_ptid): Renamed from find_thread_pid.
854 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
855 All callers updated.
856
e27d73f6
DE
857 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
858 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
859 directly.
860
47c0c975
DE
861 * linux-low.c (get_stop_pc): Print pc if debug_threads.
862 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
863 (linux_resume_one_lwp): Ditto.
864
2acc282a
DE
8652009-05-23 Doug Evans <dje@google.com>
866
867 * linux-low.c (linux_resume_one_lwp): Change type of first arg
868 from struct inferior_list_entry * to struct lwp_info *.
869 All callers updated.
870
9f1036c1
DE
8712009-05-13 Doug Evans <dje@google.com>
872
873 * linux-x86-low.c: Don't include assert.h.
874 (x86_siginfo_fixup): Use fatal, not assert.
875 (x86_arch_setup): Fix comment.
876
d0722149
DE
8772009-05-12 Doug Evans <dje@google.com>
878
879 Biarch support for i386/amd64 gdbserver.
880 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
881 Add linux-x86-low.c.
882 (linux-i386-low.o, linux-x86-64-low.o): Delete.
883 (linux-x86-low.o): Add.
884 * linux-x86-64-low.c: Delete.
885 * linux-i386-low.c: Delete.
886 * linux-x86-low.c: New file.
887 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
888 linux-x86-low.o.
889 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
890 linux-x86-low.o.
891 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
892 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
893 (linux_child_pid_to_exec_file): New function.
894 (elf_64_header_p, elf_64_file_p): New functions.
895 (siginfo_fixup): New function.
896 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
897 give target a chance to convert layout.
898 * linux-low.h (linux_target_ops): New member siginfo_fixup.
899 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
900
fdeb2a12
DE
9012009-05-07 Doug Evans <dje@google.com>
902
903 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
904 (regsets_store_inferior_registers): Ditto.
905
a6dbe5df
PA
9062009-05-06 Pedro Alves <pedro@codesourcery.com>
907
908 PR server/10048
909
910 * linux-low.c (must_set_ptrace_flags): Delete.
911 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
912 of the global.
913 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
914 `lwp->must_set_ptrace_flags' instead.
ba42693b 915 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
916 (linux_wait_1): ... not here.
917
5091eb23
DE
9182009-04-30 Doug Evans <dje@google.com>
919
9f767825
DE
920 * inferiors.c (started_inferior_callback): New function.
921 (attached_inferior_callback): New function.
922 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
923 * server.c (print_started_pid, print_attached_pid): New functions.
924 (detach_or_kill_for_exit): New function.
925 (main): Call it instead of for_each_inferior (kill_inferior_callback).
926 * server.h (have_started_inferiors_p): Declare.
927 (have_attached_inferiors_p): Declare.
928
5091eb23
DE
929 * inferiors.c (remove_process): Fix memory leak, free process.
930 * linux-low.c (linux_remove_process): New function.
931 (linux_kill): Call it instead of remove_process.
932 (linux_detach, linux_wait_1): Ditto.
933
155c8968
PA
9342009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
935
936 * configure.srv: Add x86 Windows CE target.
937
7fe519cb
UW
9382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
939
940 * inferiors.c (get_thread_process): Make global.
941 * server.h (get_thread_process): Add prototype.
942 * thread-db.c (find_one_thread): Use get_thread_process
943 instead of current_process.
944 (thread_db_get_tls_address): Do not crash if called when
945 thread layer is not yet initialized.
946
5472f405
UW
9472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
948
949 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
950 * spu-low.c (current_tid): Rename to ...
951 (current_ptid): ... this.
952 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
953 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
954 ptid_get_lwp (current_ptid) instead of current_tid.
955 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
956 instead of current_tid. Use find_process_pid to verify pid
957 argument is valid. Pass proper argument to remove_process.
958 (spu_thread_alive): Compare current_ptid instead of current_tid.
959 (spu_resume): Likewise.
960
55ac2b99
PA
9612009-04-02 Pedro Alves <pedro@codesourcery.com>
962
963 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
964 variable.
965
95954743
PA
9662009-04-01 Pedro Alves <pedro@codesourcery.com>
967
968 Implement the multiprocess extensions, and add linux multiprocess
969 support.
970
971 * server.h (ULONGEST): Declare.
972 (struct ptid, ptid_t): New.
973 (minus_one_ptid, null_ptid): Declare.
974 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
975 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
976 (struct inferior_list_entry): Change `id' type from unsigned from
977 to ptid_t.
978 (struct sym_cache, struct breakpoint, struct
979 process_info_private): Forward declare.
980 (struct process_info): Declare.
981 (current_process): Declare.
982 (all_processes): Declare.
983 (initialize_inferiors): Declare.
984 (add_thread): Adjust to use ptid_t.
985 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
986 (add_process, remove_process, find_thread_pid): Declare.
987 (find_inferior_id): Adjust to use ptid_t.
988 (cont_thread, general_thread, step_thread): Change type to ptid_t.
989 (multi_process): Declare.
990 (push_event): Adjust to use ptid_t.
991 (read_ptid, write_ptid): Declare.
992 (prepare_resume_reply): Adjust to use ptid_t.
993 (clear_symbol_cache): Declare.
994 * inferiors.c (all_processes): New.
995 (null_ptid, minus_one_ptid): New.
996 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
997 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
998 (add_thread): Change unsigned long to ptid. Remove gdb_id
999 parameter. Adjust.
1000 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1001 (gdb_id_to_thread): Rename to ...
1002 (find_thread_pid): ... this. Change unsigned long to ptid.
1003 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1004 (loaded_dll, pull_pid_from_list): Adjust.
1005 (add_process, remove_process, find_process_pid)
1006 (get_thread_process, current_process, initialize_inferiors): New.
1007 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1008 (struct target_waitstatus) <related_pid>: Ditto.
1009 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1010 return type to int.
1011 (struct target_ops) <join>: Add `pid' argument.
1012 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1013 (struct target_ops) <wait>: Add `ptid' field. Change return type
1014 to ptid.
1015 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1016 (mywait): Add `ptid' argument. Change return type to ptid_t.
1017 (target_pid_to_str): Declare.
1018 * target.c (set_desired_inferior): Adjust to use ptids.
1019 (mywait): Add new `ptid' argument. Adjust.
1020 (target_pid_to_str): New.
1021 * mem-break.h (free_all_breakpoints): Declare.
1022 * mem-break.c (breakpoints): Delelete.
1023 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1024 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1025 to use per-process breakpoint list.
1026 (free_all_breakpoints): New.
1027 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1028 (symbol_cache, all_symbols_looked_up): Delete.
1029 (hexchars): New.
1030 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1031 read_ptid): New.
1032 (prepare_resume_reply): Change ptid argument's type from unsigned
1033 long to ptid_t. Adjust. Implement W;process and X;process.
1034 (free_sym_cache, clear_symbol_cache): New.
1035 (look_up_one_symbol): Adjust to per-process symbol cache. *
1036 * server.c (cont_thread, general_thread, step_thread): Change type
1037 to ptid_t.
1038 (attached): Delete.
1039 (multi_process): New.
1040 (last_ptid): Change type to ptid_t.
1041 (struct vstop_notif) <ptid>: Change type to ptid_t.
1042 (queue_stop_reply, push_event): Change `ptid' argument's type to
1043 ptid_t.
1044 (discard_queued_stop_replies): Add `pid' argument.
1045 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1046 changes. Don't reference the `attached' global.
1047 (attach_inferior): Adjust to mywait interface changes.
1048 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1049 features. Handle and report "multiprocess+". Handle
1050 "qAttached:PID".
1051 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1052 changes.
1053 (handle_v_kill): New.
1054 (handle_v_stopped): Adjust to use target_pid_to_str.
1055 (handle_v_requests): Allow multiple attaches and runs when
1056 multiprocess extensions are in effect. Handle "vKill".
1057 (myresume): Adjust to use ptids.
1058 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1059 (handle_status): Adjust to discard_queued_stop_replies interface
1060 change.
1061 (first_thread_of, kill_inferior_callback)
1062 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1063 (main): Call initialize_inferiors. Adjust to use ptids, killing
1064 and detaching from all inferiors. Handle multiprocess packet
1065 variants.
1066 * linux-low.h: Include gdb_proc_service.h.
1067 (struct process_info_private): New.
1068 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1069 <lwpid_of>: Use ptid_get_lwp.
1070 (get_lwp_thread): Adjust.
1071 (struct lwp_info): Add `dead' member.
1072 (find_lwp_pid): Declare.
1073 * linux-low.c (thread_db_active): Delete.
1074 (new_inferior): Adjust comment.
1075 (inferior_pid): Delete.
1076 (linux_add_process): New.
1077 (handle_extended_wait): Adjust.
1078 (add_lwp): Change unsigned long to ptid.
1079 (linux_create_inferior): Add process to processes table. Adjust
1080 to use ptids. Don't set new_inferior here.
1081 (linux_attach_lwp): Rename to ...
1082 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1083 it. Adjust to use ptids.
1084 (linux_attach_lwp): New.
1085 (linux_attach): Add process to processes table. Don't set
1086 new_inferior here.
1087 (struct counter): New.
1088 (second_thread_of_pid_p, last_thread_of_process_p): New.
1089 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1090 multiple processes.
1091 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1092 processes. Remove process from process table.
1093 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1094 to multiple processes.
1095 (any_thread_of): New.
1096 (linux_detach): Add `pid' argument, and handle it. Remove process
1097 from processes table.
1098 (linux_join): Add `pid' argument. Handle it.
1099 (linux_thread_alive): Change unsighed long argument to ptid_t.
1100 Consider dead lwps as not being alive.
1101 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1102 threads we're not interested in.
1103 (same_lwp, find_lwp_pid): New.
1104 (linux_wait_for_lwp): Change `pid' argument's type from int to
1105 ptid_t. Adjust.
1106 (linux_wait_for_event): Rename to ...
1107 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1108 from int to ptid_t. Adjust.
1109 (linux_wait_for_event): New.
1110 (linux_wait_1): Add `ptid' argument. Change return type to
1111 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1112 that exit from the process table.
1113 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1114 Adjust.
1115 (mark_lwp_dead): New.
1116 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1117 stopping all threads, mark its main lwp as dead.
1118 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1119 ptids.
1120 (fetch_register, usr_store_inferior_registers)
1121 (regsets_fetch_inferior_registers)
1122 (regsets_store_inferior_registers, linux_read_memory)
1123 (linux_write_memory): Inline `inferior_pid'.
1124 (linux_look_up_symbols): Adjust to use per-process
1125 `thread_db_active'.
1126 (linux_request_interrupt): Adjust to use ptids.
1127 (linux_read_auxv): Inline `inferior_pid'.
1128 (initialize_low): Don't reference thread_db_active.
1129 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1130 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1131 (ps_getpid): Return the pid of the current inferior.
1132 * thread-db.c (proc_handle, thread_agent): Delete.
1133 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1134 per-process data.
1135 (find_one_thread): Change argument type to ptid_t. Adjust to
1136 per-process data.
1137 (maybe_attach_thread): Adjust to per-process data and ptids.
1138 (thread_db_find_new_threads): Ditto.
1139 (thread_db_init): Ditto.
1140 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1141 processes table. Adjust to use ptids.
1142 (spu_kill, spu_detach): Adjust interface. Remove process from
1143 processes table.
1144 (spu_join, spu_thread_alive): Adjust interface.
1145 (spu_wait): Adjust interface. Remove process from processes
1146 table. Adjust to use ptids.
1147 * win32-low.c (current_inferior_tid): Delete.
1148 (current_inferior_ptid): New.
1149 (debug_event_ptid): New.
1150 (thread_rec): Take a ptid. Adjust.
1151 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1152 (child_delete_thread): Ditto.
1153 (do_initial_child_stuff): Add `attached' argument. Add process to
1154 processes table.
1155 (child_fetch_inferior_registers, child_store_inferior_registers):
1156 Adjust.
1157 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1158 (win32_attach): Pass 1 to do_initial_child_stuff.
1159 (win32_kill): Adjust interface. Remove process from processes
1160 table.
1161 (win32_detach): Ditto.
1162 (win32_join): Adjust interface.
1163 (win32_thread_alive): Take a ptid.
1164 (win32_resume): Adjust to use ptids.
1165 (get_child_debug_event): Ditto.
1166 (win32_wait): Adjust interface. Remove exiting process from
1167 processes table.
1168
bd99dc85
PA
11692009-04-01 Pedro Alves <pedro@codesourcery.com>
1170
1171 Non-stop mode support.
1172
1173 * server.h (non_stop): Declare.
1174 (gdb_client_data, handler_func): Declare.
1175 (delete_file_handler, add_file_handler, start_event_loop):
1176 Declare.
1177 (handle_serial_event, handle_target_event, push_event)
1178 (putpkt_notif): Declare.
1179 * target.h (enum resume_kind): New.
1180 (struct thread_resume): Replace `step' field by `kind' field.
1181 (TARGET_WNOHANG): Define.
1182 (struct target_ops) <wait>: Add `options' argument.
1183 <supports_non_stop, async, start_non_stop>: New fields.
1184 (target_supports_non_stop, target_async): New.
1185 (start_non_stop): Declare.
1186 (mywait): Add `options' argument.
1187 * target.c (mywait): Add `options' argument. Print child exit
1188 notifications here.
1189 (start_non_stop): New.
1190 * server.c (non_stop, own_buf, mem_buf): New globals.
1191 (struct vstop_notif): New.
1192 (notif_queue): New global.
1193 (queue_stop_reply, push_event, discard_queued_stop_replies)
1194 (send_next_stop_reply): New.
1195 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1196 interface changes.
1197 (attach_inferior): In non-stop mode, don't wait for the target
1198 here.
1199 (handle_general_set): Handle QNonStop.
1200 (handle_query): When handling qC, return the current general
1201 thread, instead of the first thread of the list.
1202 (handle_query): If the backend supports non-stop mode, include
1203 QNonStop+ in the qSupported query response.
1204 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1205 and non-stop mode.
1206 (handle_v_attach, handle_v_run): Handle non-stop mode.
1207 (handle_v_stopped): New.
1208 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1209 (myresume): Adjust to use resume_kind. Handle non-stop.
1210 (queue_stop_reply_callback): New.
1211 (handle_status): Handle non-stop mode.
1212 (main): Clear non_stop flag on reconnection. Use the event-loop.
1213 Refactor serial protocol handling from here ...
1214 (process_serial_event): ... to this new function. When GDB
1215 selects any thread, select one here. In non-stop mode, wait until
1216 GDB acks all pending events before exiting.
1217 (handle_serial_event, handle_target_event): New.
1218 * remote-utils.c (remote_open): Install remote_desc in the event
1219 loop.
1220 (remote_close): Remove remote_desc from the event loop.
1221 (putpkt_binary): Rename to...
1222 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1223 (putpkt_binary): New as wrapper around putpkt_binary_1.
1224 (putpkt_notif): New.
1225 (prepare_resume_reply): In non-stop mode, don't change the
1226 general_thread.
1227 * event-loop.c: New.
1228 * Makefile.in (OBJ): Add event-loop.o.
1229 (event-loop.o): New rule.
1230
1231 * linux-low.h (pid_of): Moved here.
1232 (lwpid_of): New.
1233 (get_lwp_thread): Use lwpid_of.
1234 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1235 * linux-low.c (pid_of): Delete.
1236 (inferior_pid): Use lwpid_of.
1237 (linux_event_pipe): New.
1238 (target_is_async_p): New.
1239 (delete_lwp): New.
1240 (handle_extended_wait): Use lwpid_of.
1241 (add_lwp): Don't set lwpid field.
1242 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1243 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1244 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1245 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1246 first. Adjust to linux_wait_for_event interface changes. Use
1247 lwpid_of.
1248 (linux_detach): Don't delete the main lwp here.
1249 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1250 (status_pending_p): Don't consider explicitly suspended lwps.
1251 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1252 pointer. Add OPTIONS argument. Change return type to int. Use
1253 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1254 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1255 pointer. Add status pointer argument. Return a pid instead of a
1256 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1257 changes. In non-stop mode, don't switch to a random thread.
1258 (linux_wait): Rename to...
1259 (linux_wait_1): ... this. Add target_options argument, and handle
1260 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1261 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1262 clean exit and signal exit code. Don't stop all threads in
1263 non-stop mode. In all-stop mode, only stop all threads when
1264 reporting a stop to GDB. Handle explicit thread stop requests.
1265 (async_file_flush, async_file_mark): New.
1266 (linux_wait): New.
1267 (send_sigstop): Use lwpid_of.
1268 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1269 interface changes. In non-stop mode, don't switch to a random
1270 thread.
1271 (linux_resume_one_lwp): Use lwpid_of.
1272 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1273 (linux_resume_one_thread): ... this. Handle resume_stop. In
1274 non-stop mode, don't look for pending flag in all threads.
1275 (resume_status_pending_p): Don't consider explicitly suspended
1276 threads.
1277 (my_waitpid): Reimplement. Emulate __WALL.
1278 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1279 Use lwpid_of.
1280 (sigchld_handler, linux_supports_non_stop, linux_async)
1281 (linux_start_non_stop): New.
1282 (linux_target_ops): Register linux_supports_non_stop, linux_async
1283 and linux_start_non_stop.
1284 (initialize_low): Install SIGCHLD handler.
1285 * thread-db.c (thread_db_create_event, find_one_thread)
1286 (thread_db_get_tls_address): Use lwpid_of.
1287 * win32-low.c (win32_detach): Adjust to use resume_kind.
1288 (win32_wait): Add `options' argument.
1289 * spu-low.c (spu_resume): Adjust to use resume_kind.
1290 (spu_wait): Add `options' argument.
1291
5b1c542e
PA
12922009-04-01 Pedro Alves <pedro@codesourcery.com>
1293
1294 Decouple target code from remote protocol.
1295
1296 * target.h (enum target_waitkind): New.
1297 (struct target_waitstatus): New.
1298 (struct target_ops) <wait>: Return an unsigned long. Take a
1299 target_waitstatus pointer instead of a char pointer.
1300 (mywait): Likewise.
1301 * target.c (mywait): Change prototype to return an unsigned long.
1302 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1303 * server.h (thread_from_wait, old_thread_from_wait): Delete
1304 declarations.
1305 (prepare_resume_reply): Change prototype to take a
1306 target_waitstatus.
1307 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1308 (last_status, last_ptid): New.
1309 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1310 pid instead of a signal.
1311 (attach_inferior): Remove "status" and "signal" parameters.
1312 Adjust.
1313 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1314 not as an address.
1315 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1316 (handle_v_requests, myresume): Remove "status" and "signal"
1317 parameters. Adjust.
1318 (handle_status): New.
1319 (main): Delete local `status'. Adjust.
1320 * remote-utils.c: Include target.h.
1321 (prepare_resume_reply): Change prototype to take a
1322 target_waitstatus. Adjust.
1323
1324 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1325 interface.
1326 * spu-low.c (spu_wait): Adjust.
1327 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1328 Delete.
1329 (win32_wait): Adjust.
1330
2bd7c093
PA
13312009-04-01 Pedro Alves <pedro@codesourcery.com>
1332
1333 * target.h (struct thread_resume): Delete leave_stopped member.
1334 (struct target_ops): Add a `n' argument to the `resume' callback.
1335 * server.c (start_inferior): Adjust.
1336 (handle_v_cont, myresume): Adjust.
1337 * linux-low.c (check_removed_breakpoint): Adjust to resume
1338 interface change, and to removed leave_stopped field.
1339 (resume_ptr): Delete.
1340 (struct thread_resume_array): New.
1341 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1342 resume interface change.
1343 (linux_continue_one_thread, linux_queue_one_thread)
1344 (resume_status_pending_p): Check if the resume field is NULL
1345 instead of checking the leave_stopped member.
1346 (linux_resume): Adjust to the target resume interface change.
1347 * spu-low.c (spu_resume): Adjust to the target resume interface
1348 change.
1349 * win32-low.c (win32_detach, win32_resume): Ditto.
1350
c35fafde
PA
13512009-04-01 Pedro Alves <pedro@codesourcery.com>
1352
1353 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1354 flag.
1355 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1356 pending.
1357 (linux_continue_one_thread): Only preserve the stepping flag if
1358 there's a pending breakpoint.
1359
0a59d50b
PA
13602009-03-31 Pedro Alves <pedro@codesourcery.com>
1361
1362 * server.c (main): After the inferior having exited, call
1363 remote_close before exiting gdbserver.
1364
f04c6d38
TJB
13652009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1366
1367 Fix size of FPSCR in Power 7 processors.
1368 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1369 (PPC_FEATURE_HAS_DFP): New #define.
1370 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1371 size of the FPSCR.
1372
78e5cee6
PA
13732009-03-23 Pedro Alves <pedro@codesourcery.com>
1374
1375 * server.c (handle_query) Whitespace and formatting.
1376
1b3f6016
PA
13772009-03-22 Pedro Alves <pedro@codesourcery.com>
1378
1379 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1380 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1381 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1382 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1383 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1384 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1385 Makefile.in, configure.ac: Fix whitespace throughout.
1386 * configure: Regenerate.
1387
a07b2135
PA
13882009-03-22 Pedro Alves <pedro@codesourcery.com>
1389
1390 * inferiors.c (find_inferior): Make it safe for the callback
1391 function to delete the currently iterated inferior.
1392
67cc2626
PA
13932009-03-22 Pedro Alves <pedro@codesourcery.com>
1394
1395 * Makefile.in (linuw_low_h): Move higher.
1396 (thread-db.o): Depend on $(linux_low_h).
1397
54a0b537
PA
13982009-03-17 Pedro Alves <pedro@codesourcery.com>
1399
1400 Rename "process" to "lwp" throughout.
1401
1402 * linux-low.c (all_processes): Rename to...
1403 (all_lwps): ... this.
1404 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1405 (add_process): Rename to ...
1406 (add_lwp): ... this. Adjust.
1407 (linux_create_inferior): Adjust.
1408 (linux_attach_lwp): Adjust.
1409 (linux_attach): Adjust.
1410 (linux_kill_one_process): Rename to ...
1411 (linux_kill_one_lwp): ... this. Adjust.
1412 (linux_kill): Adjust.
1413 (linux_detach_one_process): Rename to ...
1414 (linux_detach_one_lwp): ... this. Adjust.
1415 (linux_detach): Adjust.
1416 (check_removed_breakpoint): Adjust.
1417 (status_pending_p): Adjust.
1418 (linux_wait_for_process): Rename to ...
1419 (linux_wait_for_lwp): ... this. Adjust.
1420 (linux_wait_for_event): Adjust.
1421 (send_sigstop): Adjust.
1422 (wait_for_sigstop): Adjust.
1423 (stop_all_processes): Rename to ...
1424 (stop_all_lwps): ... this.
1425 (linux_resume_one_process): Rename to ...
1426 (linux_resume_one_lwp): ... this. Adjust.
1427 (linux_set_resume_request, linux_continue_one_thread)
1428 (linux_queue_one_thread, resume_status_pending_p)
1429 (usr_store_inferior_registers, regsets_store_inferior_registers)
1430 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1431 Adjust.
1432 * linux-low.h (get_process): Rename to ...
1433 (get_lwp): ... this. Adjust.
1434 (get_thread_process): Rename to ...
1435 (get_thread_lwp): ... this. Adjust.
1436 (get_process_thread): Rename to ...
1437 (get_lwp_thread): ... this. Adjust.
1438 (struct process_info): Rename to ...
1439 (struct lwp_info): ... this.
1440 (all_processes): Rename to ...
1441 (all_lwps): ... this.
1442 * proc-service.c (ps_lgetregs): Adjust.
1443 * thread-db.c (thread_db_create_event, find_one_thread)
1444 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1445
0b16c5cf
PA
14462009-03-14 Pedro Alves <pedro@codesourcery.com>
1447
1448 * server.c (handle_query): Handle "qAttached".
1449
32de4b9d
NS
14502009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1451
1452 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1453 GPLv3, update license URL.
1454
2aecd87f
DE
14552009-03-01 Doug Evans <dje@google.com>
1456
93efd302 1457 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
1458 (server_h): Add gdb_signals.h.
1459 (signals.o): Update.
1460 * server.h (target_signal_from_host,target_signal_to_host_p)
1461 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1462
86b1f9c5
PM
14632009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1464
1465 * remote-utils.c (getpkt): Also generate remote-debug
1466 information if noack_mode is set.
1467
4aa995e1
PA
14682009-02-06 Pedro Alves <pedro@codesourcery.com>
1469
1470 * server.c (handle_query): Report qXfer:siginfo:read and
1471 qXfer:siginfo:write as supported and handle them.
1472 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1473 * linux-low.c (linux_xfer_siginfo): New.
1474 (linux_target_ops): Set it.
1475
62709adf
PA
14762009-01-26 Pedro Alves <pedro@codesourcery.com>
1477
1478 * server.c (gdbserver_usage): Mention --remote-debug.
1479 (main): Accept '--remote-debug' switch.
1480
aef93bd7
DE
14812009-01-18 Doug Evans <dje@google.com>
1482
1483 * regcache.c (new_register_cache): No need to check result of xcalloc.
1484 * server.c (handle_search_memory): Back out calls to xmalloc,
1485 result is checked and error is returned to user upon failure.
1486 (handle_query): Ditto. Add more checks for result of malloc.
1487 (handle_v_cont): Check result of malloc, report error back to
1488 user upon failure.
1489 (handle_v_run): Ditto. Call freeargv.
1490 * server.h (freeargv): Declare.
1491 * utils.c (freeargv): New fn.
1492
54363045
DE
14932009-01-15 Doug Evans <dje@google.com>
1494
f626972c
DE
1495 * gdbreplay.c (perror_with_name): Make arg const char *.
1496 * server.h (target_signal_to_name): Make return type const char *.
0842e787 1497 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 1498 * utils.c (perror_with_name): Make arg const char *.
54363045 1499
18aae699
PA
15002009-01-14 Pedro Alves <pedro@codesourcery.com>
1501
1502 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1503 when handling a EXIT_PROCESS_DEBUG_EVENT.
1504
ff703abe
JB
15052009-01-06 Joel Brobecker <brobecker@adacore.com>
1506
1507 * gdbreplay.c (gdbreplay_version): Update copyright year.
1508 * server.c (gdbserver_version): Likewise.
1509
f21cc1a2 15102009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
1511
1512 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 1513 (handle_extended_wait): Improve comment.
0e21c1ec 1514
bca929d3
DE
15152008-12-13 Doug Evans <dje@google.com>
1516
1517 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1518 * server.h (ATTR_MALLOC): New macro.
1519 (xmalloc,xcalloc,xstrdup): Declare.
1520 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1521 * inferiors.c: Ditto.
1522 * linux-low.c: Ditto.
1523 * mem-break.c: Ditto.
1524 * regcache.c: Ditto.
1525 * remote-utils.c: Ditto.
1526 * server.c: Ditto.
1527 * target.c: Ditto.
1528 * win32-low.c: Ditto.
1529
97438e3f
DE
15302008-12-12 Doug Evans <dje@google.com>
1531
896c7fbb
DE
1532 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1533 in debugging printf.
1534
97438e3f
DE
1535 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1536
e3b886f8
DE
15372008-12-09 Doug Evans <dje@google.com>
1538
1539 * linux-low.h (struct process_info): Delete member tid, unused.
1540 * thread-db.c (find_one_thread): Update.
1541 (maybe_attach_thread): Update.
1542
07e059b5
VP
15432008-12-02 Pedro Alves <pedro@codesourcery.com>
1544
1545 * target.h (struct target_ops): Add qxfer_osdata member.
1546 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1547 and dirent.h.
1548 (linux_qxfer_osdata): New functions.
1549 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1550 callback.
1551 * server.c (handle_query): Handle "qXfer:osdata:read:".
1552 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1553 (buffer_xml_printf): New functions.
1554 * server.h (struct buffer): New.
1555 (buffer_grow_str, buffer_grow_str0): New macros.
1556 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1557 (buffer_xml_printf): Declare.
1558
4cab47ab
DE
15592008-11-24 Doug Evans <dje@google.com>
1560
1561 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1562
f142445f
DJ
15632008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1564
1565 * server.c (handle_v_run): Always use the supplied argument list.
1566
d0107bb6
BW
15672008-11-19 Bob Wilson <bob.wilson@acm.org>
1568
1569 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1570 (xtensa_regmap_table): Add entry for scompare1.
1571
2c4ad781
TJB
15722008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1573
1574 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1575 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1576 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1577 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1578 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1579 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1580 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1581 XML target descriptions.
1582 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1583 when inferior is running on an ISA 2.05 or later processor. Add
1584 special case to return offset for full 64-bit slot of FPSCR when
1585 in 32-bits.
1586
dfb64f85
DJ
15872008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1588
1589 * Makefile.in (SFILES, clean): Added sparc64 files.
1590 (reg-sparc64.o, reg-sparc64.c): New.
1591 * configure.srv (sparc*-*-linux*): New configuration.
1592 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1593 syscall arguments for SPARC.
1594 (regsets_store_inferior_registers): Likewise.
1595 * linux-sparc-low.c: New file.
1596
66b6e1dd
DE
15972008-10-21 Doug Evans <dje@google.com>
1598
1599 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1600 (READLINE_DIR,READLINE_DEP): Delete.
1601 (INTERNAL_CFLAGS): Update.
1602 (LINTFLAGS): Update.
1603
9b710a42
PA
16042008-10-10 Pedro Alves <pedro@codesourcery.com>
1605
1606 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1607 whole argv from the last run, not just argv[0].
1608
5822d809
PA
16092008-09-08 Pedro Alves <pedro@codesourcery.com>
1610
1611 * regcache.c (new_register_cache): Return NULL if the register
1612 cache size isn't known yet.
1613 (free_register_cache): Avoid dereferencing a NULL regcache.
1614
74aac56f
DJ
16152008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1616
1617 * configure.srv: Merge MIPS and MIPS64.
1618
400b20f5
MR
16192008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1620
1621 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1622
677c5bb1
LM
16232008-08-18 Luis Machado <luisgpm@br.ibm.com>
1624
1625 * Makefile.in: Add required vsx dependencies.
1626
1627 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1628 Declare init_registers_powerpc_vsx32l.
1629 Declare init_registers_powerpc_vsx64l.
1630 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1631 (ppc_arch_setup): Check for VSX in hwcap.
1632 (ppc_fill_vsxregset): New function.
1633 (ppc_store_vsxregset): New function.
1634 Add new VSX entry in regset_info target_regsets.
1635
1636 * configure.srv: Add new VSX dependencies.
1637
a6f3e723
SL
16382008-08-12 Pedro Alves <pedro@codesourcery.com>
1639
1640 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1641 (remote_open): Set or clear transport_is_reliable.
1642 (putpkt_binary): Don't expect acks in noack mode.
1643 (getpkt): Don't send ack/nac in noack mode.
1644 * server.c (handle_general_set): Handle QStartNoAckMode.
1645 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1646 qSupported.
1647 (main): Reset noack_mode on every connection.
1648 * server.h (noack_mode): Declare.
1649
a417dc56
RW
16502008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1651
1652 * Makefile.in (GDBREPLAY_OBS): New variable.
1653 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1654
3221518c
UW
16552008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1656 Daniel Jacobowitz <dan@codesourcery.com>
1657
1658 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1659 (usr_store_inferior_registers): Likewise.
1660 (regsets_store_inferior_registers): Likewise.
1661
ec56be1b
PA
16622008-07-31 Rolf Jansen <rj@surtec.com>
1663 Pedro Alves <pedro@codesourcery.com>
1664
1665 * configure.ac: Check for memmem declaration.
1666 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1667 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1668 (disable_packet_qfThreadInfo): Unconditionally compile.
1669 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1670 * configure, config.in: Regenerate.
1671
2fe5e3ff
DE
16722008-07-28 Doug Kwan <dougkwan@google.com>
1673
1674 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1675 (linux_write_memory): Remove declaration of errno.
1676
836acd6d
UW
16772008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1678
1679 * linux-low.c (handle_extended_wait): Do not use "status"
1680 variable uninitialized.
1681
aeba519e
PA
16822008-07-07 Pedro Alves <pedro@codesourcery.com>
1683
1684 * server.c (handle_v_attach): Inhibit reporting dll changes.
1685
db42f210
PA
16862008-06-27 Pedro Alves <pedro@codesourcery.com>
1687
1688 * remote-utils.c (prepare_resume_reply): If requested, don't
1689 output "thread:TID" in the T stop reply.
1690
1691 * server.c (disable_packet_vCont, disable_packet_Tthread)
1692 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1693 (handle_query): If requested, disable support for qC, qfThreadInfo
1694 and qsThreadInfo.
1695 (handle_v_requests): If requested, disable support for vCont.
1696 (gdbserver_show_disableable): New.
1697 (main): Handle --disable-packet and --disable-packet=LIST.
1698
1699 * server.h (disable_packet_vCont, disable_packet_Tthread)
1700 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1701
8e4c5421
CD
17022008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1703
1704 * server.c (gdbserver_usage): Mention --version.
1705
6e23a804
DJ
17062008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1707
1708 * Makefile.in (gdbreplay.o): New rule.
1709
90aa6a40
JM
17102008-06-06 Joseph Myers <joseph@codesourcery.com>
1711
1712 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1713 message, not gdbserver.
1714
c16158bc
JM
17152008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1716 Nathan Sidwell <nathan@codesourcery.com>
1717 Joseph Myers <joseph@codesourcery.com>
1718
1719 * acinclude.m4: Include ../../config/acx.m4.
1720 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1721 * configure, config.in: Regenerate.
1722 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1723 * server.c (gdbserver_version): Print PKGVERSION.
1724 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1725 (main): Adjust gdbserver_usage calls.
1726 * gdbreplay.c (version, host_name): Add declarations.
1727 (gdbreplay_version, gdbreplay_usage): New.
1728 (main): Accept --version and --help options.
1729
aeb75bf5
DJ
17302008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1731
1732 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1733 (arm_breakpoint_at): Handle Thumb.
1734 (the_low_target): Add comment.
1735
76b233dd
UW
17362008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1737
1738 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1739
08388c79
DE
17402008-05-09 Doug Evans <dje@google.com>
1741
a3c83fae
DE
1742 * server.h (decode_search_memory_packet): Declare.
1743 * remote-utils.c (decode_search_memory_packet): New fn.
1744 * server.c (handle_search_memory_1): New fn.
08388c79
DE
1745 (handle_search_memory): New fn.
1746 (handle_query): Process qSearch:memory packets.
1747
bb9c3d36
UW
17482008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1749
1750 * regcache.c (registers_length): Remove.
1751 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1752 full register packet.
1753 * regcache.h (registers_length): Remove prototype.
1754 * server.h (PBUFSIZ): Define to 16384.
1755
7284e1be
UW
17562008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1757
1758 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1759 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1760 powerpc-64l.o, and powerpc-altivec64l.o.
1761 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1762 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1763 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1764 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1765 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1766 to srv_xmlfiles.
1767
1768 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1769 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1770 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1771 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1772 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1773 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1774 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1775 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1776 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1777 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1778 (clean): Update.
1779
1780 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1781 (init_registers_powerpc_32l): ... this new prototype.
1782 (init_registers_powerpc_32): Remove, replace by ...
1783 (init_registers_powerpc_altivec32l): ... this new prototype.
1784 (init_registers_powerpc_e500): Remove, replace by ...
1785 (init_registers_powerpc_e500l): ... this new prototype.
1786 (init_registers_ppc64): Remove, replace by ...
1787 (init_registers_powerpc_64l): ... this new prototype.
1788 (init_registers_powerpc_64): Remove, replace by ...
1789 (init_registers_powerpc_altivec64l): ... this new prototype.
1790 (ppc_num_regs): Set to 73.
1791 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1792 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1793 (ppc_cannot_store_register): Handle orig_r3 and trap.
1794 (ppc_arch_setup): Update init_registers_... calls.
1795 (ppc_fill_gregset): Handle orig_r3 and trap.
1796
1797 * inferiors.c (clear_inferiors): Reset current_inferior.
1798
fdc59709
PB
17992008-04-23 Paolo Bonzini <bonzini@gnu.org>
1800
1801 * acinclude.m4: Add override.m4.
1802 * configure: Regenerate.
1803
c9b2f845
UW
18042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1805
1806 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1807 initial call to init_register_ppc64.
1808
550512b8
UW
18092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1810
1811 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1812 powerpc*-*-linux* case.
1813 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1814
b6430ec3
UW
18152008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1816
1817 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1818 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1819 from reg_xmlfiles.
1820 * linux-ppc-low.c: Include <elf.h>.
1821 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1822 (ppc_hwcap): New global variable.
1823 (ppc_regmap): Remove __SPE__ #ifdef sections.
1824 (ppc_regmap_e500): New global variable.
1825 (ppc_cannot_store_register): Update __SPE__ special case.
1826 (ppc_get_hwcap): New function.
1827 (ppc_arch_setup): Use it to determine whether inferior supports
1828 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1829 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1830 Do not access registers if target does not support AltiVec.
1831 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1832 Do not access registers if target does not support SPE.
1833 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1834
52fa2412
UW
18352008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1836
1837 * linux-low.c (disabled_regsets, num_regsets): New.
1838 (use_regsets_p): Delete.
1839 (linux_wait_for_process): Clear disabled_regsets.
1840 (regsets_fetch_inferior_registers): Check and set it.
1841 (regsets_store_inferior_registers): Likewise.
1842 (linux_fetch_registers, linux_store_registers): Do not use
1843 use_regsets_p.
1844 (initialize_low): Allocate disabled_regsets.
1845
e28b3332
DJ
18462008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1847
1848 * Makefile.in (LIBOBJS): New.
1849 (OBS): Use LIBOBJS.
1850 (memmem.o): New rule.
1851 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1852 * configure: Regenerated.
1853
4536995d
UW
18542008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1855
1856 * server.c (handle_query): Never return "unsupported" for
1857 qXfer:features:read queries.
1858
221c031f
UW
18592008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1860
1861 * server.c (get_features_xml): Fix inverted condition.
1862 (handle_query): Always support qXfer:feature:read.
1863
ccd213ac
DJ
18642008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1865
1866 * server.c (wrapper_argv): New.
1867 (start_inferior): Handle wrapper_argv. If set, expect an extra
1868 trap.
1869 (gdbserver_usage): Document --wrapper.
1870 (main): Parse --wrapper.
1871
6fe305f7
UW
18722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1873
1874 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1875 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1876 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1877 (ppc_set_pc): Likewise.
1878 (ppc_arch_setup): New function.
1879 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1880 of collect_register.
1881 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1882
5b0a002e
UW
18832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1884
1885 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1886 instead of linux-ppc64-low.o.
1887 * linux-ppc64-low.c: Remove file.
1888 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1889 (linux-ppc64-low.o): Remove rule.
1890
1891 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1892 (init_registers_powerpc_64): Likewise.
1893 (ppc_regmap): Conditionally define depending on __powerpc64__.
1894 (ppc_cannot_store_register): Do not special-case "fpscr" when
1895 compiled on __powerpc64__.
1896 (ppc_collect_ptrace_register): New function.
1897 (ppc_supply_ptrace_register): New function.
1898 (ppc_breakpoint): Change type to "unsigned int".
1899 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1900 (the_low_target): Conditionally provide initializers for the
1901 arch_setup member depending on __powerpc64__. Install
1902 collect_ptrace_register and supply_ptrace_register members.
1903
9b4b61c8
UW
19042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1905
1906 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1907 * server.c (gdbserver_xmltarget): Define.
1908 (get_features_xml): Use it to replace "target.xml" and arch_string.
1909
1910 * configure.srv: Remove srv_xmltarget. Add XML files that were
1911 mentioned there to srv_xmlfiles instead. Remove conditional tests
1912 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1913 srv_xmlfiles and srv_regobj to include all possible choices.
1914 * configure.ac (srv_xmltarget): Remove.
1915 (srv_xmlfiles): Do not add "target.xml".
1916 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1917 checks for supplementary target information.
1918 * configure: Regenerate.
1919 * Makefile.in (XML_TARGET): Remove.
1920 (target.xml): Remove rule.
1921 (clean): Do not clean up target.xml.
1922 (.PRECIOUS): Do not mention target.xml.
1923
1924 * target.h (struct target_ops): Remove arch_string member.
1925 * linux-low.c (linux_arch_string): Remove.
1926 (linux_target_ops): Remove arch_string initializer.
1927 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1928 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1929 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1930 * spu-low.c (spu_arch_string): Remove.
1931 (spu_target_ops): Remove arch_string initializer.
1932 * win32-low.c (win32_arch_string): Remove.
1933 (win32_target_ops): Remove arch_string initializer.
1934 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1935 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1936 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1937
ee1a7ae4
UW
19382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1939
1940 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1941 by collect_ptrace_register and supply_ptrace_register hooks.
1942 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1943 instead of checking for the_low_target.left_pad_xfer.
1944 (usr_store_inferior_registers): Use collect_ptrace_register callback
1945 instead of checking for the_low_target.left_pad_xfer.
1946
1947 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1948 (s390_supply_ptrace_register): Likewise.
1949 (s390_fill_gregset): Call s390_collect_ptrace_register.
1950 (the_low_target): Update.
1951
1952 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1953 (ppc_supply_ptrace_register): Likewise.
1954 (the_low_target): Update.
1955
1956 * linux-i386-low.c (the_low_target): Update.
1957 * linux-x86-64-low.c (the_low_target): Update.
1958
d61ddec4
UW
19592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1960
1961 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1962 reg-s390.o and reg-s390x.o.
1963
1964 * linux-low.c (new_inferior): New global variable.
1965 (linux_create_inferior, linux_attach): Set it.
1966 (linux_wait_for_process): Call the_low_target.arch_setup after the
1967 target has stopped for the first time.
1968 (initialize_low): Do not call the_low_target.arch_setup.
1969
1970 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1971 (s390_set_pc): Likewise.
1972 (s390_arch_setup): New function.
1973 (the_low_target): Use s390_arch_setup as arch_setup routine.
1974
1975 * regcache.c (realloc_register_cache): New function.
1976 (set_register_cache): Call it for each existing regcache.
1977
d05b4ac3
UW
19782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1979
1980 * server.h (init_registers): Remove prototype.
1981
1982 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1983 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1984 instead of init_registers ().
1985 * linux-arm-low.c (init_registers_arm): Add prototype.
1986 (init_registers_arm_with_iwmmxt): Likewise.
1987 (the_low_target): Add initializer for arch_setup field.
1988 * linux-cris-low.c (init_registers_cris): Add prototype.
1989 (the_low_target): Add initializer for arch_setup field.
1990 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1991 (the_low_target): Add initializer for arch_setup field.
1992 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1993 (the_low_target): Add initializer for arch_setup field.
1994 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1995 (the_low_target): Add initializer for arch_setup field.
1996 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1997 (the_low_target): Add initializer for arch_setup field.
1998 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1999 (the_low_target): Add initializer for arch_setup field.
2000 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2001 (init_registers_mips64_linux): Likewise.
2002 (the_low_target): Add initializer for arch_setup field.
2003 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2004 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2005 (the_low_target): Add initializer for arch_setup field.
2006 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2007 (init_registers_powerpc_64): Likewise.
2008 (the_low_target): Add initializer for arch_setup field.
2009 * linux-s390-low.c (init_registers_s390): Add prototype.
2010 (init_registers_s390x): Likewise.
2011 (the_low_target): Add initializer for arch_setup field.
2012 * linux-sh-low.c (init_registers_sh): Add prototype.
2013 (the_low_target): Add initializer for arch_setup field.
2014 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2015 (the_low_target): Add initializer for arch_setup field.
2016 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2017 (the_low_target): Add initializer for arch_setup field.
2018
2019 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2020 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2021 instead of init_registers ().
2022 * win32-arm-low.c (init_registers_arm): Add prototype.
2023 (the_low_target): Add initializer for arch_setup field.
2024 * win32-i386-low.c (init_registers_i386): Add prototype.
2025 (the_low_target): Add initializer for arch_setup field.
2026
2027 * spu-low.c (init_registers_spu): Add prototype.
2028 (initialize_low): Call initialie_registers_spu () instead of
2029 initialize_registers ().
2030
fd96d250
PA
20312008-02-19 Pedro Alves <pedro@codesourcery.com>
2032
2033 * server.c (handle_v_requests): When handling the vRun and vAttach
2034 packets, if already debugging a process, don't kill it. Return an
2035 error instead.
2036
d41b6bb4
DJ
20372008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2038
2039 * server.c (handle_query): Correct length check.
2040
5ac588cf
PA
20412008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2042
2043 * win32-low.c (do_initial_child_stuff): Add process handle
2044 parameter. Set current_process_handle and current_process_id from the
2045 parameters. Clear globals.
2046 (win32_create_inferior): Don't set current_process_handle and
2047 current_process_id here. Instead pass them on the call to
2048 do_initial_child_stuff.
2049 (win32_attach): Likewise.
2050 (win32_clear_inferiors): New.
2051 (win32_kill): Don't close the current process handle or the
2052 current thread handle here. Instead call win32_clear_inferiors.
2053 (win32_detach): Don't open a new handle to the process. Call
2054 win32_clear_inferiors.
2055 (win32_join): Don't rely on current_process_handle; open a new
2056 handle using the process id.
2057 (win32_wait): Call win32_clear_inferiors when the inferior process
2058 has exited.
2059
ecd7ecbc
DJ
20602008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2061
2062 * server.c (monitor_show_help): Add "exit".
2063
1525d545
MG
20642008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2065
ecd7ecbc 2066 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
2067 (clean): Add reg-xtensa.c.
2068 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
2069 * configure.srv (xtensa*-*-linux*) New target.
2070 * linux-xtensa-low.c: New.
2071 * xtensa-xtregs.c: New.
1525d545 2072
59a016f0
PA
20732008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2074
2075 * hostio.c: Don't include errno.h.
2076 (errno_to_fileio_errno): Move to hostio-errno.
2077 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2078 error number outputting to the target->hostio_last_error callback.
2079 (hostio_packet_error): Use FILEIO_EINVAL directly.
2080 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2081 calls to hostio_error.
2082 * hostio-errno.c: New.
2083 * server.h (hostio_last_error_from_errno): Declare.
2084 * target.h (target_ops): Add hostio_last_error member.
2085 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2086 as hostio_last_error handler.
2087 * spu-low.c (spu_target_ops): Likewise.
2088 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2089 (wince_hostio_last_error): New functions.
2090 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2091 as hostio_last_error handler.
2092 (win32_target_ops) [!_WIN32_WCE]: Register
2093 hostio_last_error_from_errno as hostio_last_error handler.
2094 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2095 (hostio-errno.o): New rule.
2096 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2097 * configure.srv (srv_hostio_err_objs): New variable. Default to
2098 hostio-errno.o.
2099 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2100 * configure: Regenerate.
2101
2d717e4f
DJ
21022008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2103
2104 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2105 (linux_kill, linux_detach): Clean up the process list.
2106 * remote-utils.c (remote_open): Improve port number parsing.
2107 (putpkt_binary, input_interrupt): Only send interrupts if the target
2108 is running.
2109 * server.c (extended_protocol): Make static.
2110 (attached): Define earlier.
2111 (exit_requested, response_needed, program_argv): New variables.
2112 (target_running): New.
2113 (start_inferior): Clear attached here.
2114 (attach_inferior): Set attached here.
2115 (require_running): Define.
2116 (handle_query): Use require_running and target_running. Implement
2117 "monitor exit".
2118 (handle_v_attach, handle_v_run): New.
2119 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2120 (gdbserver_usage): Update.
2121 (main): Redo argument parsing. Handle --debug and --multi. Handle
2122 --attach along with other options or after the port. Save
2123 program_argv. Support no initial program. Resynchronize
2124 communication with GDB after an error. Handle "monitor exit".
2125 Use require_running and target_running. Always allow the extended
2126 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2127 restart in extended mode.
2128 * README: Refer to the GDB manual. Update --attach usage.
2129
7407e2de
AS
21302007-12-20 Andreas Schwab <schwab@suse.de>
2131
2132 * linux-low.c (STACK_SIZE): Define.
2133 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2134 (linux_test_for_tracefork): Likewise.
2135
b65d95c5
DJ
21362007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2137
2138 * linux-low.c (linux_wait_for_event): Update messages. Do not
2139 reinsert auto-delete breakpoints.
2140 * mem-break.c (struct breakpoint): Change return type of handler to
2141 int.
2142 (set_breakpoint_at): Update handler type.
2143 (reinsert_breakpoint_handler): Return 1 instead of calling
2144 delete_breakpoint.
2145 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2146 setting a new one.
2147 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2148 * mem-break.h (set_breakpoint_at): Update handler type.
2149 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2150 * win32-low.c (auto_delete_breakpoint): New.
2151 (get_child_debug_event): Use it.
2152
4e799345
DJ
21532007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2154
2155 * configure.ac: Check for pread and pwrite.
2156 * hostio.c (handle_pread): Fall back to lseek and read.
2157 (handle_pwrite): Fall back to lseek and write.
2158 * config.in, configure: Regenerated.
2159
27524b67
DJ
21602007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2161
2162 * server.c (myresume): Add own_buf argument.
2163 (main): Update calls.
2164
a20d5e98
DJ
21652007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2166
2167 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2168 * remote-utils.c (remote_open): Do not call disable_async_io.
2169 (block_async_io): Delete.
2170 (unblock_async_io): Make static.
2171 (initialize_async_io): New.
2172 * server.c (handle_v_cont): Handle async I/O here.
2173 (myresume): Likewise. Move other common resume tasks here...
2174 (main): ... from here. Call initialize_async_io. Disable async
2175 I/O before the main loop.
2176 * server.h (initialize_async_io): Declare.
2177 (block_async_io, unblock_async_io): Delete prototypes.
2178 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2179
b79d787e
DJ
21802007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2181
2182 * remote-utils.c (readchar): Allow binary data in received messages.
2183
d97903b2
PA
21842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2185
2186 * win32-low.c (attaching): New global.
2187 (win32_create_inferior): Clear the `attaching' global.
2188 (win32_attach): Set the `attaching' global.
2189 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2190 attaching. Only set a breakpoint at the entry point if not
2191 attaching.
2192
311de423
PA
21932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2194
2195 * server.c (main): Don't report dll events on the initial
2196 connection on attaches.
2197
6c2d16d2
PA
21982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2199
2200 * server.c (main): Relax numerical bases supported for the pid of
2201 the --attach command line argument.
2202
5ca906e6
PA
22032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2204
2205 * win32-low.c (win32_attach): Call OpenProcess before
2206 DebugActiveProcess, not after. Add last error output to error
2207 call.
2208
9c6c8194
PA
22092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2210
2211 * win32-low.c (win32_get_thread_context)
2212 (win32_set_thread_context): New functions.
2213 (thread_rec): Use win32_get_thread_context.
2214 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2215 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2216 field.
2217
4d5d1aaa
PA
22182007-12-03 Leo Zayas
2219 Pedro Alves <pedro_alves@portugalmail.pt>
2220
2221 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2222 global variables.
2223 (child_add_thread): Minor cleanup.
2224 (child_continue): Resume artificially suspended threads before
2225 calling ContinueDebugEvent.
2226 (suspend_one_thread): New.
2227 (fake_breakpoint_event): New.
2228 (get_child_debug_event): Change return type to int. Check here if
2229 gdb sent an interrupt request. If a soft interrupt was requested,
2230 fake a breakpoint event. Return 0 if there is no event to handle,
2231 and 1 otherwise.
2232 (win32_wait): Don't check here if gdb sent an interrupt request.
2233 Ensure there is a valid event to handle.
2234 (win32_request_interrupt): Add soft interruption method as last
2235 resort.
2236
c436e841
PA
22372007-12-03 Leo Zayas
2238 Pedro Alves <pedro_alves@portugalmail.pt>
2239
2240 * win32-low.h (win32_thread_info): Add descriptions to the
2241 structure members. Replace `suspend_count' counter by a
2242 `suspended' flag.
2243 * win32-low.c (thread_rec): Update condition of when to get the
2244 context from the inferior. Rely on ContextFlags being set if it
2245 has already been retrieved. Only suspend the inferior thread if
2246 we haven't already. Warn if that fails.
2247 (continue_one_thread): s/suspend_count/suspended/. Only call
2248 ResumeThread once. Warn if that fails.
2249
e7b5fa67
PA
22502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2251
2252 * win32-low.c (win32_wait): Don't read from the inferior when it
2253 has already exited.
2254
a385171d
PA
22552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2256
2257 * Makefile.in (win32_low_h): New variable.
2258 (win32-low.o): Add dependency on $(win32_low_h).
2259 (win32-arm-low.o, win32-i386-low.o): New rules.
2260
f80c84b3
DJ
22612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2262
2263 * hostio.c: Correct copyright year.
2264
a6b151f1
DJ
22652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2266
2267 * Makefile.in (OBS): Add hostio.o.
2268 (hostio.o): New rule.
2269 * server.h (handle_vFile): Declare.
2270 * hostio.c: New file.
2271 * server.c (handle_v_requests): Take packet_len and new_packet_len
2272 for binary packets. Call handle_vFile.
2273 (main): Update call to handle_v_requests.
2274
f9387fc3
DJ
22752007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2276
2277 * linux-low.c: Include <sched.h>.
2278
51c2684e
DJ
22792007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2280
2281 * linux-low.c (linux_tracefork_grandchild): New.
2282 (linux_tracefork_child): Use clone.
2283 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2284
75f83163
JB
22852007-10-31 Joel Brobecker <brobecker@adacore.com>
2286
2287 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2288
da5898ce
DJ
22892007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2290
2291 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2292
24a09b5f
DJ
22932007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2294
2295 * inferiors.c (change_inferior_id): Delete.
2296 (add_pid_to_list, pull_pid_from_list): New.
2297 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2298 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2299 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2300 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2301 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2302 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2303 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2304 (using_threads): Always set to 1.
2305 (handle_extended_wait): New.
2306 (add_process): Do not set TID.
2307 (linux_create_inferior): Set must_set_ptrace_flags.
2308 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2309 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2310 (linux_thread_alive): Rename TID argument to LWPID.
2311 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2312 (linux_wait_for_event): Do not use TID or check using_threads. Update
2313 call to dead_thread_notify. Call handle_extended_wait.
2314 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2315 (send_sigstop): Delete sigstop_sent.
2316 (wait_for_sigstop): Avoid TID.
2317 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2318 (linux_test_for_tracefork): New.
2319 (linux_lookup_signals): Use thread_db_active and
2320 linux_supports_tracefork_flag.
2321 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2322 * linux-low.h (get_process_thread): Avoid TID.
2323 (struct process_ifo): Move thread_known and tid to the end. Remove
2324 sigstop_sent.
2325 (linux_attach_lwp, thread_db_init): Update prototypes.
2326 * server.h (change_inferior_id): Delete prototype.
2327 (add_pid_to_list, pull_pid_from_list): New prototypes.
2328 * thread-db.c (thread_db_use_events): New.
2329 (find_first_thread): Rename to...
2330 (find_one_thread): ...this. Update callers and messages. Do not
2331 call fatal. Check thread_db_use_events. Do not call
2332 change_inferior_id or new_thread_notify.
2333 (maybe_attach_thread): Update. Do not call new_thread_notify.
2334 (thread_db_init): Set thread_db_use_events. Check use_events.
2335 * utils.c (fatal, warning): Correct message prefix.
2336
30ed0a8f
DJ
23372007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2338
2339 * Makefile.in (clean): Remove new files.
2340 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2341 (powerpc-64.o, powerpc-64.c): New rules.
2342 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2343 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2344 with SPE.
2345 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2346 SPE targets.
2347 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2348 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2349 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2350 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2351 (target_regsets): Add AltiVec and SPE register sets.
2352 * configure.ac: Check for AltiVec and SPE.
2353 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2354 (ppc_fill_vrregset, ppc_store_vrregset): New.
2355 (target_regsets): Add AltiVec register set.
2356 * configure: Regenerated.
2357
fd462a61
DJ
23582007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2359
2360 * linux-low.c (O_LARGEFILE): Define.
2361 (linux_read_memory): Use /proc/PID/mem.
2362 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2363 * configure, config.in: Regenerated.
2364
69f223ed
DJ
23652007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2366
2367 * linux-low.c (linux_wait_for_event): Do not pass signals while
2368 single-stepping.
2369
aec18585
PA
23702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2371
2372 * win32-low.c (create_process): New.
2373 (win32_create_inferior): Use create_process instead of
2374 CreateProcess. If create_process failed retry appending an ".exe"
2375 suffix. Store the GetLastError result immediatelly after
2376 create_process calls and use it on the call to error.
2377
34d86ddd
PA
23782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2379
2380 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2381
5a0e3bd0
JB
23822007-08-23 Joel Brobecker <brobecker@adacore.com>
2383
2384 * configure.ac: Switch license to GPLv3.
2385
f88c79e6
MS
23862007-08-01 Michael Snyder <msnyder@access-company.com>
2387
2388 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2389
6b3d9b83
PA
23902007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2391
2392 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2393 typedef.
2394 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2395 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2396 CloseToolhelp32Snapshot.
2397 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2398 CloseToolhelp32Snapshot.
2399
c588c53c
MS
24002007-07-27 Michael Snyder <michael.snyder@access-company.com>
2401
2402 * server.c (main): Check for inferior exit before main loop.
2403
aa0403d9
PA
24042007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2405
2406 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2407 instead of on tmp_desc.
2408
255e7678
DJ
24092007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2410 Daniel Jacobowitz <dan@codesourcery.com>
2411
2412 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2413 (add_thread): Minor cleanups.
2414 (clear_inferiors): Move lower in the file. Clear the DLL
2415 list.
2416 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2417 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2418 (xml_escape_text): New.
2419 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2420 for qSupported.
2421 (handle_v_cont): Report errors.
2422 (gdbserver_version): Update.
2423 (main): Correct size of own_buf. Do not report initial DLL events.
2424 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2425 (unloaded_dll, xml_escape_text): New.
2426 * win32-low.c (enum target_waitkind): Update comments.
2427 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2428 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2429 (win32_EnumProcessModules, win32_GetModuleInformation)
2430 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2431 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2432 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2433 (win32_Module32First, win32_Module32Next, load_toolhelp)
2434 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2435 (get_child_debug_event): Handle DLL events.
2436 (win32_wait): Likewise.
2437
0d37add9
DJ
24382007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2439
2440 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2441 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2442
45e2715e
PA
24432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2444
2445 * win32-low.c (handle_output_debug_string): Ignore event if not
2446 waiting.
2447
c5674cf1
PA
24482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2449
2450 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2451
2bbe3cc1
DJ
24522007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2453
2454 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2455
ae13219e
DJ
24562007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2457
2458 * inferiors.c (change_inferior_id): Add comment.
2459 * linux-low.c (check_removed_breakpoint): Add an early
2460 prototype. Improve debug output.
2461 (linux_attach): Doc update.
2462 (linux_detach_one_process, linux_detach): Clean up before releasing
2463 each process.
2464 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2465 * linux-low.h (struct process_info): Doc improvement.
2466 * mem-break.c (delete_all_breakpoints): New.
2467 * mem-break.h (delete_all_breakpoints): New prototype.
2468 * thread-db.c (find_first_thread): New.
2469 (thread_db_create_event): Call it instead of
2470 thread_db_find_new_threads. Clean up unused variables.
2471 (maybe_attach_thread): Remove first thread handling.
2472 (thread_db_find_new_threads): Use find_first_thread.
2473 (thread_db_get_tls_address): Likewise.
2474
4105de34
DJ
24752007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2476
2477 * thread-db.c (thread_db_find_new_threads): Add prototype.
2478 (thread_db_create_event): Check for the main thread before adding
2479 a new thread.
2480 (maybe_attach_thread): Only enable event reporting if TID == 0.
2481 (thread_db_get_tls_address): Check for new threads.
2482
2b876972
DJ
24832007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2484
2485 * linux-low.c (linux_create_inferior): Try execv before execvp.
2486 * spu-low.c (spu_create_inferior): Likewise.
2487
7a245884
DJ
24882007-06-13 Mike Frysinger <vapier@gentoo.org>
2489
2490 * linux-low.c (linux_create_inferior): Change execv to execvp.
2491 * spu-low.c (spu_create_inferior): Likewies.
2492
117ce543
DJ
24932007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2494
2495 * Makefile.in (clean): Clean new files instead of deleted ones.
2496 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2497 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2498 rules.
2499 * configure.srv: Specify XML files and new regformats for MIPS and
2500 MIPS64 GNU/Linux.
2501 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2502 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2503 an entry for the restart register.
2504 (mips_cannot_fetch_register, mips_cannot_store_register)
2505 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2506 register names to match the XML descriptions.
2507 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2508 restart register instead of $0.
2509
0e7f50da
UW
25102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2511 Markus Deuling <deuling@de.ibm.com>
2512
2513 * remote-utils.c (decode_xfer_write): New function.
2514 * server.h (decode_xfer_write): Add prototype.
2515 * server.c (handle_query): Add PACKET_LEN argument. Support
2516 qXfer:spu:read and qXfer:spu:write packets.
2517 (main): Pass packet_len to handle_query.
2518 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2519 * target.h (target_ops): Add qxfer_spu.
2520
374c1d38
UW
25212007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2522
2523 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2524 accessing non-seekable spufs files.
2525
bb63802a
UW
25262007-05-16 Markus Deuling <deuling@de.ibm.com>
2527
2528 * server.c (handle_query): Add reply for qC packet.
2529
7390519e
PA
25302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2531 Leo Zayas <lerele@champenstudios@com>
2532
2533 * server.h (check_remote_input_interrupt_request): New function.
2534 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2535 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2536 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2537 (check_remote_input_interrupt_request): New function.
2538 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 2539 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
2540 winapi_GenerateConsoleCtrlEvent): New typedefs.
2541 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2542 to 250 ms.
2543 (win32_wait): Check for remote interrupt request
2544 with check_remote_input_interrupt_request.
2545 (win32_request_interrupt): New function.
2546 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2547
34b34921
PA
25482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2549
2550 * win32-low.c (debug_registers_changed,
2551 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2552 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2553 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2554 (thread_rec): Get context using the low target.
2555 (child_add_thread): Call thread_added on the low target,
2556 which does the same thing.
2557 (regptr): Delete.
2558 (do_initial_child_stuff): Remove debug registers references.
2559 Set context using the low target. Resume threads after
2560 setting the contexts.
2561 (child_continue): Remove dead variable. Remove debug
2562 registers references.
2563 (child_fetch_inferior_registers): Go through the low target.
2564 (do_child_store_inferior_registers): Remove.
2565 (child_store_inferior_registers): Go through the low target.
2566 (win32_resume): Remove debug registers references.
2567 Set context using the low target.
2568 (handle_exception): Change return type to void. Don't record
2569 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2570 first chance exception.
2571 (get_child_debug_event): Change return type to void. Remove
2572 goto loop. Always return after waiting for debug event.
2573 (win32_wait): Convert to switch statement. Handle spurious
2574 events.
2575
2576 * win32-i386-low.c (debug_registers_changed,
2577 debug_registers_used): New.
2578 (initial_stuff): Rename to ...
2579 (i386_initial_stuff): ... this. Clear debug registers
2580 state variables.
2581 (store_debug_registers): Delete.
2582 (i386_get_thread_context): New.
2583 (load_debug_registers): Delete.
2584 (i386_set_thread_context): New.
2585 (i386_thread_added): New.
2586 (single_step): Rename to ...
2587 (i386_single_step): ... this.
2588 (do_fetch_inferior_registers): Rename to ...
2589 (i386_fetch_inferior_register): ... this.
2590 (i386_store_inferior_register): New.
2591 (the_low_target): Adapt to new interface.
2592
2593 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2594 (arm_get_thread_context): New.
2595 (arm_set_thread_context): New.
2596 (regptr): New.
2597 (do_fetch_inferior_registers): Rename to ...
2598 (arm_fetch_inferior_register): ... this.
2599 (arm_store_inferior_register): New.
2600 (arm_wince_breakpoint): Reimplement as unsigned long.
2601 (arm_wince_breakpoint_len): Define.
2602 (the_low_target): Adapt to new interface.
2603
2604 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2605 load_debug_registers. Add get_thread_context, set_thread_context,
2606 thread_added and store_inferior_register. Rename
2607 fetch_inferior_registers to fetch_inferior_register.
2608 (regptr): Remove declaration.
2609
dd6953e1
PA
26102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2611
2612 * linux-low.c (linux_detach): Change return type to int. Return 0.
2613 * spu-low.c (spu_detach): Likewise.
2614
444d6139
PA
26152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2616
2617 * target.h (target_ops): Change return type of detach to int.
2618 Add join.
2619 (join_inferior): New.
2620 * server.c (main): Don't skip detach support on mingw32.
2621 If the inferior doesn't support detaching return error.
2622 Call join_inferior instead of using waitpid.
2623 * linux-low.c (linux_join): New.
2624 (linux_target_op): Add linux_join.
2625 * spu-low.c (spu_join): New.
2626 (spu_target_ops): Add spu_join.
2627 * win32-low.c (win32_detach): Adapt to new interface.
2628 Reopen current_process_handle before detaching. Issue a child
2629 resume before detaching.
2630 (win32_join): New.
2631 (win32_target_op): Add win32_join.
2632
1d5315fe
PA
26332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2634
2635 * win32-low.c (win32-attach): Fix return value.
2636 * target.h (target_ops): Describe ATTACH return values.
2637
bf914831
PA
26382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2639
2640 * win32-low.c (GETPROCADDRESS): Define.
2641 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2642 (winapi_DebugSetProcessKillOnExit): Likewise.
2643 (win32_create_inferior): Force usage of ansi CreateProcessA.
2644 (win32_attach): Use GETPROCADDRESS.
2645 (win32_detach): Likewise.
2646
f72f3e60
PA
26472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2648
2649 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2650
ed50f18f
PA
26512007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2652
2653 * win32-low.c: Commit leftover changes from 2007-03-29.
2654
0c2ead7e
DJ
26552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2656
2657 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2658 fields short instead of int. Add explicit padding.
2659 (i387_cache_to_fsave): Remove unnecessary casts.
2660 (i387_fsave_to_cache): Doc fix.
2661 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2662
73725ff3
DJ
26632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2664
2665 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2666 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2667
d99f33d8
PA
26682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2669
2670 * configure.srv (arm*-*-mingw32ce*): Move near the other
2671 arm targets.
2672
68070c10
PA
26732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2674
2482afc6 2675 * configure.ac: Add errno checking.
68070c10
PA
2676 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2677 sys/file.h and malloc.h.
2678 (AC_CHECK_DECLS): Add perror.
2679 (srv_mingwce): Handle.
2482afc6 2680 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
2681 win32-i386-low.o to srv_tgtobj.
2682 (i[34567]86-*-mingw*): Likewise.
2683 (arm*-*-mingw32ce*): Add case.
2684 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2685 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2686 [__MINGW32CE__] (strerror): New function.
2687 [__MINGW32CE__] (errno): Define to GetLastError.
2688 [__MINGW32CE__] (COUNTOF): New macro.
2689 (remote_open): Remove extra close call.
2690 * mem-break.c (delete_breakpoint_at): New function.
2691 * mem-break.h (delete_breakpoint_at): Declare.
2692 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2693 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2694 [USE_WIN32API] (read, write): Add char* casts.
2695 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2696 * server.h: Include wincecompat.h on Windows CE.
2697 [HAVE_ERRNO_H]: Check.
2698 (perror): Declare if not declared.
2699 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2700 (perror_with_name): Remove errno declaration.
2701 * wincecompat.h: New.
2702 * wincecompat.c: New.
2703 * win32-low.h: New.
2704 * win32-arm-low.c: New.
2705 * win32-i386-low.c: New.
2706 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2707 (OUTMSG2): Make it safe.
2708 (_T): New macro.
2709 (COUNTOF): New macro.
2710 (NUM_REGS): Get it from the low target.
2711 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2712 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2713 (thread_rec): Let low target handle debug registers.
2714 (child_add_thread): Likewise.
2715 (child_init_thread_list): Likewise.
2716 (continue_one_thread): Likewise.
2717 (regptr): New.
2718 (do_child_fetch_inferior_registers): Move to ...
2719 * win32-i386-low.c: ... here, and rename to ...
2720 (do_fetch_inferior_registers): ... this.
2721 * win32-low.c (child_fetch_inferior_registers):
2722 Go through the low target.
2723 (do_child_store_inferior_registers): Use regptr.
2724 (strwinerror): New function.
2725 (win32_create_inferior): Handle Windows CE.
2726 Use strwinerror instead of strerror on Windows error
2727 codes. Add program to the error output.
2728 Don't close the main thread handle on Windows CE.
2729 (win32_attach): Use coredll.dll on Windows CE.
2730 (win32_kill): Close current process and current
2731 thread handles.
2732 (win32_detach): Use coredll.dll on Windows CE.
2733 (win32_resume): Let low target handle debug registers, and
2734 step request.
2735 (handle_exception): Add/Remove initial breakpoint. Avoid
2736 non-existant WSTOPSIG on Windows CE.
2737 (win32_read_inferior_memory): Cast to remove warning.
2738 (win32_arch_string): Go through the low target.
2739 (initialize_low): Call set_breakpoint_data with the low
2740 target's breakpoint.
2741 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2742 FOP_REGNUM, mappings): Move to ...
2743 * win32-i386-low.c: ... here.
2744 * win32-low.c (win32_thread_info): Move to ...
2745 * win32-low.h: ... here.
2746 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2747 win32-arm-low.c and wincecompat.c.
2748 (all:): Add $EXEEXT.
2749 (install-only:): Likewise.
2750 (gdbserver:): Likewise.
2751 (gdbreplay:): Likewise.
2752 * config.in: Regenerate.
2753 * configure: Regenerate.
2754
41093d81
PA
27552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2756
2757 * win32-low.c: Rename typedef thread_info to
2758 win32_thread_info throughout.
2759
544afa54
PA
27602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2761
2762 * win32-i386-low.c: Rename to ...
2763 * win32-low.c: ... this.
2764 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2765 * Makefile.in: Likewise.
2766
bce7165d
PA
27672007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2768
2769 * remote-utils.c (monitor_output): Constify msg parameter.
2770 * server.h (monitor_output): Likewise.
2771 * win32-i386-low.c (handle_output_debug_string): New.
2772 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2773 handle_output_debug_string.
2774 (get_child_debug_event): Likewise.
2775
506c7aa0
DJ
27762007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2777
2778 * server.c (main): Correct strtoul check.
2779
42c81e2a
DJ
27802007-03-27 Jon Ringle <jon@ringle.org>
2781
2782 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2783
9453113a
DJ
27842007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2785
2786 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2787
64a69107
DJ
27882007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2789
2790 * terminal.h: Check HAVE_SGTTY_H.
2791
27922007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
2793
2794 * remote-utils.c (remote_open): Print out the assigned port number.
2795
c74d0ad8
DJ
27962007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2797
2798 * remote-utils.c (monitor_output): New function.
2799 * server.c (debug_threads): Define here.
2800 (monitor_show_help): New function.
2801 (handle_query): Handle qRcmd.
2802 (main): Do not handle 'd' packet.
2803 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2804 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2805 of debug_threads.
2806
de7c3b4a
PA
28072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2808
2809 * Makefile.in (EXEEXT): New.
2810 (clean): Use $(EXEEXT).
2811
ef57601b
PA
28122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2813
2814 * target.h (target_ops): Rename send_signal to request_interrupt,
2815 and remove enum target_signal parameter.
2816 * linux-low.c (linux_request_interrupt): Rename from
2817 linux_send_signal, and always send SIGINT.
2818 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2819 and always send SIGINT.
2820 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2821 of send_signal.
2822 (input_interrupt): Likewise.
2823
820f2bda
PA
28242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2825
2826 * server.c (get_features_xml): Check if target implemented
2827 arch_string.
2828 * win32-i386-low.c (win32_arch_string): New.
2829 (win32_target_ops): Add win32_arch_string as arch_string member.
2830
ab39bf24
UW
28312007-02-22 Markus Deuling <deuling@de.ibm.com>
2832
2833 * spu-low.c (spu_arch_string): New.
2834 (spu_target_ops): Add spu_arch_string.
2835
61ff6e04
DJ
28362007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2837
2838 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2839 * configure.ac: Do not check for terminal.h.
2840 * configure, config.in: Regenerated.
2841
fb1e4ffc
DJ
28422007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2843
2844 * Makefile.in (OBS): Add $(XML_BUILTIN).
2845 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2846 (clean): Update.
2847 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2848 (arm-with-iwmmxt.c): New.
2849 * config.in, configure: Regenerate.
2850 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2851 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2852 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2853 (arm*-*-linux*): Add iWMMXt and regset support.
2854 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2855 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2856 (arm_store_wmmxregset, target_regsets): New.
2857 * server.c (get_features_xml): Take annex argument. Check builtin
2858 XML documents.
2859 (handle_query): Handle multiple annexes.
2860
0f48aa01
DJ
28612007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2862
2863 * remote-utils.c [USE_WIN32API] (read, write): Define.
2864 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2865 write.
2866
23181151
DJ
28672007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2868
2869 * linux-i386-low.c (the_low_target): Set arch_string.
2870 * linux-x86-64-low.c (the_low_target): Likewise.
2871 * linux-low.c (linux_arch_string): New.
2872 (linux_target_ops): Add it.
2873 * linux-low.h (struct linux_target_ops): Add arch_string.
2874 * server.c (write_qxfer_response): Use const void * for DATA.
2875 (get_features_xml): New.
2876 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2877 * target.h (struct target_ops): Add arch_string method.
2878
9d606399
DJ
28792007-01-03 Denis Pilat <denis.pilat@st.com>
2880 Daniel Jacobowitz <dan@codesourcery.com>
2881
2882 * linux-low.c (linux_kill): Handle being called with no threads.
2883 * win32-i386-low.c (win32_kill): Likewise.
2884 (get_child_debug_event): Clear current_process_handle.
2885
28862006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
2887 Daniel Jacobowitz <dan@codesourcery.com>
2888
2889 * remote-utils.c (remote_open): Check the type of specified
2890 serial port devices before opening them.
2891 * server.c (main): Kill the inferior if an error occurs during
2892 the first remote_open.
2893
a5e13d24
DJ
28942006-12-05 Markus Deuling <deuling@de.ibm.com>
2895
2896 * README: Update supported targets.
2897
186947f7
DJ
28982006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2899
2900 * Makefile.in (clean): Remove reg-mips64.c.
2901 (reg-mips64.c, reg-mips64.o): New rules.
2902 * configure.srv: Handle mips64. Include regset support for mips.
2903 * linux-mips-low.c (union mips_register): New.
2904 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2905 (mips_breakpoint, mips_breakpoint_at): Use int.
2906 (mips_collect_register, mips_supply_register)
2907 (mips_collect_register_32bit, mips_supply_register_32bit)
2908 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2909 (mips_store_fpregset, target_regsets): New.
2910 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2911
a13e2c95
UW
29122006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2913
2914 * configure.srv: Add target "spu*-*-*".
2915 * Makefile.in (clean): Remove reg-spu.c.
2916 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2917 * spu-low.c: New file.
2918
cb7283db
DJ
29192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2920
2921 * configure.ac: Correct td_thr_tls_get_addr test.
2922 * configure: Regenerated.
2923
89be2091
DJ
29242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2925
2926 * linux-low.c (linux_wait_for_event): Reformat. Use the
2927 pass_signals array.
2928 * remote-utils.c (decode_address_to_semicolon): New.
2929 * server.c (pass_signals, handle_general_set): New.
2930 (handle_query): Mention QPassSignals for qSupported.
2931 (main): Call handle_general_set.
2932 * server.h (pass_signals, decode_address_to_semicolon): New.
2933
000ef4f0
DJ
29342006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2935
2936 * server.c (handle_query): Correct error handling for read_auxv.
2937
b7149293
UW
29382005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2939
2940 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2941 and srv_linux_thread_db to yes.
2942 * linux-s390-low.c (s390_fill_gregset): New function.
2943 (target_regsets): Define data structure.
2944
dae5f5cf
DJ
29452006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2946
2947 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2948 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2949 * config.in, configure: Regenerated.
2950 * inferiors.c (gdb_id_to_thread): New function.
2951 (gdb_id_to_thread_id): Use it.
2952 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2953 * linux-low.h (struct process_info): Add th member.
2954 (thread_db_get_tls_address): New prototype.
2955 * remote-utils.c (decode_address): Make non-static.
2956 * server.c (handle_query): Handle qGetTLSAddr.
2957 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2958 * target.h (struct target_ops): Add get_tls_address.
2959 * thread-db.c (maybe_attach_thread): Save the thread handle.
2960 (thread_db_get_tls_address): New.
2961
32ca6d61
DJ
29622006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2963
2964 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2965 (linux_resume_one_process): Take a siginfo_t *. Update all
2966 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2967 (struct pending_signals): Add a siginfo_t.
2968 (linux_wait_for_process): Always set last_status.
2969 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2970 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2971 * linux-low.h (struct process_info): Add last_status.
2972
5ffff7c1
DJ
29732006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2974
2975 * remote-utils.c (try_rle): New function.
2976 (putpkt_binary): Use it.
2977
8695c747
DJ
29782006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2979
2980 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2981 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2982 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2983 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2984 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2985 point registers.
2986
290fadea
RS
29872006-08-08 Richard Sandiford <richard@codesourcery.com>
2988
2989 * server.c (terminal_fd): New variable.
2990 (old_foreground_pgrp): Likewise.
2991 (restore_old_foreground_pgrp): New function.
2992 (start_inferior): Record the terminal file descriptor in terminal_fd
2993 and its original foreground group in old_foreground_pgrp. Register
2994 restore_old_foreground_pgrp with atexit().
2995
9f2e1e63
DJ
29962006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2997
2998 * server.c (handle_query): Correct qPart to qXfer.
2999
b80864fb
DJ
30002006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3001
3002 * configure.ac: Check for more headers which are missing on
3003 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3004 * configure.srv: Add Cygwin and mingw32.
3005 * remote-utils.c: Don't include headers unconditionally which
3006 are missing on mingw32. Include <winsock.h> for mingw32.
3007 (remote_open): Adjust for mingw32 support. Flush
3008 standard error after writing to it.
3009 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3010 (unblock_async_io, enable_async_io, disable_async_io)
3011 (readchar, getpkt): Update for Winsock support.
3012 (prepare_resume_reply): Expect a protocol signal number.
3013 * server.c: Disable <sys/wait.h> on mingw32.
3014 (start_inferior): Adjust for mingw32 support. Flush
3015 standard error after writing to it.
3016 (attach_inferior): Likewise. Use protocol signal
3017 numbers.
3018 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3019 and names.
3020 * win32-i386-low.c: New file.
3021 * Makefile.in (XM_CLIBS): Set.
3022 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3023 (win32-i386-low.o): New dependency rule.
3024 * linux-low.c (linux_wait): Use target signal numbers.
3025 * target.h (struct target_ops): Doc fix.
3026 * server.h (target_signal_to_name): New prototype.
3027 * gdbreplay.c: Don't include headers unconditionally which
3028 are missing on mingw32. Include <winsock.h> for mingw32.
3029 (remote_close, remote_open): Adjust for Winsock support.
3030 * configure, config.in: Regenerated.
3031
0876f84a
DJ
30322006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3033
3034 * server.c (decode_xfer_read, write_qxfer_response): New.
3035 (handle_query): Take a packet length argument. Handle
3036 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3037 the qSupported response.
3038 (main): Update call to handle_query.
3039
01f9e8fa
DJ
30402006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3041
3042 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3043 (putpkt_binary): Renamed from putpkt and adjusted for binary
3044 data.
3045 (putpkt): New wrapper for putpkt_binary.
3046 (readchar): Don't mask off the high bit.
3047 (decode_X_packet): New function.
3048 * server.c (main): Call putpkt_binary if a handler sets the packet
3049 length. Save the length of the incoming packet. Handle 'X'.
3050 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3051
be2a5f71
DJ
30522006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3053
3054 * server.c (handle_query): Handle qSupported.
3055
ea025f5f
DJ
30562006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3057
3058 * remote-utils.c (all_symbols_looked_up): New variable.
3059 (look_up_one_symbol): Check it.
3060 * server.h (look_up_one_symbol): New declaration.
3061 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3062
9308fc88
DJ
30632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3064
3065 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 3066 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
3067 (PTRACE_GET_THREAD_AREA): Define.
3068 (ps_get_thread_area): New function.
3069
52fb6437
NS
30702006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3071
3072 * configure.srv (m68k*-*-uclinux*): New target.
3073 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3074 (linux_resume_one_process): Remove extraneous cast.
3075 (linux_read_offsets): New.
3076 (linux_target_op): Add linux_read_offsets on mmuless systems.
3077 * server.c (handle_query): Add qOffsets logic.
3078 * target.h (struct target_ops): Add read_offsets.
3079
21b0f40c
DJ
30802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3081
3082 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3083 (PTRACE_GET_THREAD_AREA): Define.
3084 (ps_get_thread_area): New function.
3085 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3086 (linux-x86-64-low.o): Update.
3087
0050a760
DJ
30882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3089
3090 * configure.ac: Remove checks for prfpregset_t.
3091 * gdb_proc_service.h: New file.
3092 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3093 new "gdb_proc_service.h".
3094 * proc-service.c: Likewise.
3095 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3096 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3097 * Makefile.in (gdb_proc_service_h): Updated.
3098 * configure, config.in: Regenerated.
3099
b92a518e
DJ
31002006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3101
3102 * remote-utils.c (prepare_resume_reply): Move declaration
3103 of gdb_id_from_wait to the top of the block.
3104
545587ee
DJ
31052006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3106
3107 * linux-low.c (regsets_store_inferior_registers): Read the regset
3108 from the target before filling it.
3109
9db87ebd
DJ
31102006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3111
3112 * server.c (attach_inferior): Return SIGTRAP for a successful
3113 attach.
3114
dd24457d
DJ
31152006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3116
3117 * Makefile.in (OBS): Add version.o.
3118 (STAGESTUFF): Delete.
3119 (version.o): Add dependencies.
3120 (version.c): Replace rule.
3121 (clean): Remove version.c.
3122 * server.c (gdbserver_version): New.
3123 (gdbserver_usage): Use printf.
3124 (main): Handle --version and --help.
3125 * server.h (version, host_name): Add declarations.
3126
6f0f660e
EZ
31272005-12-23 Eli Zaretskii <eliz@gnu.org>
3128
3129 * linux-arm-low.c:
3130 * linux-arm-low.c:
3131 * inferiors.c:
3132 * i387-fp.h:
3133 * i387-fp.c:
3134 * gdbreplay.c:
3135 * regcache.c:
3136 * proc-service.c:
3137 * mem-break.h:
3138 * mem-break.c:
3139 * linux-x86-64-low.c:
3140 * linux-sh-low.c:
3141 * linux-s390-low.c:
3142 * linux-ppc64-low.c:
3143 * linux-ppc-low.c:
3144 * linux-mips-low.c:
3145 * linux-m68k-low.c:
3146 * linux-m32r-low.c:
3147 * linux-low.h:
3148 * linux-low.c:
3149 * linux-ia64-low.c:
3150 * linux-i386-low.c:
3151 * linux-crisv32-low.c:
3152 * thread-db.c:
3153 * terminal.h:
3154 * target.h:
3155 * target.c:
3156 * server.h:
3157 * server.c:
3158 * remote-utils.c:
3159 * regcache.h:
3160 * utils.c:
3161 * Makefile.in:
3162 * configure.ac:
3163 * gdbserver.1: Add (C) after Copyright. Update the FSF
3164 address.
3165
9d1fb177
DJ
31662005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3167
3168 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3169 (arm_breakpoint_at): Recognize both breakpoints.
3170 (the_low_target): Use the correct breakpoint instruction.
3171
011a70c2
DJ
31722005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3173
3174 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3175 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3176 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3177 (the_low_target): Update.
3178
7fb85e41
AS
31792005-10-25 Andreas Schwab <schwab@suse.de>
3180
3181 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3182
3183 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3184 (ia64_num_regs): Reduce to 462.
3185
3db0444b
DJ
31862005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3187
3188 * acinclude.m4: Correct quoting.
3189 * aclocal.m4: Regenerated.
3190
3191 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3192 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3193 (thread_db_init): Call thread_db_err_str.
3194 * configure.ac: Check for TD_VERSION.
3195 * config.in, configure: Regenerated.
3196
bee0189a
DJ
31972005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3198
3199 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3200
e9d25b98
DJ
32012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3202
3203 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3204 is not available. Define HAVE_PTRACE_GETREGS if it is.
3205 * config.in, configure: Regenerated.
3206 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3207 * linux-i386-low.c, linux-m68k-low.c: Update to use
3208 HAVE_PTRACE_GETREGS.
3209 * linux-low.c (regsets_fetch_inferior_registers)
3210 (regsets_store_inferior_registers): Only return 0 if we processed
3211 GENERAL_REGS.
3212 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3213 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3214
a06660f7
DJ
32152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3216
3217 * inferiors.c (struct thread_info): Add gdb_id.
3218 (add_thread): Add gdb_id argument.
3219 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3220 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3221 calls to add_thread.
3222 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3223 * server.c (handle_query): Use thread_to_gdb_id.
3224 (handle_v_cont, main): Use gdb_id_to_thread_id.
3225 * server.h (add_thread): Update prototype.
3226 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3227 prototypes.
3228
5a1f5858
DJ
32292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3230
3231 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3232 left-padded registers.
3233 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3234 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3235
e122f1f5
SE
32362005-07-01 Steve Ellcey <sje@cup.hp.com>
3237
3238 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3239 * configure: Regenerate.
3240 * config.in: Regenerate.
3241 * server.h (NEED_DECLARATION_STRERROR):
3242 Replace with !HAVE_DECL_STRERROR.
3243
d592fa2f
DJ
32442005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3245
3246 * linux-low.c (linux_wait, linux_send_signal): Don't test
3247 an unsigned long variable for > 0 if it could be MAX_ULONG.
3248 * server.c (myresume): Likewise.
3249 * target.c (set_desired_inferior): Likewise.
3250
ccbd4912
MK
32512005-06-13 Mark Kettenis <kettenis@gnu.org>
3252
3253 * configure.ac: Simplify and improve check for socklen_t.
3254 * configure, config.in: Regenerate.
3255
f450004a
DJ
32562005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3257
3258 * acconfig.h: Remove.
3259 * configure.ac: Add a test for socklen_t. Use three-argument
3260 AC_DEFINE throughout.
3261 * config.in: Regenerated using autoheader 2.59.
3262 * configure: Regenerated.
3263
3264 * gdbreplay.c (socklen_t): Provide a default.
3265 (remote_open): Use socklen_t.
3266 * remote-utils.c (socklen_t): Provide a default.
3267 (remote_open): Use socklen_t.
3268 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3269 unsigned char.
3270
3271 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3272 char for buffers.
3273 * linux-low.c (linux_read_memory, linux_write_memory)
3274 (linux_read_auxv): Likewise.
3275 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3276 (check_mem_write): Likewise.
3277 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3278 Likewise.
3279 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3280 (registers_from_string, register_data): Likewise.
3281 * server.c (handle_query, main): Likewise.
3282 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3283 (decode_M_packet): Likewise.
3284 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3285 * target.h (struct target_ops): Update read_memory, write_memory,
3286 and read_auxv.
3287 (read_inferior_memory, write_inferior_memory): Update.
3288 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3289 to unsigned char *.
3290 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3291 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3292 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3293 linux-s390-low.c, linux-sh-low.c: Update for changes in
3294 read_inferior_memory and the_low_target->breakpoint.
3295
eee84df1
DJ
32962005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3297
3298 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3299 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3300 * configure.srv: Add powerpc64-*-linux*.
3301 * linux-ppc64-low.c: New file.
3302
45b134e5
OF
33032005-05-23 Orjan Friberg <orjanf@axis.com>
3304
3305 * linux-cris-low.c: New file with support for CRIS.
3306 * linux-crisv32-low.c: Ditto for CRISv32.
3307 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3308 (clean): Add reg-cris.c and reg-crisv32.c.
3309 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3310 reg-crisv32.o, and reg-crisv32.c to make rules.
3311 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3312 recognized targets.
3313
48d93c75
UW
33142005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3315
3316 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3317 of sizeof (PTRACE_XFER_TYPE).
3318 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3319
e013ee27
OF
33202005-05-12 Orjan Friberg <orjanf@axis.com>
3321
3322 * target.h (struct target_ops): Add insert_watchpoint,
3323 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3324 pointers for hardware watchpoint support.
3325 * linux-low.h (struct linux_target_ops): Ditto.
3326 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3327 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3328 to linux_target_ops.
3329 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3330 reply packet.
3331 * server.c (main): Recognize 'Z' and 'z' packets.
3332
b0ded00b
UW
33332005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3334
3335 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3336 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3337 (the_low_target): Add new members.
3338
8643e2ad
DJ
33392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3340
3341 * proc-service.c (ps_lgetregs): Search all_processes instead of
3342 all_threads.
3343
fc620387
DJ
33442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3345
3346 * server.c (start_inferior): Change return type to int.
3347 (attach_inferior): Change sigptr to int *.
3348 (handle_v_cont, handle_v_requests): Change signal to int *.
3349 (main): Change signal to int.
3350
33512005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
3352
3353 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3354 * configure.srv: Add m32r*-*-linux*.
3355 * linux-m32r-low.c: New file.
3356
e0e76420
DJ
33572005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3358
3359 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3360
a1928bad
DJ
33612005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3362
3363 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3364 Take unsigned long arguments for PIDs.
3365 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3366 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3367 (wait_for_sigstop, linux_resume_one_process)
3368 (regsets_fetch_inferior_registers, linux_send_signal)
3369 (linux_read_auxv): Likewise. Update the types of variables holding
3370 PIDs. Update format string specifiers.
3371 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3372 * remote-utils.c (prepare_resume_reply): Likewise.
3373 * server.c (cont_thread, general_thread, step_thread)
3374 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3375 unsigned long.
3376 (handle_query): Update format specifiers.
3377 (handle_v_cont, main): Use strtoul for thread IDs.
3378 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3379 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3380 (general_thread, step_thread, thread_from_wait)
3381 (old_thread_from_wait): Update.
3382 * target.h (struct thread_resume): Use unsigned long for THREAD.
3383 (struct target_ops): Use unsigned long for arguments to attach and
3384 thread_alive.
3385
dcdb98d2
DJ
33862005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3387
3388 * acinclude.m4: Include bfd/bfd.m4 directly.
3389 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3390 <agriffis@toolchain.org>.
3391 * aclocal.m4, configure: Regenerated.
3392
bec39cab
AC
33932005-01-07 Andrew Cagney <cagney@gnu.org>
3394
3395 * configure.ac: Rename configure.in, require autoconf 2.59.
3396 * configure: Re-generate.
3397
434c4c77
DJ
33982004-12-08 Daniel Jacobowitz <dan@debian.org>
3399
3400 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3401 LIBS when finished.
3402 * aclocal.m4: Regenerated.
3403 * configure: Regenerated.
3404
db1d3e1b
AS
34052004-11-21 Andreas Schwab <schwab@suse.de>
3406
3407 * linux-m68k-low.c (m68k_num_gregs): Define.
3408 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3409 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3410 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3411 (m68k_breakpoint_at): New. Add to the_low_target.
3412
3413 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3414 srv_linux_thread_db to yes.
3415
43360365
JB
34162004-10-20 Joel Brobecker <brobecker@gnat.com>
3417
3418 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3419 (ARCH_SET_FS): Likewise.
3420 (ARCH_GET_FS): Likewise.
3421 (ARCH_GET_GS): Likewise.
3422
fd500816
DJ
34232004-10-16 Daniel Jacobowitz <dan@debian.org>
3424
3425 * linux-i386-low.c (ps_get_thread_area): New.
3426 * linux-x86-64-low.c (ps_get_thread_area): New.
3427 * linux-low.c: Include <sys/syscall.h>.
3428 (linux_kill_one_process): Don't kill the first thread here.
3429 (linux_kill): Kill the first thread here.
3430 (kill_lwp): New function.
3431 (send_sigstop, linux_send_signal): Use it.
3432 * proc-service.c: Clean up #ifdefs.
3433 (fpregset_info): Delete.
3434 (ps_lgetregs): Update and enable implementation.
3435 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3436 implementations.
3437 * remote-utils.c (struct sym_cache, symbol_cache): New.
3438 (input_interrupt): Print a clearer message.
3439 (async_io_enabled): New variable.
3440 (enable_async_io, disable_async_io): Use it. Update comments.
3441 (look_up_one_symbol): Use the symbol cache.
3442 * thread-db.c (thread_db_look_up_symbols): New function.
3443 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3444
f6de3c42
DJ
34452004-10-16 Daniel Jacobowitz <dan@debian.org>
3446
3447 * configure.in: Test for -rdynamic.
3448 * configure: Regenerated.
3449 * Makefile (INTERNAL_LDFLAGS): New.
3450 (gdbserver, gdbreplay): Use it.
3451
2c0fc042
AC
34522004-09-02 Andrew Cagney <cagney@gnu.org>
3453
3454 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3455
075b3282
DJ
34562004-03-23 Daniel Jacobowitz <drow@mvista.com>
3457
3458 * linux-low.c (linux_wait): Clear all_processes list also.
3459
fa6a77dc
DJ
34602004-03-12 Daniel Jacobowitz <drow@mvista.com>
3461
3462 * linux-low.c: Include <errno.h>. Remove extern declaration of
3463 errno.
3464
6d782a97
DJ
34652004-03-12 Daniel Jacobowitz <drow@mvista.com>
3466
3467 * gdbreplay.c, server.h, utils.c: Update copyright years.
3468
3a7fb99b
DJ
34692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3470
3471 * server.c (main): Print child status or termination signal from
3472 variable 'signal', not 'sig'.
3473
c3e735a6
DJ
34742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3475
3476 * linux-low.c (linux_read_memory): Change return type to
3477 int. Check for and return error from ptrace().
3478 * target.c (read_inferior_memory): Change return type to int. Pass
3479 back return status from the_target->read_memory().
3480 * target.h (struct target_ops): Adapt *read_memory() prototype.
3481 Update comment.
3482 (read_inferior_memory): Adapt prototype.
3483 * server.c (main): Return an error packet if
3484 read_inferior_memory() returns an error.
3485
a59d1c82
DJ
34862004-03-04 Daniel Jacobowitz <drow@mvista.com>
3487
3488 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3489 Unify with other clean targets.
3490
dc3f8883
DJ
34912004-02-29 Daniel Jacobowitz <drow@mvista.com>
3492
3493 * server.c (handle_v_cont): Call set_desired_inferior.
3494
89a208da
DJ
34952004-02-29 Daniel Jacobowitz <drow@mvista.com>
3496
3497 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3498
62ea82f5
DJ
34992004-02-29 Daniel Jacobowitz <drow@mvista.com>
3500
3501 * linux-low.c (linux_wait): Unblock async I/O.
3502 (linux_resume): Block and enable async I/O.
3503 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3504 * server.h (block_async_io, unblock_async_io): Add prototypes.
3505
6910d122
DJ
35062004-02-29 Daniel Jacobowitz <drow@mvista.com>
3507
3508 * remote-utils.c (remote_open): Print a status notice after
3509 opening a TCP port.
3510 * server.c (attach_inferior): Print a status notice after
3511 attaching.
3512
35132004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
3514
3515 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3516
c89dc5d4
DJ
35172004-02-26 Daniel Jacobowitz <drow@mvista.com>
3518
3519 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3520 error packet.
3521 * server.c, target.h: Update copyright years.
3522
4b8dad4a
RM
35232004-02-25 Roland McGrath <roland@redhat.com>
3524
3525 * target.h (struct target_ops): New member `read_auxv'.
3526 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3527 * linux-low.c (linux_read_auxv): New function.
3528 (linux_target_ops): Initialize `read_auxv' member to that.
3529
d7446758
JB
35302004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3531
3532 Committed by Jim Blandy <jimb@redhat.com>.
3533
3534 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 3535 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
3536 instead of GPR_SIZE to distiguish s390 and s390x targets.
3537
5544ad89
DJ
35382004-01-31 Daniel Jacobowitz <drow@mvista.com>
3539
3540 * linux-low.c: Update copyright year.
3541 (check_removed_breakpoint): Clear pending_is_breakpoint.
3542 (linux_set_resume_request, linux_queue_one_thread)
3543 (resume_status_pending_p): New functions.
3544 (linux_continue_one_thread): Use process->resume.
3545 (linux_resume): Only resume threads if there are no pending events.
3546 * linux-low.h (struct process_info): Add resume request
3547 pointer.
3548
2a68b70e
DJ
35492004-01-30 Daniel Jacobowitz <drow@mvista.com>
3550
3551 * regcache.c (new_register_cache): Clear the allocated register
3552 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3553
64386c31
DJ
35542003-10-13 Daniel Jacobowitz <drow@mvista.com>
3555
3556 * linux-low.c (linux_resume): Take a struct thread_resume *
3557 argument.
3558 (linux_wait): Update call.
3559 (resume_ptr): New static variable.
3560 (linux_continue_one_thread): Renamed from
3561 linux_continue_one_process. Use resume_ptr.
3562 (linux_resume): Use linux_continue_one_thread.
3563 * server.c (handle_v_cont, handle_v_requests): New functions.
3564 (myresume): New function.
3565 (main): Handle 'v' case.
3566 * target.h (struct thread_resume): New type.
3567 (struct target_ops): Change argument of "resume" to struct
3568 thread_resume *.
3569 (myresume): Delete macro.
3570
c938e9b0
L
35712003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3572
3573 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3574 (uninstall): Support DESTDIR.
3575
7f313d07
BC
3576Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3577
3578 * configure.srv: Add xscale*linux copy of arm*linux entry.
3579
3b2fc2ea
DJ
35802003-07-24 Daniel Jacobowitz <drow@mvista.com>
3581
3582 * linux-arm-low.c (arm_reinsert_addr): New function.
3583 (the_low_target): Add arm_reinsert_addr.
3584
1c0a559e
MK
35852003-07-08 Mark Kettenis <kettenis@gnu.org>
3586
3587 * mem-break.c: Remove whitespace at end of file.
3588
43d5792c
DJ
35892003-06-28 Daniel Jacobowitz <drow@mvista.com>
3590
3591 * configure.in: Check whether we need to prototype strerror.
3592 * server.h: Optionally prototype strerror.
3593 * gdbreplay.c (perror_with_name): Use strerror.
3594 * linux-low.c (linux_attach_lwp): Use strerror.
3595 * utils.c (perror_with_name): Use strerror.
3596 * config.in, configure: Regenerated.
3597
c8a86edf
DJ
35982003-06-28 Daniel Jacobowitz <drow@mvista.com>
3599
3600 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3601 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3602
73d37363
DJ
36032003-06-20 Daniel Jacobowitz <drow@mvista.com>
3604
3605 * Makefile.in (SFILES): Update.
3606 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3607 low-sun3.c: Remove files.
3608
6ad8ae5c
DJ
36092003-06-17 Daniel Jacobowitz <drow@mvista.com>
3610
3611 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3612 (linux_detach_one_process, linux_detach): New functions.
3613 (linux_target_ops): Add linux_detach.
3614 * server.c (main): Handle 'D' packet.
3615 * target.h (struct target_ops): Add "detach" member.
3616 (detach_inferior): Define.
3617
1581182a
MK
36182003-06-13 Mark Kettenis <kettenis@gnu.org>
3619
3620 From Kelley Cook <kelleycook@wideopenwest.com>:
3621 * configure.srv: Accept i[34567]86 variants.
3622
e5379b03
DJ
36232003-06-05 Daniel Jacobowitz <drow@mvista.com>
3624
3625 * linux-low.c (linux_wait_for_event): Correct comment typos.
3626 (linux_resume_one_process): Call check_removed_breakpoint.
3627 (linux_send_signal): New function.
3628 (linux_target_ops): Add linux_send_signal.
3629 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3630 of kill.
3631 * target.h (struct target_ops): Add send_signal.
3632
2ff29de4
JB
36332003-05-29 Jim Blandy <jimb@redhat.com>
3634
3635 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3636 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3637 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3638 away part of the register's value.
3639
254787d4
DJ
36402003-03-26 Daniel Jacobowitz <drow@mvista.com>
3641
3642 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3643 (linux_wait_for_event, linux_init_signals): Likewise.
3644
94e10508
DJ
36452003-03-17 Daniel Jacobowitz <drow@mvista.com>
3646
3647 * configure.in: Check for stdlib.h.
3648 * configure: Regenerated.
3649 * config.in: Regenerated.
3650
4c0711e0
DJ
36512003-01-04 Andreas Schwab <schwab@suse.de>
3652
3653 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3654
ef66e766
AC
36552003-01-02 Andrew Cagney <ac131313@redhat.com>
3656
3657 * Makefile.in: Remove obsolete code.
3658
a1358604
DJ
36592002-11-20 Daniel Jacobowitz <drow@mvista.com>
3660
3661 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3662 defined(PT_FPR0_HI).
3663
23ce3b1c
DJ
36642002-11-17 Stuart Hughes <seh@zee2.com>
3665
3666 * linux-arm-low.c (arm_num_regs): Increase.
3667 (arm_regmap): Include status register.
3668
36692002-11-17 Daniel Jacobowitz <drow@mvista.com>
3670
3671 * linux-low.c (register_addr): Remove incorrect -1 check.
3672
a9fa9f7d
DJ
36732002-08-29 Daniel Jacobowitz <drow@mvista.com>
3674
3675 * linux-low.c (linux_create_inferior): Call setpgid. Return
3676 the new PID.
3677 (unstopped_p, linux_signal_pid): Remove.
3678 (linux_target_ops): Remove linux_signal_pid.
3679 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3680 global instead of target method.
3681 * target.h (struct target_ops): Remove signal_pid. Update comment
3682 for create_inferior.
3683 * server.c (signal_pid): New variable.
3684 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 3685 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
3686 (attach_inferior): Set signal_pid.
3687
17574093
DJ
36882002-08-23 Daniel Jacobowitz <drow@mvista.com>
3689
3690 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3691
36922002-08-20 Jim Blandy <jimb@redhat.com>
3693
3694 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3695 default for this.
3696
36972002-08-01 Andrew Cagney <cagney@redhat.com>
3698
3699 * Makefile.in: Make chill references obsolete.
3700
37012002-07-24 Kevin Buettner <kevinb@redhat.com>
3702
3703 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3704 * configure: Regenerate.
3705 * config.in: Regenerate.
3706
37072002-07-09 David O'Brien <obrien@FreeBSD.org>
3708
3709 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3710 (perror_with_name, remote_close, remote_open, expect, play): Static.
3711
37122002-07-04 Michal Ludvig <mludvig@suse.cz>
3713
4b8dad4a 3714 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
3715 byte offsets instead of an array of indexes.
3716 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3717
37182002-06-13 Daniel Jacobowitz <drow@mvista.com>
3719
3720 * regcache.c: Add comment.
3721
37222002-06-11 Daniel Jacobowitz <drow@mvista.com>
3723
3724 * thread-db.c: New file.
3725 * proc-service.c: New file.
3726 * acinclude.m4: New file.
3727 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3728 proc-service.o, and thread-db.o.
3729 (linux-low.o): Add USE_THREAD_DB.
3730 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3731 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3732 * aclocal.m4: Regenerated.
3733 * config.in: Regenerated.
3734 * configure: Regenerated.
3735 * configure.in: Check for proc_service.h, sys/procfs.h,
3736 thread_db.h, and linux/elf.h headrs.
3737 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3738 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3739 Check for -lthread_db and thread support.
3740 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3741 PowerPC, and SuperH.
3742 * i387-fp.c: Constify arguments.
3743 * i387-fp.h: Likewise.
3744 * inferiors.c: (struct thread_info): Renamed from
3745 `struct inferior_info'. Remove PID member. Use generic inferior
3746 list header. All uses updated.
3747 (inferiors, signal_pid): Removed.
3748 (all_threads): New variable.
3749 (get_thread): Define.
3750 (add_inferior_to_list): New function.
3751 (for_each_inferior): New function.
3752 (change_inferior_id): New function.
3753 (add_inferior): Removed.
3754 (remove_inferior): New function.
3755 (add_thread): New function.
3756 (free_one_thread): New function.
3757 (remove_thread): New function.
3758 (clear_inferiors): Use for_each_inferior and free_one_thread.
3759 (find_inferior): New function.
3760 (find_inferior_id): New function.
3761 (inferior_target_data): Update argument type.
3762 (set_inferior_target_data): Likewise.
3763 (inferior_regcache_data): Likewise.
3764 (set_inferior_regcache_data): Likewise.
3765 * linux-low.c (linux_bp_reinsert): Remove.
3766 (all_processes, stopping_threads, using_thrads)
3767 (struct pending_signals, debug_threads, pid_of): New.
3768 (inferior_pid): Replace with macro.
3769 (struct inferior_linux_data): Remove.
3770 (get_stop_pc, add_process): New functions.
3771 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3772 Use add_process and add_thread.
3773 (linux_attach_lwp): New function, based on old linux_attach. Use
3774 add_process and add_thread. Set stop_expected for new threads.
3775 (linux_attach): New function.
3776 (linux_kill_one_process): New function.
3777 (linux_kill): Kill all LWPs.
3778 (linux_thread_alive): Use find_inferior_id.
3779 (check_removed_breakpoints, status_pending_p): New functions.
3780 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3781 Update. Use WNOHANG. Wait for cloned processes also. Update process
3782 struct for the found process.
3783 (linux_wait_for_event): New function.
3784 (linux_wait): Use it. Support LWPs.
3785 (send_sigstop, wait_for_sigstop, stop_all_processes)
3786 (linux_resume_one_process, linux_continue_one_process): New functions.
3787 (linux_resume): Support LWPs.
3788 (REGISTER_RAW_SIZE): Remove.
3789 (fetch_register): Use register_size instead. Call supply_register.
3790 (usr_store_inferior_registers): Likewise. Call collect_register.
3791 Fix recursive case.
3792 (regsets_fetch_inferior_registers): Improve error message.
3793 (regsets_store_inferior_registers): Add debugging.
3794 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3795 (unstopped_p, linux_signal_pid): New functions.
3796 (linux_target_ops): Add linux_signal_pid.
3797 (linux_init_signals): New function.
3798 (initialize_low): Call it. Initialize using_threads.
3799 * regcache.c (inferior_regcache_data): Add valid
3800 flag.
3801 (get_regcache): Fetch registers lazily. Add fetch argument
3802 and update all callers.
3803 (regcache_invalidate_one, regcache_invalidate): New
3804 functions.
3805 (new_register_cache): Renamed from create_register_cache.
3806 Return the new regcache.
3807 (free_register_cache): Change argument to a void *.
3808 (registers_to_string, registers_from_string): Call get_regcache
3809 with fetch flag set.
3810 (register_data): Make static. Pass fetch flag to get_regcache.
3811 (supply_register): Call get_regcache with fetch flag clear.
3812 (collect_register): Call get_regcache with fetch flag set.
3813 (collect_register_as_string): New function.
3814 * regcache.h: Update.
3815 * remote-utils.c (putpkt): Flush after debug output and use
3816 stderr.
3817 Handle input interrupts while waiting for an ACK.
3818 (input_interrupt): Use signal_pid method.
3819 (getpkt): Flush after debug output and use stderr.
3820 (outreg): Use collect_register_as_string.
3821 (new_thread_notify, dead_thread_notify): New functions.
3822 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3823 and general_thread.
3824 (look_up_one_symbol): Flush after debug output.
3825 * server.c (step_thread, server_waiting): New variables.
3826 (start_inferior): Don't use signal_pid. Update call to mywait.
3827 (attach_inferior): Update call to mywait.
3828 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3829 (main): Don't fetch/store registers explicitly. Use
3830 set_desired_inferior. Support proposed ``Hs'' packet. Update
3831 calls to mywait.
3832 * server.h: Update.
3833 (struct inferior_list, struct_inferior_list_entry): New.
3834 * target.c (set_desired_inferior): New.
3835 (write_inferior_memory): Constify.
3836 (mywait): New function.
3837 * target.h: Update.
3838 (struct target_ops): New signal_pid method.
3839 (mywait): Removed macro, added prototype.
3840
3841 * linux-low.h (regset_func): Removed.
3842 (regset_fill_func, regset_store_func): New.
3843 (enum regset_type): New.
3844 (struct regset_info): Add type field. Use new operation types.
3845 (struct linux_target_ops): stop_pc renamed to get_pc.
3846 Add decr_pc_after_break and breakpoint_at.
3847 (get_process, get_thread_proess, get_process_thread)
3848 (strut process_info, all_processes, linux_attach_lwp)
3849 (thread_db_init): New.
3850
3851 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3852 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3853 (the_low_target): Add new members.
3854 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3855 (i386_store_fpxregset): Constify.
3856 (target_regsets): Add new kind identifier.
3857 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3858 (i386_set_pc): Add debugging.
3859 (i386_breakpoint_at): New function.
3860 (the_low_target): Add new members.
3861 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3862 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3863 (mips_breakpoint_at): New.
3864 (the_low_target): Add new members.
3865 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3866 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3867 (the_low_target): Add new members.
3868 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3869 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3870 (the_low_target): Add new members.
3871 * linux-x86-64-low.c (target_regsets): Add new kind
3872 identifier.
3873
38742002-05-15 Daniel Jacobowitz <drow@mvista.com>
3875
3876 From Martin Pool <mbp@samba.org>:
3877 * server.c (gdbserver_usage): New function.
3878 (main): Call it.
3879
38802002-05-14 Daniel Jacobowitz <drow@mvista.com>
3881
3882 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3883 stop_at -> stop_pc.
3884
38852002-05-04 Andrew Cagney <ac131313@redhat.com>
3886
3887 * Makefile.in: Remove obsolete code.
3888
38892002-04-24 Michal Ludvig <mludvig@suse.cz>
3890
3891 * linux-low.c (regsets_fetch_inferior_registers),
3892 (regsets_store_inferior_registers): Removed cast to int from
3893 ptrace() calls.
3894 * regcache.h: Added declaration of struct inferior_info.
3895
38962002-04-20 Daniel Jacobowitz <drow@mvista.com>
3897
3898 * inferiors.c (struct inferior_info): Add regcache_data.
3899 (add_inferior): Call create_register_cache.
3900 (clear_inferiors): Call free_register_cache.
3901 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3902 * regcache.c (struct inferior_regcache_data): New.
3903 (registers): Remove.
3904 (get_regcache): New function.
3905 (create_register_cache, free_register_cache): New functions.
3906 (set_register_cache): Don't initialize the register cache here.
3907 (registers_to_string, registers_from_string, register_data): Call
3908 get_regcache.
3909 * regcache.h: Add prototypes.
3910 * server.h: Likewise.
3911
39122002-04-20 Daniel Jacobowitz <drow@mvista.com>
3913
3914 * mem-break.c: New file.
3915 * mem-break.h: New file.
3916 * Makefile.in: Add mem-break.o rule; update server.h
3917 dependencies.
3918 * inferiors.c (struct inferior_info): Add target_data
3919 member.
3920 (clear_inferiors): Free target_data member if set.
3921 (inferior_target_data, set_inferior_target_data): New functions.
3922 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3923 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3924 * linux-low.c (linux_bp_reinsert): New variable.
3925 (struct inferior_linux_data): New.
3926 (linux_create_inferior): Use set_inferior_target_data.
3927 (linux_attach): Likewise. Call add_inferior.
3928 (linux_wait_for_one_inferior): New function.
3929 (linux_wait): Call it.
3930 (linux_write_memory): Add const.
3931 (initialize_low): Call set_breakpoint_data.
3932 * linux-low.h (struct linux_target_ops): Add breakpoint
3933 handling members.
3934 * server.c (attach_inferior): Remove extra add_inferior
3935 call.
3936 * server.h: Include mem-break.h. Update inferior.c
3937 prototypes.
3938 * target.c (read_inferior_memory)
3939 (write_inferior_memory): New functions.
3940 * target.h (read_inferior_memory)
3941 (write_inferior_memory): Change macros to prototypes.
3942 (struct target_ops): Update comments. Add const to write_memory
3943 definition.
3944
39452002-04-11 Daniel Jacobowitz <drow@mvista.com>
3946
3947 * linux-low.c (usr_store_inferior_registers): Support
3948 registers which are allowed to fail to store.
3949 * linux-low.h (linux_target_ops): Likewise.
3950 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3951 (ppc_cannot_store_register): FPSCR may not be storable.
3952
39532002-04-09 Daniel Jacobowitz <drow@mvista.com>
3954
3955 * server.h: Include <string.h> if HAVE_STRING_H.
3956 * ChangeLog: Correct paths in last ChangeLog entry.
3957
39582002-04-09 Daniel Jacobowitz <drow@mvista.com>
3959
3960 * linux-low.h: Remove obsolete prototypes.
3961 (struct linux_target_ops): New.
3962 (extern the_low_target): New.
3963 * linux-low.c (num_regs, regmap): Remove declarations.
3964 (register_addr): Use the_low_target explicitly.
3965 (fetch_register): Likewise.
3966 (usr_fetch_inferior_registers): Likewise.
3967 (usr_store_inferior_registers): Likewise.
3968 * linux-arm-low.c (num_regs): Remove.
3969 (arm_num_regs): Define.
3970 (arm_regmap): Renamed from regmap, made static.
3971 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3972 made static.
3973 (arm_cannot_store_register): Renamed from cannot_store_register,
3974 made static.
3975 (the_low_target): New.
3976 * linux-i386-low.c (num_regs): Remove.
3977 (i386_num_regs): Define.
3978 (i386_regmap): Renamed from regmap, made static.
3979 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3980 made static.
3981 (i386_cannot_store_register): Renamed from cannot_store_register,
3982 made static.
3983 (the_low_target): New.
3984 * linux-ia64-low.c (num_regs): Remove.
3985 (ia64_num_regs): Define.
3986 (ia64_regmap): Renamed from regmap, made static.
3987 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3988 made static.
3989 (ia64_cannot_store_register): Renamed from cannot_store_register,
3990 made static.
3991 (the_low_target): New.
3992 * linux-m68k-low.c (num_regs): Remove.
3993 (m68k_num_regs): Define.
3994 (m68k_regmap): Renamed from regmap, made static.
3995 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3996 made static.
3997 (m68k_cannot_store_register): Renamed from cannot_store_register,
3998 made static.
3999 (the_low_target): New.
4000 * linux-mips-low.c (num_regs): Remove.
4001 (mips_num_regs): Define.
4002 (mips_regmap): Renamed from regmap, made static.
4003 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4004 made static.
4005 (mips_cannot_store_register): Renamed from cannot_store_register,
4006 made static.
4007 (the_low_target): New.
4008 * linux-ppc-low.c (num_regs): Remove.
4009 (ppc_num_regs): Define.
4010 (ppc_regmap): Renamed from regmap, made static.
4011 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4012 made static.
4013 (ppc_cannot_store_register): Renamed from cannot_store_register,
4014 made static.
4015 (the_low_target): New.
4016 * linux-s390-low.c (num_regs): Remove.
4017 (s390_num_regs): Define.
4018 (s390_regmap): Renamed from regmap, made static.
4019 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4020 made static.
4021 (s390_cannot_store_register): Renamed from cannot_store_register,
4022 made static.
4023 (the_low_target): New.
4024 * linux-sh-low.c (num_regs): Remove.
4025 (sh_num_regs): Define.
4026 (sh_regmap): Renamed from regmap, made static.
4027 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4028 made static.
4029 (sh_cannot_store_register): Renamed from cannot_store_register,
4030 made static.
4031 (the_low_target): New.
4032 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4033 (the_low_target): New.
4034
40352002-04-09 Daniel Jacobowitz <drow@mvista.com>
4036
4037 * Makefile.in: Add stamp-h target.
4038 * configure.in: Create stamp-h.
4039 * configure: Regenerated.
4040
40412002-04-09 Daniel Jacobowitz <drow@mvista.com>
4042
4043 * inferiors.c: New file.
4044 * target.c: New file.
4045 * target.h: New file.
4046 * Makefile.in: Add target.o and inferiors.o. Update
4047 dependencies.
4048 * linux-low.c (inferior_pid): New static variable,
4049 moved from server.c.
4050 (linux_create_inferior): Renamed from create_inferior.
4051 Call add_inferior. Return 0 on success instead of a PID.
4052 (linux_attach): Renamed from myattach.
4053 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4054 (linux_thread_alive): Renamed from mythread_alive.
4055 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4056 child dies.
4057 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4058 (regsets_store_inferior_registers): Correct error message.
4059 Add missing ``return 0''.
4060 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4061 (linux_store_registers): Renamed from store_inferior_registers.
4062 (linux_read_memory): Renamed from read_inferior_memory.
4063 (linux_write_memory): Renamed from write_inferior_memory.
4064 (linux_target_ops): New structure.
4065 (initialize_low): Call set_target_ops ().
4066 * remote-utils.c (unhexify): New function.
4067 (hexify): New function.
4068 (input_interrupt): Send signals to ``signal_pid''.
4069 * server.c (inferior_pid): Remove.
4070 (start_inferior): Update create_inferior call.
4071 (attach_inferior): Call add_inferior.
4072 (handle_query): New function.
4073 (main): Call handle_query for `q' packets.
4074 * server.h: Include "target.h". Remove obsolete prototypes.
4075 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4076
40772002-04-09 Daniel Jacobowitz <drow@mvista.com>
4078
4079 * Makefile.in: Add WARN_CFLAGS. Update configury
4080 dependencies.
4081 * configure.in: Check for <string.h>
4082 * configure: Regenerate.
4083 * config.in: Regenerate.
4084 * gdbreplay.c: Include needed system headers.
4085 (remote_open): Remove strchr prototype.
4086 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4087 * regcache.c (supply_register): Change buf argument to const void *.
4088 (supply_register_by_name): Likewise.
4089 (collect_register): Change buf argument to void *.
4090 (collect_register_by_name): Likewise.
4091 * regcache.h: Add missing prototypes.
4092 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4093 * server.c (handle_query): New function.
4094 (attached): New static variable, moved out of main.
4095 (main): Quiet longjmp clobber warnings.
4096 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4097 * utils.c (error): Remove NORETURN.
4098 (fatal): Likewise.