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