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