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