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