]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
fd7dd3e6
PA
12009-11-16 Pedro Alves <pedro@codesourcery.com>
2
3 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4 Pass it to thread_db_free.
5 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6 proper `detaching' argument to linux_remove_process.
7 * linux-low.h (thread_db_free): Add `detaching' parameter.
8 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9 to thread_db_free.
10 (thread_db_free): Add `detaching' parameter. Only
11 call td_ta_clear_event if detaching from process.
12
75aa492e
MK
132009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14
15 * thread-db.c (thread_db_free): Fix typo.
16
21e1bee4
PP
172009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18
19 PR gdb/10838
20 * thread-db.c (thread_db_free): Call td_ta_clear_event.
21
8838b45e
NS
222009-11-03 Nathan Sidwell <nathan@codesourcery.com>
23
24 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
25 with an i686 compiler.
26 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
27 needed.
28 * configure: Rebuilt.
29
8a35fb51
SL
302009-10-29 Sandra Loosemore <sandra@codesourcery.com>
31
32 PR gdb/10783
33
34 * server.c (handle_search_memory_1): Correct read_addr initialization
35 in loop for searching subsequent chunks.
36
96f15937
PP
372009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
38
39 * configure.ac: New --with-libthread-db option.
40 * thread-db.c: Allow direct dependence on libthread_db.
41 (thread_db_free): Adjust.
42 * config.in: Regenerate.
43 * configure: Likewise.
44
5f7d1694
PP
452009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
46
47 PR gdb/10757
48 * thread-db.c (attach_thread): New function.
49 (maybe_attach_thread): Return success/failure.
50 (find_new_threads_callback): Adjust.
51 (thread_db_find_new_threads): Loop until no new threads.
52
88e3b899
PA
532009-10-13 Pedro Alves <pedro@codesourcery.com>
54
55 * proc-service.c (ps_lgetregs): Formatting.
56
cdbfd419
PP
572009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
58
59 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
60 * configure.ac: Adjust.
61 * linux-low.h (struct process_info_private): Move members to struct
62 thread_db.
63 (thread_db_free, thread_db_handle_monitor_command): New prototype.
64 * linux-low.c (linux_remove_process): Adjust.
65 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
66 * server.c (handle_query): Move code ...
67 (handle_monitor_command): ... here. New function.
68 * target.h (struct target_ops): New member.
69 * thread-db.c (struct thread_db): New.
70 (libthread_db_search_path): New variable.
71 (thread_db_create_event, thread_db_enable_reporting)
72 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
73 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
74 (try_thread_db_load_1, dladdr_to_soname): New functions.
75 (try_thread_db_load, thread_db_load_search): New functions.
76 (thread_db_init): Search for libthread_db.
77 (thread_db_free): New function.
78 (thread_db_handle_monitor_command): Likewise.
79 * config.in: Regenerate.
80 * configure: Regenerate.
81
4168d2d6
UW
822009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
83
84 * spu-low.c (spu_kill): Wait for inferior to terminate.
85 Call clear_inferiors.
86 (spu_detach): Call clear_inferiors.
87
81ecdfbb
RW
882009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
89
90 * aclocal.m4: Regenerate.
91 * config.in: Likewise.
92 * configure: Likewise.
93
0b9ff2c0
UW
942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
95
96 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
97 (parse_spufs_run): New function.
98 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
99 (ppc_breakpoint_at): Handle SPU breakpoints.
100
efcbbd14
UW
1012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
102
103 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
104 (SPUFS_MAGIC): Define.
105 (spu_enumerate_spu_ids): New function.
106 (linux_qxfer_spu): New function.
107 (linux_target_ops): Install linux_qxfer_spu.
108
f4d9bade
UW
1092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
110
111 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
112 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
113 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
114 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
115 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
116 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
117 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
118 (init_registers_powerpc_cell32l): Add prototype.
119 (init_registers_powerpc_cell64l): Likewise.
120 (ppc_arch_setup): Detect Cell/B.E. architecture.
121
96e946ca
RW
1222009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
123
124 * Makefile.in (datarootdir): New variable.
125
58d6951d
DJ
1262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
127
128 * linux-low.c (linux_write_memory): Update debugging output.
129 * Makefile.in (clean): Add new descriptions.
130 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
131 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
132 * configure.srv: Add new files for arm*-*-linux*.
133 * linux-arm-low.c: Add new declarations.
134 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
135 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
136 (HWCAP_VFPv3D16): New.
137 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
138 instead of __IWMMXT__.
139 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
140 (arm_arch_setup): New.
141 (target_regsets): Remove #ifdef. Add VFP regset.
142 (the_low_target): Use arm_arch_setup.
143
12b42a12
DJ
1442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
145
146 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
147 the main thread again.
148
ac8c974e
AR
1492009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
150
151 Adding Neutrino gdbserver.
152 * configure: Regenerated.
153 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
154 * configure.srv (i[34567]86-*-nto*): New target.
155 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
156 * remote-utils.c [__QNX__]: Include sys/iomgr.h
157 (nto_comctrl) [__QNX__]: New function.
158 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
159
4424e0c3 1602009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
161
162 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
163 srv_tgtobj.
164
912cf4ba
PA
1652009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
166 Pedro Alves <pedro@codesourcery.com>
167
168 * win32-i386-low.c (i386_get_thread_context): Handle systems that
169 don't support CONTEXT_EXTENDED_REGISTERS.
170 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
171 (the_low_target): Install them.
172 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
173 failing with ERROR_PIPE_NOT_CONNECTED.
174
aa5ca48f
DE
1752009-06-30 Doug Evans <dje@google.com>
176 Pierre Muller <muller@ics.u-strasbg.fr>
177
178 Add h/w watchpoint support to x86-linux, win32-i386.
179 * Makefile.in (SFILES): Add i386-low.c
180 (i386_low_h): Define.
181 (i386-low.o): Add dependencies.
182 (linux-x86-low.o): Add i386-low.h dependency.
183 (win32-i386-low.o): Ditto.
184 * i386-low.c: New file.
185 * i386-low.h: New file.
186 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
187 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
188 * linux-low.c (linux_add_process): Initialize arch_private.
189 (linux_remove_process): Free arch_private.
190 (add_lwp): Initialize arch_private.
191 (delete_lwp): Free arch_private.
192 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
193 provided.
194 * linux-low.h (process_info_private): New member arch_private.
195 (lwp_info): New member arch_private.
196 (linux_target_ops): New members new_process, new_thread,
197 prepare_to_resume.
198 (ptid_of): New macro.
199 * linux-x86-low.c: Include stddef.h, i386-low.h.
200 (arch_process_info): New struct.
201 (arch_lwp_info): New struct.
202 (x86_linux_dr_get, x86_linux_dr_set): New functions.
203 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
204 (i386_dr_low_get_status): New function.
205 (x86_insert_point, x86_remove_point): New functions.
206 (x86_stopped_by_watchpoint): New function.
207 (x86_stopped_data_address): New function.
208 (x86_linux_new_process, x86_linux_new_thread): New functions.
209 (x86_linux_prepare_to_resume): New function.
210 (the_low_target): Add entries for insert_point, remove_point,
211 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
212 prepare_to_resume.
213 * server.c (debug_hw_points): New global.
214 (monitor_show_help): Document set debug-hw-points.
215 (handle_query): Process "set debug-hw-points".
216 * server.h (debug_hw_points): Declare.
217 (paddress): Declare.
218 * utils.c (NUMCELLS, CELLSIZE): New macros.
219 (get_sell, xsnprintf, paddress): New functions.
220 * win32-arm-low.c (the_low_target): Add entries for insert_point,
221 remove_point, stopped_by_watchpoint, stopped_data_address.
222 * win32-i386-low.c: Include i386-low.h.
223 (debug_reg_state): Replaces dr.
224 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
225 (i386_dr_low_get_status): New function.
226 (i386_insert_point, i386_remove_point): New functions.
227 (i386_stopped_by_watchpoint): New function.
228 (i386_stopped_data_address): New function.
229 (i386_initial_stuff): Update.
230 (get_thread_context,set_thread_context,i386_thread_added): Update.
231 (the_low_target): Add entries for insert_point,
232 remove_point, stopped_by_watchpoint, stopped_data_address.
233 * win32-low.c (win32_insert_watchpoint): New function.
234 (win32_remove_watchpoint): New function.
235 (win32_stopped_by_watchpoint): New function.
236 (win32_stopped_data_address): New function.
237 (win32_target_ops): Add entries for insert_watchpoint,
238 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
239 * win32-low.h (win32_target_ops): New members insert_point,
240 remove_point, stopped_by_watchpoint, stopped_data_address.
241
d993e290
PA
2422009-06-25 Pedro Alves <pedro@codesourcery.com>
243
244 * server.c (process_serial_event): Re-return unsupported, not
245 error, if the type isn't recognized. Re-allow supporting only
246 insert or remove packets. Also call require_running for
247 breakpoints. Add missing break statement to default case. Tidy.
248 * target.h (struct target_ops): Rename insert_watchpoint to
249 insert_point, and remove_watchpoint to remove_point.
250
251 * linux-low.h (struct linux_target_ops): Likewise.
252 * linux-low.c (linux_insert_watchpoint): Rename to ...
253 (linux_insert_point): ... this. Adjust.
254 (linux_remove_watchpoint): Rename to ...
255 (linux_remove_point): ... this. Adjust.
256 (linux_target_ops): Adjust.
257 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
258 (cris_insert_point): ... this.
259 (cris_remove_watchpoint): Rename to ...
260 (cris_remove_point): ... this.
261 (the_low_target): Adjust.
262
0f54c268
PM
2632009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
264
265 * server.c (handle_v_kill): Pass signal_pid to
266 kill_inferior if multi_process is zero.
267
c6314022
AR
2682009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
269
270 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
271 * target.h (target_ops): Comment for *_watchpoint to make it clear
272 the functions can get types '0' and '1'.
273
4463ce24
AR
2742009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
275
276 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
277 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
278 * regcache.c (get_regcache): Likewise.
279 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
280 * win32-low.c (child_fetch_inferior_registers): Remove check for
281 regno 0.
282
cf8fd78b
PA
2832009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
284 Pedro Alves <pedro@codesourcery.com>
285
286 * target.h (struct target_ops) <supports_multi_process>: New
287 callback.
288 (target_supports_multi_process): New.
289 * server.c (handle_query): Even if GDB reports support, only
290 enable multi-process if the target also supports it. Report
291 multi-process support only if the target backend supports it.
292 * linux-low.c (linux_supports_multi_process): New function.
293 (linux_target_ops): Install it as target_supports_multi_process
294 callback.
295
47c0c975
DE
2962009-05-24 Doug Evans <dje@google.com>
297
e09875d4
DE
298 Global renaming of find_thread_pid to find_thread_ptid.
299 * server.h (find_thread_ptid): Renamed from find_thread_pid.
300 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
301 All callers updated.
302
e27d73f6
DE
303 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
304 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
305 directly.
306
47c0c975
DE
307 * linux-low.c (get_stop_pc): Print pc if debug_threads.
308 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
309 (linux_resume_one_lwp): Ditto.
310
2acc282a
DE
3112009-05-23 Doug Evans <dje@google.com>
312
313 * linux-low.c (linux_resume_one_lwp): Change type of first arg
314 from struct inferior_list_entry * to struct lwp_info *.
315 All callers updated.
316
9f1036c1
DE
3172009-05-13 Doug Evans <dje@google.com>
318
319 * linux-x86-low.c: Don't include assert.h.
320 (x86_siginfo_fixup): Use fatal, not assert.
321 (x86_arch_setup): Fix comment.
322
d0722149
DE
3232009-05-12 Doug Evans <dje@google.com>
324
325 Biarch support for i386/amd64 gdbserver.
326 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
327 Add linux-x86-low.c.
328 (linux-i386-low.o, linux-x86-64-low.o): Delete.
329 (linux-x86-low.o): Add.
330 * linux-x86-64-low.c: Delete.
331 * linux-i386-low.c: Delete.
332 * linux-x86-low.c: New file.
333 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
334 linux-x86-low.o.
335 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
336 linux-x86-low.o.
337 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
338 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
339 (linux_child_pid_to_exec_file): New function.
340 (elf_64_header_p, elf_64_file_p): New functions.
341 (siginfo_fixup): New function.
342 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
343 give target a chance to convert layout.
344 * linux-low.h (linux_target_ops): New member siginfo_fixup.
345 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
346
fdeb2a12
DE
3472009-05-07 Doug Evans <dje@google.com>
348
349 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
350 (regsets_store_inferior_registers): Ditto.
351
a6dbe5df
PA
3522009-05-06 Pedro Alves <pedro@codesourcery.com>
353
354 PR server/10048
355
356 * linux-low.c (must_set_ptrace_flags): Delete.
357 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
358 of the global.
359 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
360 `lwp->must_set_ptrace_flags' instead.
ba42693b 361 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
362 (linux_wait_1): ... not here.
363
5091eb23
DE
3642009-04-30 Doug Evans <dje@google.com>
365
9f767825
DE
366 * inferiors.c (started_inferior_callback): New function.
367 (attached_inferior_callback): New function.
368 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
369 * server.c (print_started_pid, print_attached_pid): New functions.
370 (detach_or_kill_for_exit): New function.
371 (main): Call it instead of for_each_inferior (kill_inferior_callback).
372 * server.h (have_started_inferiors_p): Declare.
373 (have_attached_inferiors_p): Declare.
374
5091eb23
DE
375 * inferiors.c (remove_process): Fix memory leak, free process.
376 * linux-low.c (linux_remove_process): New function.
377 (linux_kill): Call it instead of remove_process.
378 (linux_detach, linux_wait_1): Ditto.
379
155c8968
PA
3802009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
381
382 * configure.srv: Add x86 Windows CE target.
383
7fe519cb
UW
3842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
385
386 * inferiors.c (get_thread_process): Make global.
387 * server.h (get_thread_process): Add prototype.
388 * thread-db.c (find_one_thread): Use get_thread_process
389 instead of current_process.
390 (thread_db_get_tls_address): Do not crash if called when
391 thread layer is not yet initialized.
392
5472f405
UW
3932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
394
395 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
396 * spu-low.c (current_tid): Rename to ...
397 (current_ptid): ... this.
398 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
399 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
400 ptid_get_lwp (current_ptid) instead of current_tid.
401 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
402 instead of current_tid. Use find_process_pid to verify pid
403 argument is valid. Pass proper argument to remove_process.
404 (spu_thread_alive): Compare current_ptid instead of current_tid.
405 (spu_resume): Likewise.
406
55ac2b99
PA
4072009-04-02 Pedro Alves <pedro@codesourcery.com>
408
409 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
410 variable.
411
95954743
PA
4122009-04-01 Pedro Alves <pedro@codesourcery.com>
413
414 Implement the multiprocess extensions, and add linux multiprocess
415 support.
416
417 * server.h (ULONGEST): Declare.
418 (struct ptid, ptid_t): New.
419 (minus_one_ptid, null_ptid): Declare.
420 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
421 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
422 (struct inferior_list_entry): Change `id' type from unsigned from
423 to ptid_t.
424 (struct sym_cache, struct breakpoint, struct
425 process_info_private): Forward declare.
426 (struct process_info): Declare.
427 (current_process): Declare.
428 (all_processes): Declare.
429 (initialize_inferiors): Declare.
430 (add_thread): Adjust to use ptid_t.
431 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
432 (add_process, remove_process, find_thread_pid): Declare.
433 (find_inferior_id): Adjust to use ptid_t.
434 (cont_thread, general_thread, step_thread): Change type to ptid_t.
435 (multi_process): Declare.
436 (push_event): Adjust to use ptid_t.
437 (read_ptid, write_ptid): Declare.
438 (prepare_resume_reply): Adjust to use ptid_t.
439 (clear_symbol_cache): Declare.
440 * inferiors.c (all_processes): New.
441 (null_ptid, minus_one_ptid): New.
442 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
443 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
444 (add_thread): Change unsigned long to ptid. Remove gdb_id
445 parameter. Adjust.
446 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
447 (gdb_id_to_thread): Rename to ...
448 (find_thread_pid): ... this. Change unsigned long to ptid.
449 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
450 (loaded_dll, pull_pid_from_list): Adjust.
451 (add_process, remove_process, find_process_pid)
452 (get_thread_process, current_process, initialize_inferiors): New.
453 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
454 (struct target_waitstatus) <related_pid>: Ditto.
455 (struct target_ops) <kill, detach>: Add `pid' argument. Change
456 return type to int.
457 (struct target_ops) <join>: Add `pid' argument.
458 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
459 (struct target_ops) <wait>: Add `ptid' field. Change return type
460 to ptid.
461 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
462 (mywait): Add `ptid' argument. Change return type to ptid_t.
463 (target_pid_to_str): Declare.
464 * target.c (set_desired_inferior): Adjust to use ptids.
465 (mywait): Add new `ptid' argument. Adjust.
466 (target_pid_to_str): New.
467 * mem-break.h (free_all_breakpoints): Declare.
468 * mem-break.c (breakpoints): Delelete.
469 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
470 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
471 to use per-process breakpoint list.
472 (free_all_breakpoints): New.
473 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
474 (symbol_cache, all_symbols_looked_up): Delete.
475 (hexchars): New.
476 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
477 read_ptid): New.
478 (prepare_resume_reply): Change ptid argument's type from unsigned
479 long to ptid_t. Adjust. Implement W;process and X;process.
480 (free_sym_cache, clear_symbol_cache): New.
481 (look_up_one_symbol): Adjust to per-process symbol cache. *
482 * server.c (cont_thread, general_thread, step_thread): Change type
483 to ptid_t.
484 (attached): Delete.
485 (multi_process): New.
486 (last_ptid): Change type to ptid_t.
487 (struct vstop_notif) <ptid>: Change type to ptid_t.
488 (queue_stop_reply, push_event): Change `ptid' argument's type to
489 ptid_t.
490 (discard_queued_stop_replies): Add `pid' argument.
491 (start_inferior): Adjust to use ptids. Adjust to mywait interface
492 changes. Don't reference the `attached' global.
493 (attach_inferior): Adjust to mywait interface changes.
494 (handle_query): Adjust to use ptids. Parse GDB's qSupported
495 features. Handle and report "multiprocess+". Handle
496 "qAttached:PID".
497 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
498 changes.
499 (handle_v_kill): New.
500 (handle_v_stopped): Adjust to use target_pid_to_str.
501 (handle_v_requests): Allow multiple attaches and runs when
502 multiprocess extensions are in effect. Handle "vKill".
503 (myresume): Adjust to use ptids.
504 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
505 (handle_status): Adjust to discard_queued_stop_replies interface
506 change.
507 (first_thread_of, kill_inferior_callback)
508 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
509 (main): Call initialize_inferiors. Adjust to use ptids, killing
510 and detaching from all inferiors. Handle multiprocess packet
511 variants.
512 * linux-low.h: Include gdb_proc_service.h.
513 (struct process_info_private): New.
514 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
515 <lwpid_of>: Use ptid_get_lwp.
516 (get_lwp_thread): Adjust.
517 (struct lwp_info): Add `dead' member.
518 (find_lwp_pid): Declare.
519 * linux-low.c (thread_db_active): Delete.
520 (new_inferior): Adjust comment.
521 (inferior_pid): Delete.
522 (linux_add_process): New.
523 (handle_extended_wait): Adjust.
524 (add_lwp): Change unsigned long to ptid.
525 (linux_create_inferior): Add process to processes table. Adjust
526 to use ptids. Don't set new_inferior here.
527 (linux_attach_lwp): Rename to ...
528 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
529 it. Adjust to use ptids.
530 (linux_attach_lwp): New.
531 (linux_attach): Add process to processes table. Don't set
532 new_inferior here.
533 (struct counter): New.
534 (second_thread_of_pid_p, last_thread_of_process_p): New.
535 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
536 multiple processes.
537 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
538 processes. Remove process from process table.
539 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
540 to multiple processes.
541 (any_thread_of): New.
542 (linux_detach): Add `pid' argument, and handle it. Remove process
543 from processes table.
544 (linux_join): Add `pid' argument. Handle it.
545 (linux_thread_alive): Change unsighed long argument to ptid_t.
546 Consider dead lwps as not being alive.
547 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
548 threads we're not interested in.
549 (same_lwp, find_lwp_pid): New.
550 (linux_wait_for_lwp): Change `pid' argument's type from int to
551 ptid_t. Adjust.
552 (linux_wait_for_event): Rename to ...
553 (linux_wait_for_event_1): ... this. Change `pid' argument's type
554 from int to ptid_t. Adjust.
555 (linux_wait_for_event): New.
556 (linux_wait_1): Add `ptid' argument. Change return type to
557 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
558 that exit from the process table.
559 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
560 Adjust.
561 (mark_lwp_dead): New.
562 (wait_for_sigstop): Adjust to use ptids. If a process exits while
563 stopping all threads, mark its main lwp as dead.
564 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
565 ptids.
566 (fetch_register, usr_store_inferior_registers)
567 (regsets_fetch_inferior_registers)
568 (regsets_store_inferior_registers, linux_read_memory)
569 (linux_write_memory): Inline `inferior_pid'.
570 (linux_look_up_symbols): Adjust to use per-process
571 `thread_db_active'.
572 (linux_request_interrupt): Adjust to use ptids.
573 (linux_read_auxv): Inline `inferior_pid'.
574 (initialize_low): Don't reference thread_db_active.
575 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
576 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
577 (ps_getpid): Return the pid of the current inferior.
578 * thread-db.c (proc_handle, thread_agent): Delete.
579 (thread_db_create_event, thread_db_enable_reporting): Adjust to
580 per-process data.
581 (find_one_thread): Change argument type to ptid_t. Adjust to
582 per-process data.
583 (maybe_attach_thread): Adjust to per-process data and ptids.
584 (thread_db_find_new_threads): Ditto.
585 (thread_db_init): Ditto.
586 * spu-low.c (spu_create_inferior, spu_attach): Add process to
587 processes table. Adjust to use ptids.
588 (spu_kill, spu_detach): Adjust interface. Remove process from
589 processes table.
590 (spu_join, spu_thread_alive): Adjust interface.
591 (spu_wait): Adjust interface. Remove process from processes
592 table. Adjust to use ptids.
593 * win32-low.c (current_inferior_tid): Delete.
594 (current_inferior_ptid): New.
595 (debug_event_ptid): New.
596 (thread_rec): Take a ptid. Adjust.
597 (child_add_thread): Add `pid' argument. Adjust to use ptids.
598 (child_delete_thread): Ditto.
599 (do_initial_child_stuff): Add `attached' argument. Add process to
600 processes table.
601 (child_fetch_inferior_registers, child_store_inferior_registers):
602 Adjust.
603 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
604 (win32_attach): Pass 1 to do_initial_child_stuff.
605 (win32_kill): Adjust interface. Remove process from processes
606 table.
607 (win32_detach): Ditto.
608 (win32_join): Adjust interface.
609 (win32_thread_alive): Take a ptid.
610 (win32_resume): Adjust to use ptids.
611 (get_child_debug_event): Ditto.
612 (win32_wait): Adjust interface. Remove exiting process from
613 processes table.
614
bd99dc85
PA
6152009-04-01 Pedro Alves <pedro@codesourcery.com>
616
617 Non-stop mode support.
618
619 * server.h (non_stop): Declare.
620 (gdb_client_data, handler_func): Declare.
621 (delete_file_handler, add_file_handler, start_event_loop):
622 Declare.
623 (handle_serial_event, handle_target_event, push_event)
624 (putpkt_notif): Declare.
625 * target.h (enum resume_kind): New.
626 (struct thread_resume): Replace `step' field by `kind' field.
627 (TARGET_WNOHANG): Define.
628 (struct target_ops) <wait>: Add `options' argument.
629 <supports_non_stop, async, start_non_stop>: New fields.
630 (target_supports_non_stop, target_async): New.
631 (start_non_stop): Declare.
632 (mywait): Add `options' argument.
633 * target.c (mywait): Add `options' argument. Print child exit
634 notifications here.
635 (start_non_stop): New.
636 * server.c (non_stop, own_buf, mem_buf): New globals.
637 (struct vstop_notif): New.
638 (notif_queue): New global.
639 (queue_stop_reply, push_event, discard_queued_stop_replies)
640 (send_next_stop_reply): New.
641 (start_inferior): Adjust to use resume_kind. Adjust to mywait
642 interface changes.
643 (attach_inferior): In non-stop mode, don't wait for the target
644 here.
645 (handle_general_set): Handle QNonStop.
646 (handle_query): When handling qC, return the current general
647 thread, instead of the first thread of the list.
648 (handle_query): If the backend supports non-stop mode, include
649 QNonStop+ in the qSupported query response.
650 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
651 and non-stop mode.
652 (handle_v_attach, handle_v_run): Handle non-stop mode.
653 (handle_v_stopped): New.
654 (handle_v_requests): Report support for vCont;t. Handle vStopped.
655 (myresume): Adjust to use resume_kind. Handle non-stop.
656 (queue_stop_reply_callback): New.
657 (handle_status): Handle non-stop mode.
658 (main): Clear non_stop flag on reconnection. Use the event-loop.
659 Refactor serial protocol handling from here ...
660 (process_serial_event): ... to this new function. When GDB
661 selects any thread, select one here. In non-stop mode, wait until
662 GDB acks all pending events before exiting.
663 (handle_serial_event, handle_target_event): New.
664 * remote-utils.c (remote_open): Install remote_desc in the event
665 loop.
666 (remote_close): Remove remote_desc from the event loop.
667 (putpkt_binary): Rename to...
668 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
669 (putpkt_binary): New as wrapper around putpkt_binary_1.
670 (putpkt_notif): New.
671 (prepare_resume_reply): In non-stop mode, don't change the
672 general_thread.
673 * event-loop.c: New.
674 * Makefile.in (OBJ): Add event-loop.o.
675 (event-loop.o): New rule.
676
677 * linux-low.h (pid_of): Moved here.
678 (lwpid_of): New.
679 (get_lwp_thread): Use lwpid_of.
680 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
681 * linux-low.c (pid_of): Delete.
682 (inferior_pid): Use lwpid_of.
683 (linux_event_pipe): New.
684 (target_is_async_p): New.
685 (delete_lwp): New.
686 (handle_extended_wait): Use lwpid_of.
687 (add_lwp): Don't set lwpid field.
688 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
689 (linux_kill_one_lwp): If killing a running lwp, stop it first.
690 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
691 (linux_detach_one_lwp): If detaching from a running lwp, stop it
692 first. Adjust to linux_wait_for_event interface changes. Use
693 lwpid_of.
694 (linux_detach): Don't delete the main lwp here.
695 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
696 (status_pending_p): Don't consider explicitly suspended lwps.
697 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
698 pointer. Add OPTIONS argument. Change return type to int. Use
699 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
700 (linux_wait_for_event): Take an integer pid instead of a lwp_info
701 pointer. Add status pointer argument. Return a pid instead of a
702 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
703 changes. In non-stop mode, don't switch to a random thread.
704 (linux_wait): Rename to...
705 (linux_wait_1): ... this. Add target_options argument, and handle
706 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
707 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
708 clean exit and signal exit code. Don't stop all threads in
709 non-stop mode. In all-stop mode, only stop all threads when
710 reporting a stop to GDB. Handle explicit thread stop requests.
711 (async_file_flush, async_file_mark): New.
712 (linux_wait): New.
713 (send_sigstop): Use lwpid_of.
714 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
715 interface changes. In non-stop mode, don't switch to a random
716 thread.
717 (linux_resume_one_lwp): Use lwpid_of.
718 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
719 (linux_resume_one_thread): ... this. Handle resume_stop. In
720 non-stop mode, don't look for pending flag in all threads.
721 (resume_status_pending_p): Don't consider explicitly suspended
722 threads.
723 (my_waitpid): Reimplement. Emulate __WALL.
724 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
725 Use lwpid_of.
726 (sigchld_handler, linux_supports_non_stop, linux_async)
727 (linux_start_non_stop): New.
728 (linux_target_ops): Register linux_supports_non_stop, linux_async
729 and linux_start_non_stop.
730 (initialize_low): Install SIGCHLD handler.
731 * thread-db.c (thread_db_create_event, find_one_thread)
732 (thread_db_get_tls_address): Use lwpid_of.
733 * win32-low.c (win32_detach): Adjust to use resume_kind.
734 (win32_wait): Add `options' argument.
735 * spu-low.c (spu_resume): Adjust to use resume_kind.
736 (spu_wait): Add `options' argument.
737
5b1c542e
PA
7382009-04-01 Pedro Alves <pedro@codesourcery.com>
739
740 Decouple target code from remote protocol.
741
742 * target.h (enum target_waitkind): New.
743 (struct target_waitstatus): New.
744 (struct target_ops) <wait>: Return an unsigned long. Take a
745 target_waitstatus pointer instead of a char pointer.
746 (mywait): Likewise.
747 * target.c (mywait): Change prototype to return an unsigned long.
748 Take a target_waitstatus pointer instead of a char pointer. Adjust.
749 * server.h (thread_from_wait, old_thread_from_wait): Delete
750 declarations.
751 (prepare_resume_reply): Change prototype to take a
752 target_waitstatus.
753 * server.c (thread_from_wait, old_thread_from_wait): Delete.
754 (last_status, last_ptid): New.
755 (start_inferior): Remove "statusptr" argument. Adjust. Return a
756 pid instead of a signal.
757 (attach_inferior): Remove "status" and "signal" parameters.
758 Adjust.
759 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
760 not as an address.
761 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
762 (handle_v_requests, myresume): Remove "status" and "signal"
763 parameters. Adjust.
764 (handle_status): New.
765 (main): Delete local `status'. Adjust.
766 * remote-utils.c: Include target.h.
767 (prepare_resume_reply): Change prototype to take a
768 target_waitstatus. Adjust.
769
770 * linux-low.c (linux_wait): Adjust to new target_ops->wait
771 interface.
772 * spu-low.c (spu_wait): Adjust.
773 * win32-low.c (enum target_waitkind, struct target_waitstatus):
774 Delete.
775 (win32_wait): Adjust.
776
2bd7c093
PA
7772009-04-01 Pedro Alves <pedro@codesourcery.com>
778
779 * target.h (struct thread_resume): Delete leave_stopped member.
780 (struct target_ops): Add a `n' argument to the `resume' callback.
781 * server.c (start_inferior): Adjust.
782 (handle_v_cont, myresume): Adjust.
783 * linux-low.c (check_removed_breakpoint): Adjust to resume
784 interface change, and to removed leave_stopped field.
785 (resume_ptr): Delete.
786 (struct thread_resume_array): New.
787 (linux_set_resume_request): Add new `arg' parameter. Adjust to
788 resume interface change.
789 (linux_continue_one_thread, linux_queue_one_thread)
790 (resume_status_pending_p): Check if the resume field is NULL
791 instead of checking the leave_stopped member.
792 (linux_resume): Adjust to the target resume interface change.
793 * spu-low.c (spu_resume): Adjust to the target resume interface
794 change.
795 * win32-low.c (win32_detach, win32_resume): Ditto.
796
c35fafde
PA
7972009-04-01 Pedro Alves <pedro@codesourcery.com>
798
799 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
800 flag.
801 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
802 pending.
803 (linux_continue_one_thread): Only preserve the stepping flag if
804 there's a pending breakpoint.
805
0a59d50b
PA
8062009-03-31 Pedro Alves <pedro@codesourcery.com>
807
808 * server.c (main): After the inferior having exited, call
809 remote_close before exiting gdbserver.
810
f04c6d38
TJB
8112009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
812
813 Fix size of FPSCR in Power 7 processors.
814 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
815 (PPC_FEATURE_HAS_DFP): New #define.
816 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
817 size of the FPSCR.
818
78e5cee6
PA
8192009-03-23 Pedro Alves <pedro@codesourcery.com>
820
821 * server.c (handle_query) Whitespace and formatting.
822
1b3f6016
PA
8232009-03-22 Pedro Alves <pedro@codesourcery.com>
824
825 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
826 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
827 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
828 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
829 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
830 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
831 Makefile.in, configure.ac: Fix whitespace throughout.
832 * configure: Regenerate.
833
a07b2135
PA
8342009-03-22 Pedro Alves <pedro@codesourcery.com>
835
836 * inferiors.c (find_inferior): Make it safe for the callback
837 function to delete the currently iterated inferior.
838
67cc2626
PA
8392009-03-22 Pedro Alves <pedro@codesourcery.com>
840
841 * Makefile.in (linuw_low_h): Move higher.
842 (thread-db.o): Depend on $(linux_low_h).
843
54a0b537
PA
8442009-03-17 Pedro Alves <pedro@codesourcery.com>
845
846 Rename "process" to "lwp" throughout.
847
848 * linux-low.c (all_processes): Rename to...
849 (all_lwps): ... this.
850 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
851 (add_process): Rename to ...
852 (add_lwp): ... this. Adjust.
853 (linux_create_inferior): Adjust.
854 (linux_attach_lwp): Adjust.
855 (linux_attach): Adjust.
856 (linux_kill_one_process): Rename to ...
857 (linux_kill_one_lwp): ... this. Adjust.
858 (linux_kill): Adjust.
859 (linux_detach_one_process): Rename to ...
860 (linux_detach_one_lwp): ... this. Adjust.
861 (linux_detach): Adjust.
862 (check_removed_breakpoint): Adjust.
863 (status_pending_p): Adjust.
864 (linux_wait_for_process): Rename to ...
865 (linux_wait_for_lwp): ... this. Adjust.
866 (linux_wait_for_event): Adjust.
867 (send_sigstop): Adjust.
868 (wait_for_sigstop): Adjust.
869 (stop_all_processes): Rename to ...
870 (stop_all_lwps): ... this.
871 (linux_resume_one_process): Rename to ...
872 (linux_resume_one_lwp): ... this. Adjust.
873 (linux_set_resume_request, linux_continue_one_thread)
874 (linux_queue_one_thread, resume_status_pending_p)
875 (usr_store_inferior_registers, regsets_store_inferior_registers)
876 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
877 Adjust.
878 * linux-low.h (get_process): Rename to ...
879 (get_lwp): ... this. Adjust.
880 (get_thread_process): Rename to ...
881 (get_thread_lwp): ... this. Adjust.
882 (get_process_thread): Rename to ...
883 (get_lwp_thread): ... this. Adjust.
884 (struct process_info): Rename to ...
885 (struct lwp_info): ... this.
886 (all_processes): Rename to ...
887 (all_lwps): ... this.
888 * proc-service.c (ps_lgetregs): Adjust.
889 * thread-db.c (thread_db_create_event, find_one_thread)
890 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
891
0b16c5cf
PA
8922009-03-14 Pedro Alves <pedro@codesourcery.com>
893
894 * server.c (handle_query): Handle "qAttached".
895
32de4b9d
NS
8962009-03-13 Nathan Sidwell <nathan@codesourcery.com>
897
898 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
899 GPLv3, update license URL.
900
2aecd87f
DE
9012009-03-01 Doug Evans <dje@google.com>
902
93efd302 903 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
904 (server_h): Add gdb_signals.h.
905 (signals.o): Update.
906 * server.h (target_signal_from_host,target_signal_to_host_p)
907 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
908
86b1f9c5
PM
9092009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
910
911 * remote-utils.c (getpkt): Also generate remote-debug
912 information if noack_mode is set.
913
4aa995e1
PA
9142009-02-06 Pedro Alves <pedro@codesourcery.com>
915
916 * server.c (handle_query): Report qXfer:siginfo:read and
917 qXfer:siginfo:write as supported and handle them.
918 * target.h (struct target_ops) <qxfer_siginfo>: New field.
919 * linux-low.c (linux_xfer_siginfo): New.
920 (linux_target_ops): Set it.
921
62709adf
PA
9222009-01-26 Pedro Alves <pedro@codesourcery.com>
923
924 * server.c (gdbserver_usage): Mention --remote-debug.
925 (main): Accept '--remote-debug' switch.
926
aef93bd7
DE
9272009-01-18 Doug Evans <dje@google.com>
928
929 * regcache.c (new_register_cache): No need to check result of xcalloc.
930 * server.c (handle_search_memory): Back out calls to xmalloc,
931 result is checked and error is returned to user upon failure.
932 (handle_query): Ditto. Add more checks for result of malloc.
933 (handle_v_cont): Check result of malloc, report error back to
934 user upon failure.
935 (handle_v_run): Ditto. Call freeargv.
936 * server.h (freeargv): Declare.
937 * utils.c (freeargv): New fn.
938
54363045
DE
9392009-01-15 Doug Evans <dje@google.com>
940
f626972c
DE
941 * gdbreplay.c (perror_with_name): Make arg const char *.
942 * server.h (target_signal_to_name): Make return type const char *.
0842e787 943 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 944 * utils.c (perror_with_name): Make arg const char *.
54363045 945
18aae699
PA
9462009-01-14 Pedro Alves <pedro@codesourcery.com>
947
948 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
949 when handling a EXIT_PROCESS_DEBUG_EVENT.
950
ff703abe
JB
9512009-01-06 Joel Brobecker <brobecker@adacore.com>
952
953 * gdbreplay.c (gdbreplay_version): Update copyright year.
954 * server.c (gdbserver_version): Likewise.
955
f21cc1a2 9562009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
957
958 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 959 (handle_extended_wait): Improve comment.
0e21c1ec 960
bca929d3
DE
9612008-12-13 Doug Evans <dje@google.com>
962
963 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
964 * server.h (ATTR_MALLOC): New macro.
965 (xmalloc,xcalloc,xstrdup): Declare.
966 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
967 * inferiors.c: Ditto.
968 * linux-low.c: Ditto.
969 * mem-break.c: Ditto.
970 * regcache.c: Ditto.
971 * remote-utils.c: Ditto.
972 * server.c: Ditto.
973 * target.c: Ditto.
974 * win32-low.c: Ditto.
975
97438e3f
DE
9762008-12-12 Doug Evans <dje@google.com>
977
896c7fbb
DE
978 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
979 in debugging printf.
980
97438e3f
DE
981 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
982
e3b886f8
DE
9832008-12-09 Doug Evans <dje@google.com>
984
985 * linux-low.h (struct process_info): Delete member tid, unused.
986 * thread-db.c (find_one_thread): Update.
987 (maybe_attach_thread): Update.
988
07e059b5
VP
9892008-12-02 Pedro Alves <pedro@codesourcery.com>
990
991 * target.h (struct target_ops): Add qxfer_osdata member.
992 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
993 and dirent.h.
994 (linux_qxfer_osdata): New functions.
995 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
996 callback.
997 * server.c (handle_query): Handle "qXfer:osdata:read:".
998 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
999 (buffer_xml_printf): New functions.
1000 * server.h (struct buffer): New.
1001 (buffer_grow_str, buffer_grow_str0): New macros.
1002 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1003 (buffer_xml_printf): Declare.
1004
4cab47ab
DE
10052008-11-24 Doug Evans <dje@google.com>
1006
1007 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1008
f142445f
DJ
10092008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1010
1011 * server.c (handle_v_run): Always use the supplied argument list.
1012
d0107bb6
BW
10132008-11-19 Bob Wilson <bob.wilson@acm.org>
1014
1015 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1016 (xtensa_regmap_table): Add entry for scompare1.
1017
2c4ad781
TJB
10182008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1019
1020 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1021 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1022 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1023 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1024 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1025 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1026 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1027 XML target descriptions.
1028 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1029 when inferior is running on an ISA 2.05 or later processor. Add
1030 special case to return offset for full 64-bit slot of FPSCR when
1031 in 32-bits.
1032
dfb64f85
DJ
10332008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1034
1035 * Makefile.in (SFILES, clean): Added sparc64 files.
1036 (reg-sparc64.o, reg-sparc64.c): New.
1037 * configure.srv (sparc*-*-linux*): New configuration.
1038 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1039 syscall arguments for SPARC.
1040 (regsets_store_inferior_registers): Likewise.
1041 * linux-sparc-low.c: New file.
1042
66b6e1dd
DE
10432008-10-21 Doug Evans <dje@google.com>
1044
1045 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1046 (READLINE_DIR,READLINE_DEP): Delete.
1047 (INTERNAL_CFLAGS): Update.
1048 (LINTFLAGS): Update.
1049
9b710a42
PA
10502008-10-10 Pedro Alves <pedro@codesourcery.com>
1051
1052 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1053 whole argv from the last run, not just argv[0].
1054
5822d809
PA
10552008-09-08 Pedro Alves <pedro@codesourcery.com>
1056
1057 * regcache.c (new_register_cache): Return NULL if the register
1058 cache size isn't known yet.
1059 (free_register_cache): Avoid dereferencing a NULL regcache.
1060
74aac56f
DJ
10612008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1062
1063 * configure.srv: Merge MIPS and MIPS64.
1064
400b20f5
MR
10652008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1066
1067 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1068
677c5bb1
LM
10692008-08-18 Luis Machado <luisgpm@br.ibm.com>
1070
1071 * Makefile.in: Add required vsx dependencies.
1072
1073 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1074 Declare init_registers_powerpc_vsx32l.
1075 Declare init_registers_powerpc_vsx64l.
1076 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1077 (ppc_arch_setup): Check for VSX in hwcap.
1078 (ppc_fill_vsxregset): New function.
1079 (ppc_store_vsxregset): New function.
1080 Add new VSX entry in regset_info target_regsets.
1081
1082 * configure.srv: Add new VSX dependencies.
1083
a6f3e723
SL
10842008-08-12 Pedro Alves <pedro@codesourcery.com>
1085
1086 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1087 (remote_open): Set or clear transport_is_reliable.
1088 (putpkt_binary): Don't expect acks in noack mode.
1089 (getpkt): Don't send ack/nac in noack mode.
1090 * server.c (handle_general_set): Handle QStartNoAckMode.
1091 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1092 qSupported.
1093 (main): Reset noack_mode on every connection.
1094 * server.h (noack_mode): Declare.
1095
a417dc56
RW
10962008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1097
1098 * Makefile.in (GDBREPLAY_OBS): New variable.
1099 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1100
3221518c
UW
11012008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1102 Daniel Jacobowitz <dan@codesourcery.com>
1103
1104 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1105 (usr_store_inferior_registers): Likewise.
1106 (regsets_store_inferior_registers): Likewise.
1107
ec56be1b
PA
11082008-07-31 Rolf Jansen <rj@surtec.com>
1109 Pedro Alves <pedro@codesourcery.com>
1110
1111 * configure.ac: Check for memmem declaration.
1112 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1113 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1114 (disable_packet_qfThreadInfo): Unconditionally compile.
1115 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1116 * configure, config.in: Regenerate.
1117
2fe5e3ff
DE
11182008-07-28 Doug Kwan <dougkwan@google.com>
1119
1120 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1121 (linux_write_memory): Remove declaration of errno.
1122
836acd6d
UW
11232008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1124
1125 * linux-low.c (handle_extended_wait): Do not use "status"
1126 variable uninitialized.
1127
aeba519e
PA
11282008-07-07 Pedro Alves <pedro@codesourcery.com>
1129
1130 * server.c (handle_v_attach): Inhibit reporting dll changes.
1131
db42f210
PA
11322008-06-27 Pedro Alves <pedro@codesourcery.com>
1133
1134 * remote-utils.c (prepare_resume_reply): If requested, don't
1135 output "thread:TID" in the T stop reply.
1136
1137 * server.c (disable_packet_vCont, disable_packet_Tthread)
1138 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1139 (handle_query): If requested, disable support for qC, qfThreadInfo
1140 and qsThreadInfo.
1141 (handle_v_requests): If requested, disable support for vCont.
1142 (gdbserver_show_disableable): New.
1143 (main): Handle --disable-packet and --disable-packet=LIST.
1144
1145 * server.h (disable_packet_vCont, disable_packet_Tthread)
1146 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1147
8e4c5421
CD
11482008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1149
1150 * server.c (gdbserver_usage): Mention --version.
1151
6e23a804
DJ
11522008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1153
1154 * Makefile.in (gdbreplay.o): New rule.
1155
90aa6a40
JM
11562008-06-06 Joseph Myers <joseph@codesourcery.com>
1157
1158 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1159 message, not gdbserver.
1160
c16158bc
JM
11612008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1162 Nathan Sidwell <nathan@codesourcery.com>
1163 Joseph Myers <joseph@codesourcery.com>
1164
1165 * acinclude.m4: Include ../../config/acx.m4.
1166 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1167 * configure, config.in: Regenerate.
1168 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1169 * server.c (gdbserver_version): Print PKGVERSION.
1170 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1171 (main): Adjust gdbserver_usage calls.
1172 * gdbreplay.c (version, host_name): Add declarations.
1173 (gdbreplay_version, gdbreplay_usage): New.
1174 (main): Accept --version and --help options.
1175
aeb75bf5
DJ
11762008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1177
1178 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1179 (arm_breakpoint_at): Handle Thumb.
1180 (the_low_target): Add comment.
1181
76b233dd
UW
11822008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1183
1184 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1185
08388c79
DE
11862008-05-09 Doug Evans <dje@google.com>
1187
a3c83fae
DE
1188 * server.h (decode_search_memory_packet): Declare.
1189 * remote-utils.c (decode_search_memory_packet): New fn.
1190 * server.c (handle_search_memory_1): New fn.
08388c79
DE
1191 (handle_search_memory): New fn.
1192 (handle_query): Process qSearch:memory packets.
1193
bb9c3d36
UW
11942008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1195
1196 * regcache.c (registers_length): Remove.
1197 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1198 full register packet.
1199 * regcache.h (registers_length): Remove prototype.
1200 * server.h (PBUFSIZ): Define to 16384.
1201
7284e1be
UW
12022008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1203
1204 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1205 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1206 powerpc-64l.o, and powerpc-altivec64l.o.
1207 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1208 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1209 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1210 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1211 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1212 to srv_xmlfiles.
1213
1214 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1215 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1216 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1217 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1218 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1219 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1220 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1221 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1222 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1223 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1224 (clean): Update.
1225
1226 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1227 (init_registers_powerpc_32l): ... this new prototype.
1228 (init_registers_powerpc_32): Remove, replace by ...
1229 (init_registers_powerpc_altivec32l): ... this new prototype.
1230 (init_registers_powerpc_e500): Remove, replace by ...
1231 (init_registers_powerpc_e500l): ... this new prototype.
1232 (init_registers_ppc64): Remove, replace by ...
1233 (init_registers_powerpc_64l): ... this new prototype.
1234 (init_registers_powerpc_64): Remove, replace by ...
1235 (init_registers_powerpc_altivec64l): ... this new prototype.
1236 (ppc_num_regs): Set to 73.
1237 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1238 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1239 (ppc_cannot_store_register): Handle orig_r3 and trap.
1240 (ppc_arch_setup): Update init_registers_... calls.
1241 (ppc_fill_gregset): Handle orig_r3 and trap.
1242
1243 * inferiors.c (clear_inferiors): Reset current_inferior.
1244
fdc59709
PB
12452008-04-23 Paolo Bonzini <bonzini@gnu.org>
1246
1247 * acinclude.m4: Add override.m4.
1248 * configure: Regenerate.
1249
c9b2f845
UW
12502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1251
1252 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1253 initial call to init_register_ppc64.
1254
550512b8
UW
12552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1256
1257 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1258 powerpc*-*-linux* case.
1259 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1260
b6430ec3
UW
12612008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1262
1263 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1264 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1265 from reg_xmlfiles.
1266 * linux-ppc-low.c: Include <elf.h>.
1267 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1268 (ppc_hwcap): New global variable.
1269 (ppc_regmap): Remove __SPE__ #ifdef sections.
1270 (ppc_regmap_e500): New global variable.
1271 (ppc_cannot_store_register): Update __SPE__ special case.
1272 (ppc_get_hwcap): New function.
1273 (ppc_arch_setup): Use it to determine whether inferior supports
1274 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1275 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1276 Do not access registers if target does not support AltiVec.
1277 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1278 Do not access registers if target does not support SPE.
1279 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1280
52fa2412
UW
12812008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1282
1283 * linux-low.c (disabled_regsets, num_regsets): New.
1284 (use_regsets_p): Delete.
1285 (linux_wait_for_process): Clear disabled_regsets.
1286 (regsets_fetch_inferior_registers): Check and set it.
1287 (regsets_store_inferior_registers): Likewise.
1288 (linux_fetch_registers, linux_store_registers): Do not use
1289 use_regsets_p.
1290 (initialize_low): Allocate disabled_regsets.
1291
e28b3332
DJ
12922008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1293
1294 * Makefile.in (LIBOBJS): New.
1295 (OBS): Use LIBOBJS.
1296 (memmem.o): New rule.
1297 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1298 * configure: Regenerated.
1299
4536995d
UW
13002008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1301
1302 * server.c (handle_query): Never return "unsupported" for
1303 qXfer:features:read queries.
1304
221c031f
UW
13052008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1306
1307 * server.c (get_features_xml): Fix inverted condition.
1308 (handle_query): Always support qXfer:feature:read.
1309
ccd213ac
DJ
13102008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1311
1312 * server.c (wrapper_argv): New.
1313 (start_inferior): Handle wrapper_argv. If set, expect an extra
1314 trap.
1315 (gdbserver_usage): Document --wrapper.
1316 (main): Parse --wrapper.
1317
6fe305f7
UW
13182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1319
1320 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1321 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1322 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1323 (ppc_set_pc): Likewise.
1324 (ppc_arch_setup): New function.
1325 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1326 of collect_register.
1327 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1328
5b0a002e
UW
13292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1330
1331 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1332 instead of linux-ppc64-low.o.
1333 * linux-ppc64-low.c: Remove file.
1334 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1335 (linux-ppc64-low.o): Remove rule.
1336
1337 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1338 (init_registers_powerpc_64): Likewise.
1339 (ppc_regmap): Conditionally define depending on __powerpc64__.
1340 (ppc_cannot_store_register): Do not special-case "fpscr" when
1341 compiled on __powerpc64__.
1342 (ppc_collect_ptrace_register): New function.
1343 (ppc_supply_ptrace_register): New function.
1344 (ppc_breakpoint): Change type to "unsigned int".
1345 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1346 (the_low_target): Conditionally provide initializers for the
1347 arch_setup member depending on __powerpc64__. Install
1348 collect_ptrace_register and supply_ptrace_register members.
1349
9b4b61c8
UW
13502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1351
1352 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1353 * server.c (gdbserver_xmltarget): Define.
1354 (get_features_xml): Use it to replace "target.xml" and arch_string.
1355
1356 * configure.srv: Remove srv_xmltarget. Add XML files that were
1357 mentioned there to srv_xmlfiles instead. Remove conditional tests
1358 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1359 srv_xmlfiles and srv_regobj to include all possible choices.
1360 * configure.ac (srv_xmltarget): Remove.
1361 (srv_xmlfiles): Do not add "target.xml".
1362 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1363 checks for supplementary target information.
1364 * configure: Regenerate.
1365 * Makefile.in (XML_TARGET): Remove.
1366 (target.xml): Remove rule.
1367 (clean): Do not clean up target.xml.
1368 (.PRECIOUS): Do not mention target.xml.
1369
1370 * target.h (struct target_ops): Remove arch_string member.
1371 * linux-low.c (linux_arch_string): Remove.
1372 (linux_target_ops): Remove arch_string initializer.
1373 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1374 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1375 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1376 * spu-low.c (spu_arch_string): Remove.
1377 (spu_target_ops): Remove arch_string initializer.
1378 * win32-low.c (win32_arch_string): Remove.
1379 (win32_target_ops): Remove arch_string initializer.
1380 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1381 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1382 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1383
ee1a7ae4
UW
13842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1385
1386 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1387 by collect_ptrace_register and supply_ptrace_register hooks.
1388 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1389 instead of checking for the_low_target.left_pad_xfer.
1390 (usr_store_inferior_registers): Use collect_ptrace_register callback
1391 instead of checking for the_low_target.left_pad_xfer.
1392
1393 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1394 (s390_supply_ptrace_register): Likewise.
1395 (s390_fill_gregset): Call s390_collect_ptrace_register.
1396 (the_low_target): Update.
1397
1398 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1399 (ppc_supply_ptrace_register): Likewise.
1400 (the_low_target): Update.
1401
1402 * linux-i386-low.c (the_low_target): Update.
1403 * linux-x86-64-low.c (the_low_target): Update.
1404
d61ddec4
UW
14052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1406
1407 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1408 reg-s390.o and reg-s390x.o.
1409
1410 * linux-low.c (new_inferior): New global variable.
1411 (linux_create_inferior, linux_attach): Set it.
1412 (linux_wait_for_process): Call the_low_target.arch_setup after the
1413 target has stopped for the first time.
1414 (initialize_low): Do not call the_low_target.arch_setup.
1415
1416 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1417 (s390_set_pc): Likewise.
1418 (s390_arch_setup): New function.
1419 (the_low_target): Use s390_arch_setup as arch_setup routine.
1420
1421 * regcache.c (realloc_register_cache): New function.
1422 (set_register_cache): Call it for each existing regcache.
1423
d05b4ac3
UW
14242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1425
1426 * server.h (init_registers): Remove prototype.
1427
1428 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1429 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1430 instead of init_registers ().
1431 * linux-arm-low.c (init_registers_arm): Add prototype.
1432 (init_registers_arm_with_iwmmxt): Likewise.
1433 (the_low_target): Add initializer for arch_setup field.
1434 * linux-cris-low.c (init_registers_cris): Add prototype.
1435 (the_low_target): Add initializer for arch_setup field.
1436 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1437 (the_low_target): Add initializer for arch_setup field.
1438 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1439 (the_low_target): Add initializer for arch_setup field.
1440 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1441 (the_low_target): Add initializer for arch_setup field.
1442 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1443 (the_low_target): Add initializer for arch_setup field.
1444 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1445 (the_low_target): Add initializer for arch_setup field.
1446 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1447 (init_registers_mips64_linux): Likewise.
1448 (the_low_target): Add initializer for arch_setup field.
1449 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1450 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1451 (the_low_target): Add initializer for arch_setup field.
1452 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1453 (init_registers_powerpc_64): Likewise.
1454 (the_low_target): Add initializer for arch_setup field.
1455 * linux-s390-low.c (init_registers_s390): Add prototype.
1456 (init_registers_s390x): Likewise.
1457 (the_low_target): Add initializer for arch_setup field.
1458 * linux-sh-low.c (init_registers_sh): Add prototype.
1459 (the_low_target): Add initializer for arch_setup field.
1460 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1461 (the_low_target): Add initializer for arch_setup field.
1462 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1463 (the_low_target): Add initializer for arch_setup field.
1464
1465 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1466 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1467 instead of init_registers ().
1468 * win32-arm-low.c (init_registers_arm): Add prototype.
1469 (the_low_target): Add initializer for arch_setup field.
1470 * win32-i386-low.c (init_registers_i386): Add prototype.
1471 (the_low_target): Add initializer for arch_setup field.
1472
1473 * spu-low.c (init_registers_spu): Add prototype.
1474 (initialize_low): Call initialie_registers_spu () instead of
1475 initialize_registers ().
1476
fd96d250
PA
14772008-02-19 Pedro Alves <pedro@codesourcery.com>
1478
1479 * server.c (handle_v_requests): When handling the vRun and vAttach
1480 packets, if already debugging a process, don't kill it. Return an
1481 error instead.
1482
d41b6bb4
DJ
14832008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1484
1485 * server.c (handle_query): Correct length check.
1486
5ac588cf
PA
14872008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1488
1489 * win32-low.c (do_initial_child_stuff): Add process handle
1490 parameter. Set current_process_handle and current_process_id from the
1491 parameters. Clear globals.
1492 (win32_create_inferior): Don't set current_process_handle and
1493 current_process_id here. Instead pass them on the call to
1494 do_initial_child_stuff.
1495 (win32_attach): Likewise.
1496 (win32_clear_inferiors): New.
1497 (win32_kill): Don't close the current process handle or the
1498 current thread handle here. Instead call win32_clear_inferiors.
1499 (win32_detach): Don't open a new handle to the process. Call
1500 win32_clear_inferiors.
1501 (win32_join): Don't rely on current_process_handle; open a new
1502 handle using the process id.
1503 (win32_wait): Call win32_clear_inferiors when the inferior process
1504 has exited.
1505
ecd7ecbc
DJ
15062008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1507
1508 * server.c (monitor_show_help): Add "exit".
1509
1525d545
MG
15102008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1511
ecd7ecbc 1512 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
1513 (clean): Add reg-xtensa.c.
1514 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
1515 * configure.srv (xtensa*-*-linux*) New target.
1516 * linux-xtensa-low.c: New.
1517 * xtensa-xtregs.c: New.
1525d545 1518
59a016f0
PA
15192008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1520
1521 * hostio.c: Don't include errno.h.
1522 (errno_to_fileio_errno): Move to hostio-errno.
1523 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1524 error number outputting to the target->hostio_last_error callback.
1525 (hostio_packet_error): Use FILEIO_EINVAL directly.
1526 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1527 calls to hostio_error.
1528 * hostio-errno.c: New.
1529 * server.h (hostio_last_error_from_errno): Declare.
1530 * target.h (target_ops): Add hostio_last_error member.
1531 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1532 as hostio_last_error handler.
1533 * spu-low.c (spu_target_ops): Likewise.
1534 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1535 (wince_hostio_last_error): New functions.
1536 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1537 as hostio_last_error handler.
1538 (win32_target_ops) [!_WIN32_WCE]: Register
1539 hostio_last_error_from_errno as hostio_last_error handler.
1540 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1541 (hostio-errno.o): New rule.
1542 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1543 * configure.srv (srv_hostio_err_objs): New variable. Default to
1544 hostio-errno.o.
1545 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1546 * configure: Regenerate.
1547
2d717e4f
DJ
15482008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1549
1550 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1551 (linux_kill, linux_detach): Clean up the process list.
1552 * remote-utils.c (remote_open): Improve port number parsing.
1553 (putpkt_binary, input_interrupt): Only send interrupts if the target
1554 is running.
1555 * server.c (extended_protocol): Make static.
1556 (attached): Define earlier.
1557 (exit_requested, response_needed, program_argv): New variables.
1558 (target_running): New.
1559 (start_inferior): Clear attached here.
1560 (attach_inferior): Set attached here.
1561 (require_running): Define.
1562 (handle_query): Use require_running and target_running. Implement
1563 "monitor exit".
1564 (handle_v_attach, handle_v_run): New.
1565 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1566 (gdbserver_usage): Update.
1567 (main): Redo argument parsing. Handle --debug and --multi. Handle
1568 --attach along with other options or after the port. Save
1569 program_argv. Support no initial program. Resynchronize
1570 communication with GDB after an error. Handle "monitor exit".
1571 Use require_running and target_running. Always allow the extended
1572 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1573 restart in extended mode.
1574 * README: Refer to the GDB manual. Update --attach usage.
1575
7407e2de
AS
15762007-12-20 Andreas Schwab <schwab@suse.de>
1577
1578 * linux-low.c (STACK_SIZE): Define.
1579 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1580 (linux_test_for_tracefork): Likewise.
1581
b65d95c5
DJ
15822007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1583
1584 * linux-low.c (linux_wait_for_event): Update messages. Do not
1585 reinsert auto-delete breakpoints.
1586 * mem-break.c (struct breakpoint): Change return type of handler to
1587 int.
1588 (set_breakpoint_at): Update handler type.
1589 (reinsert_breakpoint_handler): Return 1 instead of calling
1590 delete_breakpoint.
1591 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1592 setting a new one.
1593 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1594 * mem-break.h (set_breakpoint_at): Update handler type.
1595 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1596 * win32-low.c (auto_delete_breakpoint): New.
1597 (get_child_debug_event): Use it.
1598
4e799345
DJ
15992007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1600
1601 * configure.ac: Check for pread and pwrite.
1602 * hostio.c (handle_pread): Fall back to lseek and read.
1603 (handle_pwrite): Fall back to lseek and write.
1604 * config.in, configure: Regenerated.
1605
27524b67
DJ
16062007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1607
1608 * server.c (myresume): Add own_buf argument.
1609 (main): Update calls.
1610
a20d5e98
DJ
16112007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1612
1613 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1614 * remote-utils.c (remote_open): Do not call disable_async_io.
1615 (block_async_io): Delete.
1616 (unblock_async_io): Make static.
1617 (initialize_async_io): New.
1618 * server.c (handle_v_cont): Handle async I/O here.
1619 (myresume): Likewise. Move other common resume tasks here...
1620 (main): ... from here. Call initialize_async_io. Disable async
1621 I/O before the main loop.
1622 * server.h (initialize_async_io): Declare.
1623 (block_async_io, unblock_async_io): Delete prototypes.
1624 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1625
b79d787e
DJ
16262007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1627
1628 * remote-utils.c (readchar): Allow binary data in received messages.
1629
d97903b2
PA
16302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1631
1632 * win32-low.c (attaching): New global.
1633 (win32_create_inferior): Clear the `attaching' global.
1634 (win32_attach): Set the `attaching' global.
1635 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1636 attaching. Only set a breakpoint at the entry point if not
1637 attaching.
1638
311de423
PA
16392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1640
1641 * server.c (main): Don't report dll events on the initial
1642 connection on attaches.
1643
6c2d16d2
PA
16442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1645
1646 * server.c (main): Relax numerical bases supported for the pid of
1647 the --attach command line argument.
1648
5ca906e6
PA
16492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1650
1651 * win32-low.c (win32_attach): Call OpenProcess before
1652 DebugActiveProcess, not after. Add last error output to error
1653 call.
1654
9c6c8194
PA
16552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1656
1657 * win32-low.c (win32_get_thread_context)
1658 (win32_set_thread_context): New functions.
1659 (thread_rec): Use win32_get_thread_context.
1660 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1661 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1662 field.
1663
4d5d1aaa
PA
16642007-12-03 Leo Zayas
1665 Pedro Alves <pedro_alves@portugalmail.pt>
1666
1667 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1668 global variables.
1669 (child_add_thread): Minor cleanup.
1670 (child_continue): Resume artificially suspended threads before
1671 calling ContinueDebugEvent.
1672 (suspend_one_thread): New.
1673 (fake_breakpoint_event): New.
1674 (get_child_debug_event): Change return type to int. Check here if
1675 gdb sent an interrupt request. If a soft interrupt was requested,
1676 fake a breakpoint event. Return 0 if there is no event to handle,
1677 and 1 otherwise.
1678 (win32_wait): Don't check here if gdb sent an interrupt request.
1679 Ensure there is a valid event to handle.
1680 (win32_request_interrupt): Add soft interruption method as last
1681 resort.
1682
c436e841
PA
16832007-12-03 Leo Zayas
1684 Pedro Alves <pedro_alves@portugalmail.pt>
1685
1686 * win32-low.h (win32_thread_info): Add descriptions to the
1687 structure members. Replace `suspend_count' counter by a
1688 `suspended' flag.
1689 * win32-low.c (thread_rec): Update condition of when to get the
1690 context from the inferior. Rely on ContextFlags being set if it
1691 has already been retrieved. Only suspend the inferior thread if
1692 we haven't already. Warn if that fails.
1693 (continue_one_thread): s/suspend_count/suspended/. Only call
1694 ResumeThread once. Warn if that fails.
1695
e7b5fa67
PA
16962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1697
1698 * win32-low.c (win32_wait): Don't read from the inferior when it
1699 has already exited.
1700
a385171d
PA
17012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1702
1703 * Makefile.in (win32_low_h): New variable.
1704 (win32-low.o): Add dependency on $(win32_low_h).
1705 (win32-arm-low.o, win32-i386-low.o): New rules.
1706
f80c84b3
DJ
17072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1708
1709 * hostio.c: Correct copyright year.
1710
a6b151f1
DJ
17112007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1712
1713 * Makefile.in (OBS): Add hostio.o.
1714 (hostio.o): New rule.
1715 * server.h (handle_vFile): Declare.
1716 * hostio.c: New file.
1717 * server.c (handle_v_requests): Take packet_len and new_packet_len
1718 for binary packets. Call handle_vFile.
1719 (main): Update call to handle_v_requests.
1720
f9387fc3
DJ
17212007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1722
1723 * linux-low.c: Include <sched.h>.
1724
51c2684e
DJ
17252007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1726
1727 * linux-low.c (linux_tracefork_grandchild): New.
1728 (linux_tracefork_child): Use clone.
1729 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1730
75f83163
JB
17312007-10-31 Joel Brobecker <brobecker@adacore.com>
1732
1733 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1734
da5898ce
DJ
17352007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1736
1737 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1738
24a09b5f
DJ
17392007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1740
1741 * inferiors.c (change_inferior_id): Delete.
1742 (add_pid_to_list, pull_pid_from_list): New.
1743 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1744 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1745 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1746 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1747 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1748 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1749 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1750 (using_threads): Always set to 1.
1751 (handle_extended_wait): New.
1752 (add_process): Do not set TID.
1753 (linux_create_inferior): Set must_set_ptrace_flags.
1754 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1755 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1756 (linux_thread_alive): Rename TID argument to LWPID.
1757 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1758 (linux_wait_for_event): Do not use TID or check using_threads. Update
1759 call to dead_thread_notify. Call handle_extended_wait.
1760 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1761 (send_sigstop): Delete sigstop_sent.
1762 (wait_for_sigstop): Avoid TID.
1763 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1764 (linux_test_for_tracefork): New.
1765 (linux_lookup_signals): Use thread_db_active and
1766 linux_supports_tracefork_flag.
1767 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1768 * linux-low.h (get_process_thread): Avoid TID.
1769 (struct process_ifo): Move thread_known and tid to the end. Remove
1770 sigstop_sent.
1771 (linux_attach_lwp, thread_db_init): Update prototypes.
1772 * server.h (change_inferior_id): Delete prototype.
1773 (add_pid_to_list, pull_pid_from_list): New prototypes.
1774 * thread-db.c (thread_db_use_events): New.
1775 (find_first_thread): Rename to...
1776 (find_one_thread): ...this. Update callers and messages. Do not
1777 call fatal. Check thread_db_use_events. Do not call
1778 change_inferior_id or new_thread_notify.
1779 (maybe_attach_thread): Update. Do not call new_thread_notify.
1780 (thread_db_init): Set thread_db_use_events. Check use_events.
1781 * utils.c (fatal, warning): Correct message prefix.
1782
30ed0a8f
DJ
17832007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1784
1785 * Makefile.in (clean): Remove new files.
1786 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1787 (powerpc-64.o, powerpc-64.c): New rules.
1788 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1789 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1790 with SPE.
1791 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1792 SPE targets.
1793 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1794 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1795 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1796 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1797 (target_regsets): Add AltiVec and SPE register sets.
1798 * configure.ac: Check for AltiVec and SPE.
1799 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1800 (ppc_fill_vrregset, ppc_store_vrregset): New.
1801 (target_regsets): Add AltiVec register set.
1802 * configure: Regenerated.
1803
fd462a61
DJ
18042007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1805
1806 * linux-low.c (O_LARGEFILE): Define.
1807 (linux_read_memory): Use /proc/PID/mem.
1808 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1809 * configure, config.in: Regenerated.
1810
69f223ed
DJ
18112007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1812
1813 * linux-low.c (linux_wait_for_event): Do not pass signals while
1814 single-stepping.
1815
aec18585
PA
18162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1817
1818 * win32-low.c (create_process): New.
1819 (win32_create_inferior): Use create_process instead of
1820 CreateProcess. If create_process failed retry appending an ".exe"
1821 suffix. Store the GetLastError result immediatelly after
1822 create_process calls and use it on the call to error.
1823
34d86ddd
PA
18242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1825
1826 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1827
5a0e3bd0
JB
18282007-08-23 Joel Brobecker <brobecker@adacore.com>
1829
1830 * configure.ac: Switch license to GPLv3.
1831
f88c79e6
MS
18322007-08-01 Michael Snyder <msnyder@access-company.com>
1833
1834 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1835
6b3d9b83
PA
18362007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1837
1838 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1839 typedef.
1840 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1841 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1842 CloseToolhelp32Snapshot.
1843 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1844 CloseToolhelp32Snapshot.
1845
c588c53c
MS
18462007-07-27 Michael Snyder <michael.snyder@access-company.com>
1847
1848 * server.c (main): Check for inferior exit before main loop.
1849
aa0403d9
PA
18502007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1851
1852 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1853 instead of on tmp_desc.
1854
255e7678
DJ
18552007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1856 Daniel Jacobowitz <dan@codesourcery.com>
1857
1858 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1859 (add_thread): Minor cleanups.
1860 (clear_inferiors): Move lower in the file. Clear the DLL
1861 list.
1862 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1863 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1864 (xml_escape_text): New.
1865 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1866 for qSupported.
1867 (handle_v_cont): Report errors.
1868 (gdbserver_version): Update.
1869 (main): Correct size of own_buf. Do not report initial DLL events.
1870 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1871 (unloaded_dll, xml_escape_text): New.
1872 * win32-low.c (enum target_waitkind): Update comments.
1873 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1874 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1875 (win32_EnumProcessModules, win32_GetModuleInformation)
1876 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1877 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1878 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1879 (win32_Module32First, win32_Module32Next, load_toolhelp)
1880 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1881 (get_child_debug_event): Handle DLL events.
1882 (win32_wait): Likewise.
1883
0d37add9
DJ
18842007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1885
1886 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1887 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1888
45e2715e
PA
18892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1890
1891 * win32-low.c (handle_output_debug_string): Ignore event if not
1892 waiting.
1893
c5674cf1
PA
18942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1895
1896 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1897
2bbe3cc1
DJ
18982007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1899
1900 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1901
ae13219e
DJ
19022007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1903
1904 * inferiors.c (change_inferior_id): Add comment.
1905 * linux-low.c (check_removed_breakpoint): Add an early
1906 prototype. Improve debug output.
1907 (linux_attach): Doc update.
1908 (linux_detach_one_process, linux_detach): Clean up before releasing
1909 each process.
1910 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1911 * linux-low.h (struct process_info): Doc improvement.
1912 * mem-break.c (delete_all_breakpoints): New.
1913 * mem-break.h (delete_all_breakpoints): New prototype.
1914 * thread-db.c (find_first_thread): New.
1915 (thread_db_create_event): Call it instead of
1916 thread_db_find_new_threads. Clean up unused variables.
1917 (maybe_attach_thread): Remove first thread handling.
1918 (thread_db_find_new_threads): Use find_first_thread.
1919 (thread_db_get_tls_address): Likewise.
1920
4105de34
DJ
19212007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1922
1923 * thread-db.c (thread_db_find_new_threads): Add prototype.
1924 (thread_db_create_event): Check for the main thread before adding
1925 a new thread.
1926 (maybe_attach_thread): Only enable event reporting if TID == 0.
1927 (thread_db_get_tls_address): Check for new threads.
1928
2b876972
DJ
19292007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1930
1931 * linux-low.c (linux_create_inferior): Try execv before execvp.
1932 * spu-low.c (spu_create_inferior): Likewise.
1933
7a245884
DJ
19342007-06-13 Mike Frysinger <vapier@gentoo.org>
1935
1936 * linux-low.c (linux_create_inferior): Change execv to execvp.
1937 * spu-low.c (spu_create_inferior): Likewies.
1938
117ce543
DJ
19392007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1940
1941 * Makefile.in (clean): Clean new files instead of deleted ones.
1942 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1943 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1944 rules.
1945 * configure.srv: Specify XML files and new regformats for MIPS and
1946 MIPS64 GNU/Linux.
1947 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1948 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1949 an entry for the restart register.
1950 (mips_cannot_fetch_register, mips_cannot_store_register)
1951 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1952 register names to match the XML descriptions.
1953 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1954 restart register instead of $0.
1955
0e7f50da
UW
19562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1957 Markus Deuling <deuling@de.ibm.com>
1958
1959 * remote-utils.c (decode_xfer_write): New function.
1960 * server.h (decode_xfer_write): Add prototype.
1961 * server.c (handle_query): Add PACKET_LEN argument. Support
1962 qXfer:spu:read and qXfer:spu:write packets.
1963 (main): Pass packet_len to handle_query.
1964 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1965 * target.h (target_ops): Add qxfer_spu.
1966
374c1d38
UW
19672007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1968
1969 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1970 accessing non-seekable spufs files.
1971
bb63802a
UW
19722007-05-16 Markus Deuling <deuling@de.ibm.com>
1973
1974 * server.c (handle_query): Add reply for qC packet.
1975
7390519e
PA
19762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1977 Leo Zayas <lerele@champenstudios@com>
1978
1979 * server.h (check_remote_input_interrupt_request): New function.
1980 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1981 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1982 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1983 (check_remote_input_interrupt_request): New function.
1984 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 1985 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
1986 winapi_GenerateConsoleCtrlEvent): New typedefs.
1987 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1988 to 250 ms.
1989 (win32_wait): Check for remote interrupt request
1990 with check_remote_input_interrupt_request.
1991 (win32_request_interrupt): New function.
1992 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1993
34b34921
PA
19942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1995
1996 * win32-low.c (debug_registers_changed,
1997 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1998 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1999 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2000 (thread_rec): Get context using the low target.
2001 (child_add_thread): Call thread_added on the low target,
2002 which does the same thing.
2003 (regptr): Delete.
2004 (do_initial_child_stuff): Remove debug registers references.
2005 Set context using the low target. Resume threads after
2006 setting the contexts.
2007 (child_continue): Remove dead variable. Remove debug
2008 registers references.
2009 (child_fetch_inferior_registers): Go through the low target.
2010 (do_child_store_inferior_registers): Remove.
2011 (child_store_inferior_registers): Go through the low target.
2012 (win32_resume): Remove debug registers references.
2013 Set context using the low target.
2014 (handle_exception): Change return type to void. Don't record
2015 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2016 first chance exception.
2017 (get_child_debug_event): Change return type to void. Remove
2018 goto loop. Always return after waiting for debug event.
2019 (win32_wait): Convert to switch statement. Handle spurious
2020 events.
2021
2022 * win32-i386-low.c (debug_registers_changed,
2023 debug_registers_used): New.
2024 (initial_stuff): Rename to ...
2025 (i386_initial_stuff): ... this. Clear debug registers
2026 state variables.
2027 (store_debug_registers): Delete.
2028 (i386_get_thread_context): New.
2029 (load_debug_registers): Delete.
2030 (i386_set_thread_context): New.
2031 (i386_thread_added): New.
2032 (single_step): Rename to ...
2033 (i386_single_step): ... this.
2034 (do_fetch_inferior_registers): Rename to ...
2035 (i386_fetch_inferior_register): ... this.
2036 (i386_store_inferior_register): New.
2037 (the_low_target): Adapt to new interface.
2038
2039 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2040 (arm_get_thread_context): New.
2041 (arm_set_thread_context): New.
2042 (regptr): New.
2043 (do_fetch_inferior_registers): Rename to ...
2044 (arm_fetch_inferior_register): ... this.
2045 (arm_store_inferior_register): New.
2046 (arm_wince_breakpoint): Reimplement as unsigned long.
2047 (arm_wince_breakpoint_len): Define.
2048 (the_low_target): Adapt to new interface.
2049
2050 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2051 load_debug_registers. Add get_thread_context, set_thread_context,
2052 thread_added and store_inferior_register. Rename
2053 fetch_inferior_registers to fetch_inferior_register.
2054 (regptr): Remove declaration.
2055
dd6953e1
PA
20562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2057
2058 * linux-low.c (linux_detach): Change return type to int. Return 0.
2059 * spu-low.c (spu_detach): Likewise.
2060
444d6139
PA
20612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2062
2063 * target.h (target_ops): Change return type of detach to int.
2064 Add join.
2065 (join_inferior): New.
2066 * server.c (main): Don't skip detach support on mingw32.
2067 If the inferior doesn't support detaching return error.
2068 Call join_inferior instead of using waitpid.
2069 * linux-low.c (linux_join): New.
2070 (linux_target_op): Add linux_join.
2071 * spu-low.c (spu_join): New.
2072 (spu_target_ops): Add spu_join.
2073 * win32-low.c (win32_detach): Adapt to new interface.
2074 Reopen current_process_handle before detaching. Issue a child
2075 resume before detaching.
2076 (win32_join): New.
2077 (win32_target_op): Add win32_join.
2078
1d5315fe
PA
20792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2080
2081 * win32-low.c (win32-attach): Fix return value.
2082 * target.h (target_ops): Describe ATTACH return values.
2083
bf914831
PA
20842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2085
2086 * win32-low.c (GETPROCADDRESS): Define.
2087 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2088 (winapi_DebugSetProcessKillOnExit): Likewise.
2089 (win32_create_inferior): Force usage of ansi CreateProcessA.
2090 (win32_attach): Use GETPROCADDRESS.
2091 (win32_detach): Likewise.
2092
f72f3e60
PA
20932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2094
2095 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2096
ed50f18f
PA
20972007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2098
2099 * win32-low.c: Commit leftover changes from 2007-03-29.
2100
0c2ead7e
DJ
21012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2102
2103 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2104 fields short instead of int. Add explicit padding.
2105 (i387_cache_to_fsave): Remove unnecessary casts.
2106 (i387_fsave_to_cache): Doc fix.
2107 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2108
73725ff3
DJ
21092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2110
2111 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2112 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2113
d99f33d8
PA
21142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2115
2116 * configure.srv (arm*-*-mingw32ce*): Move near the other
2117 arm targets.
2118
68070c10
PA
21192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2120
2482afc6 2121 * configure.ac: Add errno checking.
68070c10
PA
2122 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2123 sys/file.h and malloc.h.
2124 (AC_CHECK_DECLS): Add perror.
2125 (srv_mingwce): Handle.
2482afc6 2126 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
2127 win32-i386-low.o to srv_tgtobj.
2128 (i[34567]86-*-mingw*): Likewise.
2129 (arm*-*-mingw32ce*): Add case.
2130 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2131 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2132 [__MINGW32CE__] (strerror): New function.
2133 [__MINGW32CE__] (errno): Define to GetLastError.
2134 [__MINGW32CE__] (COUNTOF): New macro.
2135 (remote_open): Remove extra close call.
2136 * mem-break.c (delete_breakpoint_at): New function.
2137 * mem-break.h (delete_breakpoint_at): Declare.
2138 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2139 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2140 [USE_WIN32API] (read, write): Add char* casts.
2141 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2142 * server.h: Include wincecompat.h on Windows CE.
2143 [HAVE_ERRNO_H]: Check.
2144 (perror): Declare if not declared.
2145 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2146 (perror_with_name): Remove errno declaration.
2147 * wincecompat.h: New.
2148 * wincecompat.c: New.
2149 * win32-low.h: New.
2150 * win32-arm-low.c: New.
2151 * win32-i386-low.c: New.
2152 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2153 (OUTMSG2): Make it safe.
2154 (_T): New macro.
2155 (COUNTOF): New macro.
2156 (NUM_REGS): Get it from the low target.
2157 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2158 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2159 (thread_rec): Let low target handle debug registers.
2160 (child_add_thread): Likewise.
2161 (child_init_thread_list): Likewise.
2162 (continue_one_thread): Likewise.
2163 (regptr): New.
2164 (do_child_fetch_inferior_registers): Move to ...
2165 * win32-i386-low.c: ... here, and rename to ...
2166 (do_fetch_inferior_registers): ... this.
2167 * win32-low.c (child_fetch_inferior_registers):
2168 Go through the low target.
2169 (do_child_store_inferior_registers): Use regptr.
2170 (strwinerror): New function.
2171 (win32_create_inferior): Handle Windows CE.
2172 Use strwinerror instead of strerror on Windows error
2173 codes. Add program to the error output.
2174 Don't close the main thread handle on Windows CE.
2175 (win32_attach): Use coredll.dll on Windows CE.
2176 (win32_kill): Close current process and current
2177 thread handles.
2178 (win32_detach): Use coredll.dll on Windows CE.
2179 (win32_resume): Let low target handle debug registers, and
2180 step request.
2181 (handle_exception): Add/Remove initial breakpoint. Avoid
2182 non-existant WSTOPSIG on Windows CE.
2183 (win32_read_inferior_memory): Cast to remove warning.
2184 (win32_arch_string): Go through the low target.
2185 (initialize_low): Call set_breakpoint_data with the low
2186 target's breakpoint.
2187 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2188 FOP_REGNUM, mappings): Move to ...
2189 * win32-i386-low.c: ... here.
2190 * win32-low.c (win32_thread_info): Move to ...
2191 * win32-low.h: ... here.
2192 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2193 win32-arm-low.c and wincecompat.c.
2194 (all:): Add $EXEEXT.
2195 (install-only:): Likewise.
2196 (gdbserver:): Likewise.
2197 (gdbreplay:): Likewise.
2198 * config.in: Regenerate.
2199 * configure: Regenerate.
2200
41093d81
PA
22012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2202
2203 * win32-low.c: Rename typedef thread_info to
2204 win32_thread_info throughout.
2205
544afa54
PA
22062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2207
2208 * win32-i386-low.c: Rename to ...
2209 * win32-low.c: ... this.
2210 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2211 * Makefile.in: Likewise.
2212
bce7165d
PA
22132007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2214
2215 * remote-utils.c (monitor_output): Constify msg parameter.
2216 * server.h (monitor_output): Likewise.
2217 * win32-i386-low.c (handle_output_debug_string): New.
2218 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2219 handle_output_debug_string.
2220 (get_child_debug_event): Likewise.
2221
506c7aa0
DJ
22222007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2223
2224 * server.c (main): Correct strtoul check.
2225
42c81e2a
DJ
22262007-03-27 Jon Ringle <jon@ringle.org>
2227
2228 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2229
9453113a
DJ
22302007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2231
2232 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2233
64a69107
DJ
22342007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2235
2236 * terminal.h: Check HAVE_SGTTY_H.
2237
22382007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
2239
2240 * remote-utils.c (remote_open): Print out the assigned port number.
2241
c74d0ad8
DJ
22422007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2243
2244 * remote-utils.c (monitor_output): New function.
2245 * server.c (debug_threads): Define here.
2246 (monitor_show_help): New function.
2247 (handle_query): Handle qRcmd.
2248 (main): Do not handle 'd' packet.
2249 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2250 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2251 of debug_threads.
2252
de7c3b4a
PA
22532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2254
2255 * Makefile.in (EXEEXT): New.
2256 (clean): Use $(EXEEXT).
2257
ef57601b
PA
22582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2259
2260 * target.h (target_ops): Rename send_signal to request_interrupt,
2261 and remove enum target_signal parameter.
2262 * linux-low.c (linux_request_interrupt): Rename from
2263 linux_send_signal, and always send SIGINT.
2264 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2265 and always send SIGINT.
2266 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2267 of send_signal.
2268 (input_interrupt): Likewise.
2269
820f2bda
PA
22702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2271
2272 * server.c (get_features_xml): Check if target implemented
2273 arch_string.
2274 * win32-i386-low.c (win32_arch_string): New.
2275 (win32_target_ops): Add win32_arch_string as arch_string member.
2276
ab39bf24
UW
22772007-02-22 Markus Deuling <deuling@de.ibm.com>
2278
2279 * spu-low.c (spu_arch_string): New.
2280 (spu_target_ops): Add spu_arch_string.
2281
61ff6e04
DJ
22822007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2283
2284 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2285 * configure.ac: Do not check for terminal.h.
2286 * configure, config.in: Regenerated.
2287
fb1e4ffc
DJ
22882007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2289
2290 * Makefile.in (OBS): Add $(XML_BUILTIN).
2291 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2292 (clean): Update.
2293 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2294 (arm-with-iwmmxt.c): New.
2295 * config.in, configure: Regenerate.
2296 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2297 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2298 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2299 (arm*-*-linux*): Add iWMMXt and regset support.
2300 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2301 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2302 (arm_store_wmmxregset, target_regsets): New.
2303 * server.c (get_features_xml): Take annex argument. Check builtin
2304 XML documents.
2305 (handle_query): Handle multiple annexes.
2306
0f48aa01
DJ
23072007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2308
2309 * remote-utils.c [USE_WIN32API] (read, write): Define.
2310 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2311 write.
2312
23181151
DJ
23132007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2314
2315 * linux-i386-low.c (the_low_target): Set arch_string.
2316 * linux-x86-64-low.c (the_low_target): Likewise.
2317 * linux-low.c (linux_arch_string): New.
2318 (linux_target_ops): Add it.
2319 * linux-low.h (struct linux_target_ops): Add arch_string.
2320 * server.c (write_qxfer_response): Use const void * for DATA.
2321 (get_features_xml): New.
2322 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2323 * target.h (struct target_ops): Add arch_string method.
2324
9d606399
DJ
23252007-01-03 Denis Pilat <denis.pilat@st.com>
2326 Daniel Jacobowitz <dan@codesourcery.com>
2327
2328 * linux-low.c (linux_kill): Handle being called with no threads.
2329 * win32-i386-low.c (win32_kill): Likewise.
2330 (get_child_debug_event): Clear current_process_handle.
2331
23322006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
2333 Daniel Jacobowitz <dan@codesourcery.com>
2334
2335 * remote-utils.c (remote_open): Check the type of specified
2336 serial port devices before opening them.
2337 * server.c (main): Kill the inferior if an error occurs during
2338 the first remote_open.
2339
a5e13d24
DJ
23402006-12-05 Markus Deuling <deuling@de.ibm.com>
2341
2342 * README: Update supported targets.
2343
186947f7
DJ
23442006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2345
2346 * Makefile.in (clean): Remove reg-mips64.c.
2347 (reg-mips64.c, reg-mips64.o): New rules.
2348 * configure.srv: Handle mips64. Include regset support for mips.
2349 * linux-mips-low.c (union mips_register): New.
2350 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2351 (mips_breakpoint, mips_breakpoint_at): Use int.
2352 (mips_collect_register, mips_supply_register)
2353 (mips_collect_register_32bit, mips_supply_register_32bit)
2354 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2355 (mips_store_fpregset, target_regsets): New.
2356 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2357
a13e2c95
UW
23582006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2359
2360 * configure.srv: Add target "spu*-*-*".
2361 * Makefile.in (clean): Remove reg-spu.c.
2362 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2363 * spu-low.c: New file.
2364
cb7283db
DJ
23652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2366
2367 * configure.ac: Correct td_thr_tls_get_addr test.
2368 * configure: Regenerated.
2369
89be2091
DJ
23702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2371
2372 * linux-low.c (linux_wait_for_event): Reformat. Use the
2373 pass_signals array.
2374 * remote-utils.c (decode_address_to_semicolon): New.
2375 * server.c (pass_signals, handle_general_set): New.
2376 (handle_query): Mention QPassSignals for qSupported.
2377 (main): Call handle_general_set.
2378 * server.h (pass_signals, decode_address_to_semicolon): New.
2379
000ef4f0
DJ
23802006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2381
2382 * server.c (handle_query): Correct error handling for read_auxv.
2383
b7149293
UW
23842005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2385
2386 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2387 and srv_linux_thread_db to yes.
2388 * linux-s390-low.c (s390_fill_gregset): New function.
2389 (target_regsets): Define data structure.
2390
dae5f5cf
DJ
23912006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2392
2393 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2394 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2395 * config.in, configure: Regenerated.
2396 * inferiors.c (gdb_id_to_thread): New function.
2397 (gdb_id_to_thread_id): Use it.
2398 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2399 * linux-low.h (struct process_info): Add th member.
2400 (thread_db_get_tls_address): New prototype.
2401 * remote-utils.c (decode_address): Make non-static.
2402 * server.c (handle_query): Handle qGetTLSAddr.
2403 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2404 * target.h (struct target_ops): Add get_tls_address.
2405 * thread-db.c (maybe_attach_thread): Save the thread handle.
2406 (thread_db_get_tls_address): New.
2407
32ca6d61
DJ
24082006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2409
2410 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2411 (linux_resume_one_process): Take a siginfo_t *. Update all
2412 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2413 (struct pending_signals): Add a siginfo_t.
2414 (linux_wait_for_process): Always set last_status.
2415 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2416 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2417 * linux-low.h (struct process_info): Add last_status.
2418
5ffff7c1
DJ
24192006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2420
2421 * remote-utils.c (try_rle): New function.
2422 (putpkt_binary): Use it.
2423
8695c747
DJ
24242006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2425
2426 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2427 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2428 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2429 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2430 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2431 point registers.
2432
290fadea
RS
24332006-08-08 Richard Sandiford <richard@codesourcery.com>
2434
2435 * server.c (terminal_fd): New variable.
2436 (old_foreground_pgrp): Likewise.
2437 (restore_old_foreground_pgrp): New function.
2438 (start_inferior): Record the terminal file descriptor in terminal_fd
2439 and its original foreground group in old_foreground_pgrp. Register
2440 restore_old_foreground_pgrp with atexit().
2441
9f2e1e63
DJ
24422006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2443
2444 * server.c (handle_query): Correct qPart to qXfer.
2445
b80864fb
DJ
24462006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2447
2448 * configure.ac: Check for more headers which are missing on
2449 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2450 * configure.srv: Add Cygwin and mingw32.
2451 * remote-utils.c: Don't include headers unconditionally which
2452 are missing on mingw32. Include <winsock.h> for mingw32.
2453 (remote_open): Adjust for mingw32 support. Flush
2454 standard error after writing to it.
2455 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2456 (unblock_async_io, enable_async_io, disable_async_io)
2457 (readchar, getpkt): Update for Winsock support.
2458 (prepare_resume_reply): Expect a protocol signal number.
2459 * server.c: Disable <sys/wait.h> on mingw32.
2460 (start_inferior): Adjust for mingw32 support. Flush
2461 standard error after writing to it.
2462 (attach_inferior): Likewise. Use protocol signal
2463 numbers.
2464 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2465 and names.
2466 * win32-i386-low.c: New file.
2467 * Makefile.in (XM_CLIBS): Set.
2468 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2469 (win32-i386-low.o): New dependency rule.
2470 * linux-low.c (linux_wait): Use target signal numbers.
2471 * target.h (struct target_ops): Doc fix.
2472 * server.h (target_signal_to_name): New prototype.
2473 * gdbreplay.c: Don't include headers unconditionally which
2474 are missing on mingw32. Include <winsock.h> for mingw32.
2475 (remote_close, remote_open): Adjust for Winsock support.
2476 * configure, config.in: Regenerated.
2477
0876f84a
DJ
24782006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2479
2480 * server.c (decode_xfer_read, write_qxfer_response): New.
2481 (handle_query): Take a packet length argument. Handle
2482 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2483 the qSupported response.
2484 (main): Update call to handle_query.
2485
01f9e8fa
DJ
24862006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2487
2488 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2489 (putpkt_binary): Renamed from putpkt and adjusted for binary
2490 data.
2491 (putpkt): New wrapper for putpkt_binary.
2492 (readchar): Don't mask off the high bit.
2493 (decode_X_packet): New function.
2494 * server.c (main): Call putpkt_binary if a handler sets the packet
2495 length. Save the length of the incoming packet. Handle 'X'.
2496 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2497
be2a5f71
DJ
24982006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2499
2500 * server.c (handle_query): Handle qSupported.
2501
ea025f5f
DJ
25022006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2503
2504 * remote-utils.c (all_symbols_looked_up): New variable.
2505 (look_up_one_symbol): Check it.
2506 * server.h (look_up_one_symbol): New declaration.
2507 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2508
9308fc88
DJ
25092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2510
2511 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 2512 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
2513 (PTRACE_GET_THREAD_AREA): Define.
2514 (ps_get_thread_area): New function.
2515
52fb6437
NS
25162006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2517
2518 * configure.srv (m68k*-*-uclinux*): New target.
2519 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2520 (linux_resume_one_process): Remove extraneous cast.
2521 (linux_read_offsets): New.
2522 (linux_target_op): Add linux_read_offsets on mmuless systems.
2523 * server.c (handle_query): Add qOffsets logic.
2524 * target.h (struct target_ops): Add read_offsets.
2525
21b0f40c
DJ
25262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2527
2528 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2529 (PTRACE_GET_THREAD_AREA): Define.
2530 (ps_get_thread_area): New function.
2531 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2532 (linux-x86-64-low.o): Update.
2533
0050a760
DJ
25342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2535
2536 * configure.ac: Remove checks for prfpregset_t.
2537 * gdb_proc_service.h: New file.
2538 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2539 new "gdb_proc_service.h".
2540 * proc-service.c: Likewise.
2541 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2542 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2543 * Makefile.in (gdb_proc_service_h): Updated.
2544 * configure, config.in: Regenerated.
2545
b92a518e
DJ
25462006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2547
2548 * remote-utils.c (prepare_resume_reply): Move declaration
2549 of gdb_id_from_wait to the top of the block.
2550
545587ee
DJ
25512006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2552
2553 * linux-low.c (regsets_store_inferior_registers): Read the regset
2554 from the target before filling it.
2555
9db87ebd
DJ
25562006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2557
2558 * server.c (attach_inferior): Return SIGTRAP for a successful
2559 attach.
2560
dd24457d
DJ
25612006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2562
2563 * Makefile.in (OBS): Add version.o.
2564 (STAGESTUFF): Delete.
2565 (version.o): Add dependencies.
2566 (version.c): Replace rule.
2567 (clean): Remove version.c.
2568 * server.c (gdbserver_version): New.
2569 (gdbserver_usage): Use printf.
2570 (main): Handle --version and --help.
2571 * server.h (version, host_name): Add declarations.
2572
6f0f660e
EZ
25732005-12-23 Eli Zaretskii <eliz@gnu.org>
2574
2575 * linux-arm-low.c:
2576 * linux-arm-low.c:
2577 * inferiors.c:
2578 * i387-fp.h:
2579 * i387-fp.c:
2580 * gdbreplay.c:
2581 * regcache.c:
2582 * proc-service.c:
2583 * mem-break.h:
2584 * mem-break.c:
2585 * linux-x86-64-low.c:
2586 * linux-sh-low.c:
2587 * linux-s390-low.c:
2588 * linux-ppc64-low.c:
2589 * linux-ppc-low.c:
2590 * linux-mips-low.c:
2591 * linux-m68k-low.c:
2592 * linux-m32r-low.c:
2593 * linux-low.h:
2594 * linux-low.c:
2595 * linux-ia64-low.c:
2596 * linux-i386-low.c:
2597 * linux-crisv32-low.c:
2598 * thread-db.c:
2599 * terminal.h:
2600 * target.h:
2601 * target.c:
2602 * server.h:
2603 * server.c:
2604 * remote-utils.c:
2605 * regcache.h:
2606 * utils.c:
2607 * Makefile.in:
2608 * configure.ac:
2609 * gdbserver.1: Add (C) after Copyright. Update the FSF
2610 address.
2611
9d1fb177
DJ
26122005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2613
2614 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2615 (arm_breakpoint_at): Recognize both breakpoints.
2616 (the_low_target): Use the correct breakpoint instruction.
2617
011a70c2
DJ
26182005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2619
2620 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2621 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2622 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2623 (the_low_target): Update.
2624
7fb85e41
AS
26252005-10-25 Andreas Schwab <schwab@suse.de>
2626
2627 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2628
2629 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2630 (ia64_num_regs): Reduce to 462.
2631
3db0444b
DJ
26322005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2633
2634 * acinclude.m4: Correct quoting.
2635 * aclocal.m4: Regenerated.
2636
2637 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2638 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2639 (thread_db_init): Call thread_db_err_str.
2640 * configure.ac: Check for TD_VERSION.
2641 * config.in, configure: Regenerated.
2642
bee0189a
DJ
26432005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2644
2645 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2646
e9d25b98
DJ
26472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2648
2649 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2650 is not available. Define HAVE_PTRACE_GETREGS if it is.
2651 * config.in, configure: Regenerated.
2652 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2653 * linux-i386-low.c, linux-m68k-low.c: Update to use
2654 HAVE_PTRACE_GETREGS.
2655 * linux-low.c (regsets_fetch_inferior_registers)
2656 (regsets_store_inferior_registers): Only return 0 if we processed
2657 GENERAL_REGS.
2658 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2659 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2660
a06660f7
DJ
26612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2662
2663 * inferiors.c (struct thread_info): Add gdb_id.
2664 (add_thread): Add gdb_id argument.
2665 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2666 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2667 calls to add_thread.
2668 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2669 * server.c (handle_query): Use thread_to_gdb_id.
2670 (handle_v_cont, main): Use gdb_id_to_thread_id.
2671 * server.h (add_thread): Update prototype.
2672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2673 prototypes.
2674
5a1f5858
DJ
26752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2676
2677 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2678 left-padded registers.
2679 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2680 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2681
e122f1f5
SE
26822005-07-01 Steve Ellcey <sje@cup.hp.com>
2683
2684 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2685 * configure: Regenerate.
2686 * config.in: Regenerate.
2687 * server.h (NEED_DECLARATION_STRERROR):
2688 Replace with !HAVE_DECL_STRERROR.
2689
d592fa2f
DJ
26902005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2691
2692 * linux-low.c (linux_wait, linux_send_signal): Don't test
2693 an unsigned long variable for > 0 if it could be MAX_ULONG.
2694 * server.c (myresume): Likewise.
2695 * target.c (set_desired_inferior): Likewise.
2696
ccbd4912
MK
26972005-06-13 Mark Kettenis <kettenis@gnu.org>
2698
2699 * configure.ac: Simplify and improve check for socklen_t.
2700 * configure, config.in: Regenerate.
2701
f450004a
DJ
27022005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2703
2704 * acconfig.h: Remove.
2705 * configure.ac: Add a test for socklen_t. Use three-argument
2706 AC_DEFINE throughout.
2707 * config.in: Regenerated using autoheader 2.59.
2708 * configure: Regenerated.
2709
2710 * gdbreplay.c (socklen_t): Provide a default.
2711 (remote_open): Use socklen_t.
2712 * remote-utils.c (socklen_t): Provide a default.
2713 (remote_open): Use socklen_t.
2714 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2715 unsigned char.
2716
2717 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2718 char for buffers.
2719 * linux-low.c (linux_read_memory, linux_write_memory)
2720 (linux_read_auxv): Likewise.
2721 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2722 (check_mem_write): Likewise.
2723 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2724 Likewise.
2725 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2726 (registers_from_string, register_data): Likewise.
2727 * server.c (handle_query, main): Likewise.
2728 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2729 (decode_M_packet): Likewise.
2730 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2731 * target.h (struct target_ops): Update read_memory, write_memory,
2732 and read_auxv.
2733 (read_inferior_memory, write_inferior_memory): Update.
2734 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2735 to unsigned char *.
2736 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2737 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2738 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2739 linux-s390-low.c, linux-sh-low.c: Update for changes in
2740 read_inferior_memory and the_low_target->breakpoint.
2741
eee84df1
DJ
27422005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2743
2744 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2745 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2746 * configure.srv: Add powerpc64-*-linux*.
2747 * linux-ppc64-low.c: New file.
2748
45b134e5
OF
27492005-05-23 Orjan Friberg <orjanf@axis.com>
2750
2751 * linux-cris-low.c: New file with support for CRIS.
2752 * linux-crisv32-low.c: Ditto for CRISv32.
2753 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2754 (clean): Add reg-cris.c and reg-crisv32.c.
2755 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2756 reg-crisv32.o, and reg-crisv32.c to make rules.
2757 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2758 recognized targets.
2759
48d93c75
UW
27602005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2761
2762 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2763 of sizeof (PTRACE_XFER_TYPE).
2764 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2765
e013ee27
OF
27662005-05-12 Orjan Friberg <orjanf@axis.com>
2767
2768 * target.h (struct target_ops): Add insert_watchpoint,
2769 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2770 pointers for hardware watchpoint support.
2771 * linux-low.h (struct linux_target_ops): Ditto.
2772 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2773 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2774 to linux_target_ops.
2775 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2776 reply packet.
2777 * server.c (main): Recognize 'Z' and 'z' packets.
2778
b0ded00b
UW
27792005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2780
2781 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2782 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2783 (the_low_target): Add new members.
2784
8643e2ad
DJ
27852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2786
2787 * proc-service.c (ps_lgetregs): Search all_processes instead of
2788 all_threads.
2789
fc620387
DJ
27902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2791
2792 * server.c (start_inferior): Change return type to int.
2793 (attach_inferior): Change sigptr to int *.
2794 (handle_v_cont, handle_v_requests): Change signal to int *.
2795 (main): Change signal to int.
2796
27972005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
2798
2799 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2800 * configure.srv: Add m32r*-*-linux*.
2801 * linux-m32r-low.c: New file.
2802
e0e76420
DJ
28032005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2804
2805 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2806
a1928bad
DJ
28072005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2808
2809 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2810 Take unsigned long arguments for PIDs.
2811 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2812 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2813 (wait_for_sigstop, linux_resume_one_process)
2814 (regsets_fetch_inferior_registers, linux_send_signal)
2815 (linux_read_auxv): Likewise. Update the types of variables holding
2816 PIDs. Update format string specifiers.
2817 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2818 * remote-utils.c (prepare_resume_reply): Likewise.
2819 * server.c (cont_thread, general_thread, step_thread)
2820 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2821 unsigned long.
2822 (handle_query): Update format specifiers.
2823 (handle_v_cont, main): Use strtoul for thread IDs.
2824 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2825 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2826 (general_thread, step_thread, thread_from_wait)
2827 (old_thread_from_wait): Update.
2828 * target.h (struct thread_resume): Use unsigned long for THREAD.
2829 (struct target_ops): Use unsigned long for arguments to attach and
2830 thread_alive.
2831
dcdb98d2
DJ
28322005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2833
2834 * acinclude.m4: Include bfd/bfd.m4 directly.
2835 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2836 <agriffis@toolchain.org>.
2837 * aclocal.m4, configure: Regenerated.
2838
bec39cab
AC
28392005-01-07 Andrew Cagney <cagney@gnu.org>
2840
2841 * configure.ac: Rename configure.in, require autoconf 2.59.
2842 * configure: Re-generate.
2843
434c4c77
DJ
28442004-12-08 Daniel Jacobowitz <dan@debian.org>
2845
2846 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2847 LIBS when finished.
2848 * aclocal.m4: Regenerated.
2849 * configure: Regenerated.
2850
db1d3e1b
AS
28512004-11-21 Andreas Schwab <schwab@suse.de>
2852
2853 * linux-m68k-low.c (m68k_num_gregs): Define.
2854 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2855 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2856 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2857 (m68k_breakpoint_at): New. Add to the_low_target.
2858
2859 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2860 srv_linux_thread_db to yes.
2861
43360365
JB
28622004-10-20 Joel Brobecker <brobecker@gnat.com>
2863
2864 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2865 (ARCH_SET_FS): Likewise.
2866 (ARCH_GET_FS): Likewise.
2867 (ARCH_GET_GS): Likewise.
2868
fd500816
DJ
28692004-10-16 Daniel Jacobowitz <dan@debian.org>
2870
2871 * linux-i386-low.c (ps_get_thread_area): New.
2872 * linux-x86-64-low.c (ps_get_thread_area): New.
2873 * linux-low.c: Include <sys/syscall.h>.
2874 (linux_kill_one_process): Don't kill the first thread here.
2875 (linux_kill): Kill the first thread here.
2876 (kill_lwp): New function.
2877 (send_sigstop, linux_send_signal): Use it.
2878 * proc-service.c: Clean up #ifdefs.
2879 (fpregset_info): Delete.
2880 (ps_lgetregs): Update and enable implementation.
2881 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2882 implementations.
2883 * remote-utils.c (struct sym_cache, symbol_cache): New.
2884 (input_interrupt): Print a clearer message.
2885 (async_io_enabled): New variable.
2886 (enable_async_io, disable_async_io): Use it. Update comments.
2887 (look_up_one_symbol): Use the symbol cache.
2888 * thread-db.c (thread_db_look_up_symbols): New function.
2889 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2890
f6de3c42
DJ
28912004-10-16 Daniel Jacobowitz <dan@debian.org>
2892
2893 * configure.in: Test for -rdynamic.
2894 * configure: Regenerated.
2895 * Makefile (INTERNAL_LDFLAGS): New.
2896 (gdbserver, gdbreplay): Use it.
2897
2c0fc042
AC
28982004-09-02 Andrew Cagney <cagney@gnu.org>
2899
2900 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2901
075b3282
DJ
29022004-03-23 Daniel Jacobowitz <drow@mvista.com>
2903
2904 * linux-low.c (linux_wait): Clear all_processes list also.
2905
fa6a77dc
DJ
29062004-03-12 Daniel Jacobowitz <drow@mvista.com>
2907
2908 * linux-low.c: Include <errno.h>. Remove extern declaration of
2909 errno.
2910
6d782a97
DJ
29112004-03-12 Daniel Jacobowitz <drow@mvista.com>
2912
2913 * gdbreplay.c, server.h, utils.c: Update copyright years.
2914
3a7fb99b
DJ
29152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2916
2917 * server.c (main): Print child status or termination signal from
2918 variable 'signal', not 'sig'.
2919
c3e735a6
DJ
29202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2921
2922 * linux-low.c (linux_read_memory): Change return type to
2923 int. Check for and return error from ptrace().
2924 * target.c (read_inferior_memory): Change return type to int. Pass
2925 back return status from the_target->read_memory().
2926 * target.h (struct target_ops): Adapt *read_memory() prototype.
2927 Update comment.
2928 (read_inferior_memory): Adapt prototype.
2929 * server.c (main): Return an error packet if
2930 read_inferior_memory() returns an error.
2931
a59d1c82
DJ
29322004-03-04 Daniel Jacobowitz <drow@mvista.com>
2933
2934 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2935 Unify with other clean targets.
2936
dc3f8883
DJ
29372004-02-29 Daniel Jacobowitz <drow@mvista.com>
2938
2939 * server.c (handle_v_cont): Call set_desired_inferior.
2940
89a208da
DJ
29412004-02-29 Daniel Jacobowitz <drow@mvista.com>
2942
2943 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2944
62ea82f5
DJ
29452004-02-29 Daniel Jacobowitz <drow@mvista.com>
2946
2947 * linux-low.c (linux_wait): Unblock async I/O.
2948 (linux_resume): Block and enable async I/O.
2949 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2950 * server.h (block_async_io, unblock_async_io): Add prototypes.
2951
6910d122
DJ
29522004-02-29 Daniel Jacobowitz <drow@mvista.com>
2953
2954 * remote-utils.c (remote_open): Print a status notice after
2955 opening a TCP port.
2956 * server.c (attach_inferior): Print a status notice after
2957 attaching.
2958
29592004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
2960
2961 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2962
c89dc5d4
DJ
29632004-02-26 Daniel Jacobowitz <drow@mvista.com>
2964
2965 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2966 error packet.
2967 * server.c, target.h: Update copyright years.
2968
4b8dad4a
RM
29692004-02-25 Roland McGrath <roland@redhat.com>
2970
2971 * target.h (struct target_ops): New member `read_auxv'.
2972 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2973 * linux-low.c (linux_read_auxv): New function.
2974 (linux_target_ops): Initialize `read_auxv' member to that.
2975
d7446758
JB
29762004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2977
2978 Committed by Jim Blandy <jimb@redhat.com>.
2979
2980 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 2981 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
2982 instead of GPR_SIZE to distiguish s390 and s390x targets.
2983
5544ad89
DJ
29842004-01-31 Daniel Jacobowitz <drow@mvista.com>
2985
2986 * linux-low.c: Update copyright year.
2987 (check_removed_breakpoint): Clear pending_is_breakpoint.
2988 (linux_set_resume_request, linux_queue_one_thread)
2989 (resume_status_pending_p): New functions.
2990 (linux_continue_one_thread): Use process->resume.
2991 (linux_resume): Only resume threads if there are no pending events.
2992 * linux-low.h (struct process_info): Add resume request
2993 pointer.
2994
2a68b70e
DJ
29952004-01-30 Daniel Jacobowitz <drow@mvista.com>
2996
2997 * regcache.c (new_register_cache): Clear the allocated register
2998 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2999
64386c31
DJ
30002003-10-13 Daniel Jacobowitz <drow@mvista.com>
3001
3002 * linux-low.c (linux_resume): Take a struct thread_resume *
3003 argument.
3004 (linux_wait): Update call.
3005 (resume_ptr): New static variable.
3006 (linux_continue_one_thread): Renamed from
3007 linux_continue_one_process. Use resume_ptr.
3008 (linux_resume): Use linux_continue_one_thread.
3009 * server.c (handle_v_cont, handle_v_requests): New functions.
3010 (myresume): New function.
3011 (main): Handle 'v' case.
3012 * target.h (struct thread_resume): New type.
3013 (struct target_ops): Change argument of "resume" to struct
3014 thread_resume *.
3015 (myresume): Delete macro.
3016
c938e9b0
L
30172003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3018
3019 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3020 (uninstall): Support DESTDIR.
3021
7f313d07
BC
3022Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3023
3024 * configure.srv: Add xscale*linux copy of arm*linux entry.
3025
3b2fc2ea
DJ
30262003-07-24 Daniel Jacobowitz <drow@mvista.com>
3027
3028 * linux-arm-low.c (arm_reinsert_addr): New function.
3029 (the_low_target): Add arm_reinsert_addr.
3030
1c0a559e
MK
30312003-07-08 Mark Kettenis <kettenis@gnu.org>
3032
3033 * mem-break.c: Remove whitespace at end of file.
3034
43d5792c
DJ
30352003-06-28 Daniel Jacobowitz <drow@mvista.com>
3036
3037 * configure.in: Check whether we need to prototype strerror.
3038 * server.h: Optionally prototype strerror.
3039 * gdbreplay.c (perror_with_name): Use strerror.
3040 * linux-low.c (linux_attach_lwp): Use strerror.
3041 * utils.c (perror_with_name): Use strerror.
3042 * config.in, configure: Regenerated.
3043
c8a86edf
DJ
30442003-06-28 Daniel Jacobowitz <drow@mvista.com>
3045
3046 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3047 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3048
73d37363
DJ
30492003-06-20 Daniel Jacobowitz <drow@mvista.com>
3050
3051 * Makefile.in (SFILES): Update.
3052 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3053 low-sun3.c: Remove files.
3054
6ad8ae5c
DJ
30552003-06-17 Daniel Jacobowitz <drow@mvista.com>
3056
3057 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3058 (linux_detach_one_process, linux_detach): New functions.
3059 (linux_target_ops): Add linux_detach.
3060 * server.c (main): Handle 'D' packet.
3061 * target.h (struct target_ops): Add "detach" member.
3062 (detach_inferior): Define.
3063
1581182a
MK
30642003-06-13 Mark Kettenis <kettenis@gnu.org>
3065
3066 From Kelley Cook <kelleycook@wideopenwest.com>:
3067 * configure.srv: Accept i[34567]86 variants.
3068
e5379b03
DJ
30692003-06-05 Daniel Jacobowitz <drow@mvista.com>
3070
3071 * linux-low.c (linux_wait_for_event): Correct comment typos.
3072 (linux_resume_one_process): Call check_removed_breakpoint.
3073 (linux_send_signal): New function.
3074 (linux_target_ops): Add linux_send_signal.
3075 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3076 of kill.
3077 * target.h (struct target_ops): Add send_signal.
3078
2ff29de4
JB
30792003-05-29 Jim Blandy <jimb@redhat.com>
3080
3081 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3082 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3083 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3084 away part of the register's value.
3085
254787d4
DJ
30862003-03-26 Daniel Jacobowitz <drow@mvista.com>
3087
3088 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3089 (linux_wait_for_event, linux_init_signals): Likewise.
3090
94e10508
DJ
30912003-03-17 Daniel Jacobowitz <drow@mvista.com>
3092
3093 * configure.in: Check for stdlib.h.
3094 * configure: Regenerated.
3095 * config.in: Regenerated.
3096
4c0711e0
DJ
30972003-01-04 Andreas Schwab <schwab@suse.de>
3098
3099 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3100
ef66e766
AC
31012003-01-02 Andrew Cagney <ac131313@redhat.com>
3102
3103 * Makefile.in: Remove obsolete code.
3104
a1358604
DJ
31052002-11-20 Daniel Jacobowitz <drow@mvista.com>
3106
3107 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3108 defined(PT_FPR0_HI).
3109
23ce3b1c
DJ
31102002-11-17 Stuart Hughes <seh@zee2.com>
3111
3112 * linux-arm-low.c (arm_num_regs): Increase.
3113 (arm_regmap): Include status register.
3114
31152002-11-17 Daniel Jacobowitz <drow@mvista.com>
3116
3117 * linux-low.c (register_addr): Remove incorrect -1 check.
3118
a9fa9f7d
DJ
31192002-08-29 Daniel Jacobowitz <drow@mvista.com>
3120
3121 * linux-low.c (linux_create_inferior): Call setpgid. Return
3122 the new PID.
3123 (unstopped_p, linux_signal_pid): Remove.
3124 (linux_target_ops): Remove linux_signal_pid.
3125 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3126 global instead of target method.
3127 * target.h (struct target_ops): Remove signal_pid. Update comment
3128 for create_inferior.
3129 * server.c (signal_pid): New variable.
3130 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 3131 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
3132 (attach_inferior): Set signal_pid.
3133
17574093
DJ
31342002-08-23 Daniel Jacobowitz <drow@mvista.com>
3135
3136 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3137
31382002-08-20 Jim Blandy <jimb@redhat.com>
3139
3140 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3141 default for this.
3142
31432002-08-01 Andrew Cagney <cagney@redhat.com>
3144
3145 * Makefile.in: Make chill references obsolete.
3146
31472002-07-24 Kevin Buettner <kevinb@redhat.com>
3148
3149 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3150 * configure: Regenerate.
3151 * config.in: Regenerate.
3152
31532002-07-09 David O'Brien <obrien@FreeBSD.org>
3154
3155 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3156 (perror_with_name, remote_close, remote_open, expect, play): Static.
3157
31582002-07-04 Michal Ludvig <mludvig@suse.cz>
3159
4b8dad4a 3160 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
3161 byte offsets instead of an array of indexes.
3162 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3163
31642002-06-13 Daniel Jacobowitz <drow@mvista.com>
3165
3166 * regcache.c: Add comment.
3167
31682002-06-11 Daniel Jacobowitz <drow@mvista.com>
3169
3170 * thread-db.c: New file.
3171 * proc-service.c: New file.
3172 * acinclude.m4: New file.
3173 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3174 proc-service.o, and thread-db.o.
3175 (linux-low.o): Add USE_THREAD_DB.
3176 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3177 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3178 * aclocal.m4: Regenerated.
3179 * config.in: Regenerated.
3180 * configure: Regenerated.
3181 * configure.in: Check for proc_service.h, sys/procfs.h,
3182 thread_db.h, and linux/elf.h headrs.
3183 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3184 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3185 Check for -lthread_db and thread support.
3186 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3187 PowerPC, and SuperH.
3188 * i387-fp.c: Constify arguments.
3189 * i387-fp.h: Likewise.
3190 * inferiors.c: (struct thread_info): Renamed from
3191 `struct inferior_info'. Remove PID member. Use generic inferior
3192 list header. All uses updated.
3193 (inferiors, signal_pid): Removed.
3194 (all_threads): New variable.
3195 (get_thread): Define.
3196 (add_inferior_to_list): New function.
3197 (for_each_inferior): New function.
3198 (change_inferior_id): New function.
3199 (add_inferior): Removed.
3200 (remove_inferior): New function.
3201 (add_thread): New function.
3202 (free_one_thread): New function.
3203 (remove_thread): New function.
3204 (clear_inferiors): Use for_each_inferior and free_one_thread.
3205 (find_inferior): New function.
3206 (find_inferior_id): New function.
3207 (inferior_target_data): Update argument type.
3208 (set_inferior_target_data): Likewise.
3209 (inferior_regcache_data): Likewise.
3210 (set_inferior_regcache_data): Likewise.
3211 * linux-low.c (linux_bp_reinsert): Remove.
3212 (all_processes, stopping_threads, using_thrads)
3213 (struct pending_signals, debug_threads, pid_of): New.
3214 (inferior_pid): Replace with macro.
3215 (struct inferior_linux_data): Remove.
3216 (get_stop_pc, add_process): New functions.
3217 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3218 Use add_process and add_thread.
3219 (linux_attach_lwp): New function, based on old linux_attach. Use
3220 add_process and add_thread. Set stop_expected for new threads.
3221 (linux_attach): New function.
3222 (linux_kill_one_process): New function.
3223 (linux_kill): Kill all LWPs.
3224 (linux_thread_alive): Use find_inferior_id.
3225 (check_removed_breakpoints, status_pending_p): New functions.
3226 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3227 Update. Use WNOHANG. Wait for cloned processes also. Update process
3228 struct for the found process.
3229 (linux_wait_for_event): New function.
3230 (linux_wait): Use it. Support LWPs.
3231 (send_sigstop, wait_for_sigstop, stop_all_processes)
3232 (linux_resume_one_process, linux_continue_one_process): New functions.
3233 (linux_resume): Support LWPs.
3234 (REGISTER_RAW_SIZE): Remove.
3235 (fetch_register): Use register_size instead. Call supply_register.
3236 (usr_store_inferior_registers): Likewise. Call collect_register.
3237 Fix recursive case.
3238 (regsets_fetch_inferior_registers): Improve error message.
3239 (regsets_store_inferior_registers): Add debugging.
3240 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3241 (unstopped_p, linux_signal_pid): New functions.
3242 (linux_target_ops): Add linux_signal_pid.
3243 (linux_init_signals): New function.
3244 (initialize_low): Call it. Initialize using_threads.
3245 * regcache.c (inferior_regcache_data): Add valid
3246 flag.
3247 (get_regcache): Fetch registers lazily. Add fetch argument
3248 and update all callers.
3249 (regcache_invalidate_one, regcache_invalidate): New
3250 functions.
3251 (new_register_cache): Renamed from create_register_cache.
3252 Return the new regcache.
3253 (free_register_cache): Change argument to a void *.
3254 (registers_to_string, registers_from_string): Call get_regcache
3255 with fetch flag set.
3256 (register_data): Make static. Pass fetch flag to get_regcache.
3257 (supply_register): Call get_regcache with fetch flag clear.
3258 (collect_register): Call get_regcache with fetch flag set.
3259 (collect_register_as_string): New function.
3260 * regcache.h: Update.
3261 * remote-utils.c (putpkt): Flush after debug output and use
3262 stderr.
3263 Handle input interrupts while waiting for an ACK.
3264 (input_interrupt): Use signal_pid method.
3265 (getpkt): Flush after debug output and use stderr.
3266 (outreg): Use collect_register_as_string.
3267 (new_thread_notify, dead_thread_notify): New functions.
3268 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3269 and general_thread.
3270 (look_up_one_symbol): Flush after debug output.
3271 * server.c (step_thread, server_waiting): New variables.
3272 (start_inferior): Don't use signal_pid. Update call to mywait.
3273 (attach_inferior): Update call to mywait.
3274 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3275 (main): Don't fetch/store registers explicitly. Use
3276 set_desired_inferior. Support proposed ``Hs'' packet. Update
3277 calls to mywait.
3278 * server.h: Update.
3279 (struct inferior_list, struct_inferior_list_entry): New.
3280 * target.c (set_desired_inferior): New.
3281 (write_inferior_memory): Constify.
3282 (mywait): New function.
3283 * target.h: Update.
3284 (struct target_ops): New signal_pid method.
3285 (mywait): Removed macro, added prototype.
3286
3287 * linux-low.h (regset_func): Removed.
3288 (regset_fill_func, regset_store_func): New.
3289 (enum regset_type): New.
3290 (struct regset_info): Add type field. Use new operation types.
3291 (struct linux_target_ops): stop_pc renamed to get_pc.
3292 Add decr_pc_after_break and breakpoint_at.
3293 (get_process, get_thread_proess, get_process_thread)
3294 (strut process_info, all_processes, linux_attach_lwp)
3295 (thread_db_init): New.
3296
3297 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3298 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3299 (the_low_target): Add new members.
3300 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3301 (i386_store_fpxregset): Constify.
3302 (target_regsets): Add new kind identifier.
3303 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3304 (i386_set_pc): Add debugging.
3305 (i386_breakpoint_at): New function.
3306 (the_low_target): Add new members.
3307 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3308 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3309 (mips_breakpoint_at): New.
3310 (the_low_target): Add new members.
3311 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3312 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3313 (the_low_target): Add new members.
3314 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3315 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3316 (the_low_target): Add new members.
3317 * linux-x86-64-low.c (target_regsets): Add new kind
3318 identifier.
3319
33202002-05-15 Daniel Jacobowitz <drow@mvista.com>
3321
3322 From Martin Pool <mbp@samba.org>:
3323 * server.c (gdbserver_usage): New function.
3324 (main): Call it.
3325
33262002-05-14 Daniel Jacobowitz <drow@mvista.com>
3327
3328 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3329 stop_at -> stop_pc.
3330
33312002-05-04 Andrew Cagney <ac131313@redhat.com>
3332
3333 * Makefile.in: Remove obsolete code.
3334
33352002-04-24 Michal Ludvig <mludvig@suse.cz>
3336
3337 * linux-low.c (regsets_fetch_inferior_registers),
3338 (regsets_store_inferior_registers): Removed cast to int from
3339 ptrace() calls.
3340 * regcache.h: Added declaration of struct inferior_info.
3341
33422002-04-20 Daniel Jacobowitz <drow@mvista.com>
3343
3344 * inferiors.c (struct inferior_info): Add regcache_data.
3345 (add_inferior): Call create_register_cache.
3346 (clear_inferiors): Call free_register_cache.
3347 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3348 * regcache.c (struct inferior_regcache_data): New.
3349 (registers): Remove.
3350 (get_regcache): New function.
3351 (create_register_cache, free_register_cache): New functions.
3352 (set_register_cache): Don't initialize the register cache here.
3353 (registers_to_string, registers_from_string, register_data): Call
3354 get_regcache.
3355 * regcache.h: Add prototypes.
3356 * server.h: Likewise.
3357
33582002-04-20 Daniel Jacobowitz <drow@mvista.com>
3359
3360 * mem-break.c: New file.
3361 * mem-break.h: New file.
3362 * Makefile.in: Add mem-break.o rule; update server.h
3363 dependencies.
3364 * inferiors.c (struct inferior_info): Add target_data
3365 member.
3366 (clear_inferiors): Free target_data member if set.
3367 (inferior_target_data, set_inferior_target_data): New functions.
3368 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3369 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3370 * linux-low.c (linux_bp_reinsert): New variable.
3371 (struct inferior_linux_data): New.
3372 (linux_create_inferior): Use set_inferior_target_data.
3373 (linux_attach): Likewise. Call add_inferior.
3374 (linux_wait_for_one_inferior): New function.
3375 (linux_wait): Call it.
3376 (linux_write_memory): Add const.
3377 (initialize_low): Call set_breakpoint_data.
3378 * linux-low.h (struct linux_target_ops): Add breakpoint
3379 handling members.
3380 * server.c (attach_inferior): Remove extra add_inferior
3381 call.
3382 * server.h: Include mem-break.h. Update inferior.c
3383 prototypes.
3384 * target.c (read_inferior_memory)
3385 (write_inferior_memory): New functions.
3386 * target.h (read_inferior_memory)
3387 (write_inferior_memory): Change macros to prototypes.
3388 (struct target_ops): Update comments. Add const to write_memory
3389 definition.
3390
33912002-04-11 Daniel Jacobowitz <drow@mvista.com>
3392
3393 * linux-low.c (usr_store_inferior_registers): Support
3394 registers which are allowed to fail to store.
3395 * linux-low.h (linux_target_ops): Likewise.
3396 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3397 (ppc_cannot_store_register): FPSCR may not be storable.
3398
33992002-04-09 Daniel Jacobowitz <drow@mvista.com>
3400
3401 * server.h: Include <string.h> if HAVE_STRING_H.
3402 * ChangeLog: Correct paths in last ChangeLog entry.
3403
34042002-04-09 Daniel Jacobowitz <drow@mvista.com>
3405
3406 * linux-low.h: Remove obsolete prototypes.
3407 (struct linux_target_ops): New.
3408 (extern the_low_target): New.
3409 * linux-low.c (num_regs, regmap): Remove declarations.
3410 (register_addr): Use the_low_target explicitly.
3411 (fetch_register): Likewise.
3412 (usr_fetch_inferior_registers): Likewise.
3413 (usr_store_inferior_registers): Likewise.
3414 * linux-arm-low.c (num_regs): Remove.
3415 (arm_num_regs): Define.
3416 (arm_regmap): Renamed from regmap, made static.
3417 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3418 made static.
3419 (arm_cannot_store_register): Renamed from cannot_store_register,
3420 made static.
3421 (the_low_target): New.
3422 * linux-i386-low.c (num_regs): Remove.
3423 (i386_num_regs): Define.
3424 (i386_regmap): Renamed from regmap, made static.
3425 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3426 made static.
3427 (i386_cannot_store_register): Renamed from cannot_store_register,
3428 made static.
3429 (the_low_target): New.
3430 * linux-ia64-low.c (num_regs): Remove.
3431 (ia64_num_regs): Define.
3432 (ia64_regmap): Renamed from regmap, made static.
3433 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3434 made static.
3435 (ia64_cannot_store_register): Renamed from cannot_store_register,
3436 made static.
3437 (the_low_target): New.
3438 * linux-m68k-low.c (num_regs): Remove.
3439 (m68k_num_regs): Define.
3440 (m68k_regmap): Renamed from regmap, made static.
3441 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3442 made static.
3443 (m68k_cannot_store_register): Renamed from cannot_store_register,
3444 made static.
3445 (the_low_target): New.
3446 * linux-mips-low.c (num_regs): Remove.
3447 (mips_num_regs): Define.
3448 (mips_regmap): Renamed from regmap, made static.
3449 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3450 made static.
3451 (mips_cannot_store_register): Renamed from cannot_store_register,
3452 made static.
3453 (the_low_target): New.
3454 * linux-ppc-low.c (num_regs): Remove.
3455 (ppc_num_regs): Define.
3456 (ppc_regmap): Renamed from regmap, made static.
3457 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3458 made static.
3459 (ppc_cannot_store_register): Renamed from cannot_store_register,
3460 made static.
3461 (the_low_target): New.
3462 * linux-s390-low.c (num_regs): Remove.
3463 (s390_num_regs): Define.
3464 (s390_regmap): Renamed from regmap, made static.
3465 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3466 made static.
3467 (s390_cannot_store_register): Renamed from cannot_store_register,
3468 made static.
3469 (the_low_target): New.
3470 * linux-sh-low.c (num_regs): Remove.
3471 (sh_num_regs): Define.
3472 (sh_regmap): Renamed from regmap, made static.
3473 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3474 made static.
3475 (sh_cannot_store_register): Renamed from cannot_store_register,
3476 made static.
3477 (the_low_target): New.
3478 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3479 (the_low_target): New.
3480
34812002-04-09 Daniel Jacobowitz <drow@mvista.com>
3482
3483 * Makefile.in: Add stamp-h target.
3484 * configure.in: Create stamp-h.
3485 * configure: Regenerated.
3486
34872002-04-09 Daniel Jacobowitz <drow@mvista.com>
3488
3489 * inferiors.c: New file.
3490 * target.c: New file.
3491 * target.h: New file.
3492 * Makefile.in: Add target.o and inferiors.o. Update
3493 dependencies.
3494 * linux-low.c (inferior_pid): New static variable,
3495 moved from server.c.
3496 (linux_create_inferior): Renamed from create_inferior.
3497 Call add_inferior. Return 0 on success instead of a PID.
3498 (linux_attach): Renamed from myattach.
3499 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3500 (linux_thread_alive): Renamed from mythread_alive.
3501 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3502 child dies.
3503 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3504 (regsets_store_inferior_registers): Correct error message.
3505 Add missing ``return 0''.
3506 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3507 (linux_store_registers): Renamed from store_inferior_registers.
3508 (linux_read_memory): Renamed from read_inferior_memory.
3509 (linux_write_memory): Renamed from write_inferior_memory.
3510 (linux_target_ops): New structure.
3511 (initialize_low): Call set_target_ops ().
3512 * remote-utils.c (unhexify): New function.
3513 (hexify): New function.
3514 (input_interrupt): Send signals to ``signal_pid''.
3515 * server.c (inferior_pid): Remove.
3516 (start_inferior): Update create_inferior call.
3517 (attach_inferior): Call add_inferior.
3518 (handle_query): New function.
3519 (main): Call handle_query for `q' packets.
3520 * server.h: Include "target.h". Remove obsolete prototypes.
3521 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3522
35232002-04-09 Daniel Jacobowitz <drow@mvista.com>
3524
3525 * Makefile.in: Add WARN_CFLAGS. Update configury
3526 dependencies.
3527 * configure.in: Check for <string.h>
3528 * configure: Regenerate.
3529 * config.in: Regenerate.
3530 * gdbreplay.c: Include needed system headers.
3531 (remote_open): Remove strchr prototype.
3532 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3533 * regcache.c (supply_register): Change buf argument to const void *.
3534 (supply_register_by_name): Likewise.
3535 (collect_register): Change buf argument to void *.
3536 (collect_register_by_name): Likewise.
3537 * regcache.h: Add missing prototypes.
3538 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3539 * server.c (handle_query): New function.
3540 (attached): New static variable, moved out of main.
3541 (main): Quiet longjmp clobber warnings.
3542 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3543 * utils.c (error): Remove NORETURN.
3544 (fatal): Likewise.