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