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