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