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