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