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