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