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