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