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