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