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