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