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